npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

metrics2xlsx

v1.5.0

Published

metrics2xlsx is a tool that allows you to convert system metrics files uploded on S3 and formatted by [system-metrics-formatter](https://www.npmjs.com/package/system-metrics-formatter) into a .xlsx file.To collect those data we recommend using the npm mod

Downloads

19

Readme

metrics2xlsx

NPM version Downloads Dependency Status Gandalf  Status

What is metrics2xlsx?

metrics2xlsx is a tool that allows you to convert system metrics files uploded on S3 and formatted by system-metrics-formatter into a .xlsx file. To collect those data we recommend using the npm module system-metrics-collector available even in GO language at this link (if you want a compiled version)

How to use it

You can install metrics2xlsx globally running:
$ npm install -g metrics2xlsx

Configuration

Before starting using metrics2xlsx you have to create a configuration file called .metrics2xlsx in your Home folder.
This file is structured like this:

{
        "credentials":{
                "accessKeyId" : "yourAccessKeyId",
                "secretAccessKey": "yourSecretAccessKey",
                "region": "yourRegion"
        },
        "bucket": "yourBucket"
}

Running

If you have metrics2xlsx installed globally you can start it running:
$ m2x <CustomerId> <Id>

This will generate a file .xlsx in your current working directory, named <Id>.xlsx, containing one sheet for each metric

You can run: $ m2x to list all your bucket or $ m2x <CustomerId> to list all the ids linked to a CustomerId

Flags

  • -o or --out change the name and path in which you would like to save the file
  • -b or --bucket sets your bucket (overwrites the config file)

Data

I recommend the npm module system-metrics-collector available even in GO language at this link (if you want a compiled version) to collect such metrics and put them on an S3 bucket; On the S3 bucket you have to put a Gzipped file named: <CustomerId>/<Id>/<CustomerId>_<Id>_<UnixTime>

Structured like this:

{
  "Time": 1499680866,
  "Cpu": {
    "TotalCpuUsage": {
      "CpuName": "cpu",
      "User": 41969,
      "Nice": 270,
      "System": 7609,
      "Idle": 704945,
      "Iowait": 31409,
      "Irq": 0,
      "Softirq": 1135,
      "Steal": 0,
      "Guest": 0,
      "GuestNice": 0
    }
  },
  "Memory": {
    "MemTotal": 3473712,
    "MemFree": 110332,
    "MemAvailable": 942664
  },
  "Disks": [
    {
      "Name": "/dev/disk0s2",
      "MountPoint": "/",
      "Capacity": 15,
      "Used": 36566132,
      "Available": 212397356
    },
    {
      "Name": "/dev/disk1s2",
      "MountPoint": "/Volumes/+è",
      "Capacity": 19,
      "Used": 112448544,
      "Available": 511843712
    }
  ],
  "Network": [
    {
      "Name": "enp5s0",
      "BytesIn": 0,
      "PacketsIn": 0,
      "BytesOut": 0,
      "PacketsOut": 0
    },
    {
      "Name": "lo",
      "BytesIn": 45933,
      "PacketsIn": 565,
      "BytesOut": 45933,
      "PacketsOut": 565
    },
    {
      "Name": "wlp4s0",
      "BytesIn": 197285671,
      "PacketsIn": 136480,
      "BytesOut": 7569366,
      "PacketsOut": 70109
    }
  ]
}

People

License

MIT