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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@server-state/system-information-module

v0.1.2

Published

A module to view characteristics of your system

Readme

system information module

Build Status GitHub npm version Coverage Status module type: official

Description

A module to view characteristics of your system.
Its response is a object containing keys named after the request functions from the systeminformation module. The output can be defined before in SMF options with another object as the return value from the systeminformation function.
Here is a example for a request to CPU and memory information:

{
  "cpu": {
    "manufacturer": "Intel®",
    "brand": "Core™ i7-8250U",
    "vendor": "GenuineIntel",
    "family": "6",
    "model": "142",
    "stepping": "10",
    "revision": "",
    "voltage": "",
    "speed": "1.60",
    "speedmin": "0.40",
    "speedmax": "3.40",
    "cores": 8,
    "physicalCores": 4,
    "processors": 1,
    "socket": "",
    "cache": {
      "l1d": 131072,
      "l1i": 131072,
      "l2": 1,
      "l3": 8
    }
  },
  "mem": {
    "total": 16677117952,
    "free": 7204421632,
    "used": 9472696320,
    "active": 5442600960,
    "available": 11642912768,
    "buffcache": 4030095360,
    "swaptotal": 8589930496,
    "swapused": 9072640,
    "swapfree": 8580857856
  }
}

You can simply add this module with the server-base function and your specific options, for example:

server.addModule('system-information', require('@server-state/system-information-module'), {
    cpu: [],
    mem: ['free']
});

to your current api server. This results in the following output:

{
  "cpu": {
    "manufacturer": "Intel®",
    "brand": "Core™ i7-8250U",
    "vendor": "GenuineIntel",
    "family": "6",
    "model": "142",
    "stepping": "10",
    "revision": "",
    "voltage": "",
    "speed": "1.60",
    "speedmin": "0.40",
    "speedmax": "3.40",
    "cores": 8,
    "physicalCores": 4,
    "processors": 1,
    "socket": "",
    "cache": {
      "l1d": 131072,
      "l1i": 131072,
      "l2": 1,
      "l3": 8
    }
  },
  "mem": {
    "free": 7204421632
  }
}

Options

You can adjust the result of this module in the options as an object.
These object contains key-value pairs. The key defines the function based the systeminformation reference to call and the value as type of array defines the filter.
If the array or filter is empty, the result from the 'si'-function will be returned. If the array contains strings that bases on the resulting key names in the object, the result object from the 'si'-function is filtered by the defined key names.
For example, if you only want the number of cores from your CPU, an option object could look like:

const options = {
    cpu: ['cores']
};

And the result defined by this option could look like:

{
  "cpu": {
    "cores": 4
  }
}

About

This output generates a straight base to provide other applications useful information like server-state example client-base.

This official module belongs to the organization server-state.