psmqtt - system statistics via MQTT#
simpleswitch-psmqtt
offers a service that gathers data about your system, such as CPU load, memory consumption, disk usage, uptime and more.
Data will be published to our simpleswitch-mosquitto
MQTT broker.
Registration
If you want to test SimpleCore™, SimpleSwitch™ or any of our packages from our SimpleCore™ incubator program, please register here and we will grant you access.
How to get it#
## From the base image run
$ skopeo login ghcr.io
$ export machine=$CONTAINER_HELPER_ARCH
$ export package=simpleswitch-psmqtt
$ export tag=$RELEASE_VERSION
$ container-helper registry-install ghcr.io ghcr.io/avnet-embedded/simpleswitch/${machine}/${package}:${tag}
$ simpleswitch-helper start ${package}
## On your computer run
$ scotty build simpleswitch-psmqtt
## On your computer run
$ bitbake simpleswitch-psmqtt
Custom configuration#
You can apply a custom configuration for the service, by adding a psmqtt config file to /apps/psmqtt/psmqtt.conf
.
Standard configuration#
Out of the box the service will gather and publish the following data every 60 seconds
MQTT topic |
Description |
---|---|
psmqtt/cpu/load/# |
CPU load - subtopic for each core |
psmqtt/cpu/times/guest |
Guest CPU time ++ |
psmqtt/cpu/times/guest_nice |
Guest nice CPU time ++ |
psmqtt/cpu/times/idle |
CPU idle time ++ |
psmqtt/cpu/times/iowait |
IO wait CPU time ++ |
psmqtt/cpu/times/irq |
Interrupt CPU time ++ |
psmqtt/cpu/times/nice |
Nice CPU time ++ |
psmqtt/cpu/times/softirq |
SoftIRQ CPU time ++ |
psmqtt/cpu/times/steal |
Stolen CPU time ++ |
psmqtt/cpu/times/system |
System CPU time ++ |
psmqtt/cpu/times/user |
User CPU time ++ |
psmqtt/disk/usage/apps/free |
Bytes free on SimpleSwitch™ apps partition |
psmqtt/disk/usage/apps/percent |
Used percentage on SimpleSwitch™ apps partition |
psmqtt/disk/usage/apps/total |
Total bytes on SimpleSwitch™ apps partition |
psmqtt/disk/usage/apps/used |
Bytes used on SimpleSwitch™ apps partition |
psmqtt/disk/usage/base/free |
Bytes free on SimpleSwitch™ base image partition |
psmqtt/disk/usage/base/percent |
Used percentage on SimpleSwitch™ base image partition |
psmqtt/disk/usage/base/total |
Total bytes on SimpleSwitch™ base image partition |
psmqtt/disk/usage/base/used |
Bytes used on SimpleSwitch™ base image partition |
psmqtt/memory/percent |
Percentage of RAM used |
psmqtt/net/bytes_recv |
Received network bytes |
psmqtt/net/bytes_send |
Send network bytes |
psmqtt/net/dropin |
Dropped received packets |
psmqtt/net/dropout |
Dropped send packets |
psmqtt/net/errin |
Errornous received packets |
psmqtt/net/errout |
Errornous sent packets |
psmqtt/net/packets_recv |
Received network packets |
psmqtt/net/packets_send |
Send network packets |
psmqtt/sys/boottime |
System startup time in UNIX format |
psmqtt/sys/uptime |
System uptime in seconds |
psmqtt/temperature/# |
Temperature in ° Celsius - subtopic for each sensor found |
++ for more details please refer to this article