systeminformation

Tests

If you run into problems, you now can easily test if a specific function is supported on your platform and returns plausible results. In this section you will learn how you can easily test all functions on your platform:

## Testing on your platform

First of all make sure, that you have git installed on your machine.

Next you need to clone the git repository to a directory of your choice:

    git clone https://github.com/sebhildebrandt/systeminformation.git

Go inside the newly created systeminformation directory

    cd systeminformation

If you already cloned the repository, make sure that you have the latest version installed:

    git pull

Now you can start the test with

    npm run test

You get a nice menu where you now can run function by function and see if you get meaningfull results (if supported on yur platform) or errors. Sample output:

    SYSTEMINFORMATION - Test Scripts - Version: 5.x.y
    ═══════════════════════════════════════════════════════════

    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │  a ... Audio              i ... INET Latency       t ... time               1 ... NET Iface Default     ? ... Get Object    │
    │  b ... BIOS               I ... INET Check Site    T ... CPU Temperature    2 ... NET Gateway Default   , ... All Static    │
    │  B ... Baseboard          j ... CPU Current Speed  u ... USB                3 ... NET Interfaces        . ... All Dynamic   │
    │  C ... Chassis            l ... CPU Current Load   U ... UUID               4 ... NET Stats             / ... All           │
    │  c ... CPU                L ... Full Load          v ... Versions           5 ... NET Connections                           │
    │  d ... DiskLayout         m ... Memory             V ... Virtual Box                                                        │
    │  D ... DiskIO             M ... MEM Layout         w ... WIFI networks                                                      │
    │  e ... Block Devices      o ... OS Info            W ... WIFI interfaces                                                    │
    │  E ... Open Files         p ... Processes          x ... WIFI connections   6 ... Docker Info                               │
    │  f ... FS Size            P ... Process Load       y ... System             7 ... Docker Images                             │
    │  F ... FS Stats           r ... Printer            Y ... Battery            8 ... Docker Container                          │
    │  g ... Graphics           s ... Services           z ... Users              9 ... Docker Cont Stats                         │
    │  h ... Bluetooth          S ... Shell                                       0 ... Docker Cont Proc      q >>> QUIT          │
    └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Press q to exit the test suite

Here a sample output for the e.g. c ... CPU

    ┌────────────────────────────────────────────────┐
    │  CPU                                  v: 5.x.y │
    └────────────────────────────────────────────────┘
    {
      manufacturer: 'Intel®',
      brand: 'Core™ i7-8569U',
      vendor: 'GenuineIntel',
      family: '6',
      model: '142',
      stepping: '10',
      revision: '',
      voltage: '',
      speed: 2.8,
      speedMin: 2.8,
      speedMax: 2.8,
      governor: '',
      cores: 8,
      physicalCores: 4,
      processors: 1,
      socket: '',
      flags: 'fpu vme de pse tsc ...',
      virtualization: true,
      cache: { l1d: 32768, l1i: 32768, l2: 262144, l3: 8388608 }
    }

Make sure to have a look in the documentation if there are already known issues and if the specific function is supported on your platform. If yes, check whether results are meaningfull and plausible.

I highly appreciate if you test all functions on your specific platform. This will help me improving the package and provide the best possible platform support.