# Node-red-systeminformation

**URL:** <https://discourse.nodered.org/t/node-red-systeminformation/84024>\
**Category:** Share Your Nodes\
**Created:** [25 December 2023 20:33 UTC](https://discourse.nodered.org/t/node-red-systeminformation/84024 "2023-12-25T20:33:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [25 December 2023 20:33 UTC](https://discourse.nodered.org/t/node-red-systeminformation/84024/1 "2023-12-25T20:33:55Z")

</div>

Recently I started the journey to move a project from Python to Node-RED and had the demand for a node to get some system related information. Looking around a bit, I found [systeminformation.io](http://systeminformation.io), a _ **System Information Library for Node.JS** _, apparently [#1 NPM ranking for backend package](https://github.com/sebhildebrandt/systeminformation#the-systeminformation-project). To my surprise, there was no node covering this excellent library.

Welcome [node-red-systeminformation](https://flows.nodered.org/node/@ralphwetzel/node-red-systeminformation), a node to interface the `systeminformation` library for Node-RED.

From its **README** :

This node lets you call one of the functions provided by `systeminformation`. The result of each call will be returned as `msg.payload`.

There are two ways to select the function to be called:

### Static configuration via the node property editor

You may configure the to-be-called function via the nodes property editor.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1c49bc92ac90a67a506edfa8b05d369b30e2d660.png)

Functions are arranged in groups, following the `systeminformation` documentation.

In case a function expects additional parameters, those may be defined as required.

Additionally, the node may be configured to observe the selected function by polling at a given rate. If polling is enabled, you may decide to let the node emit a `msg` only if the function call returned changed values.

### Dynamic mode

You may trigger the call of a `systeminformation` function as well by sending to the node a `msg` that is configured accordingly:

`topic`: name of the `systeminformation` function to be called.

`payload`: optional `<object>` with parameters to be passed to the function. The keys of the objects properties have to match the names of the parameters as defined by the `systeminformation` documentation, e.g:

```auto
{
    topic: 'versions',
    payload: {
        apps: 'npm, php, postgresql'
    }
}

```

> The dynamic mode may be used in addition & parallel to a static configuration, as shown in the provided example.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 December 2023 10:18 UTC](https://discourse.nodered.org/t/node-red-systeminformation/84024/2 "2023-12-26T10:18:57Z")

</div>

That's great, I can use that. Thanks.

Did you realise it outputs to the node-red log each time it is run? Some forgotten debug output perhaps. For example when I ask for Version I see

```auto
false []
5.21.3

```

Is that the version of the underlying module?

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [26 December 2023 10:27 UTC](https://discourse.nodered.org/t/node-red-systeminformation/84024/3 "2023-12-26T10:27:34Z")

</div>

> [@Colin](#):
>
> Did you realise it outputs to the node-red log each time it is run?

No, I didn't. Thanks for reporting =\> v1.0.1

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 December 2023 10:30 UTC](https://discourse.nodered.org/t/node-red-systeminformation/84024/4 "2023-12-26T10:30:29Z")

</div>

I have been trying it on some of my older systems, and note that it requires node red \>= v3. Perhaps it would be worth mentioning that in the readme.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [26 December 2023 20:51 UTC](https://discourse.nodered.org/t/node-red-systeminformation/84024/5 "2023-12-26T20:51:13Z")

</div>

> [@Colin](#):
>
> it requires node red \>= v3

There's no technical reason (I'm aware of) it's requiring NR \>= v3. We yet had a discussion here recently to not-encourage people to use "outdated" versions.  
Anyway - as long as we don't stumble over any bug, I'll open it for lower versions as well... =\> v1.0.2 \>\> NR \>= 2.1.0
