New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mqtt-os-status

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mqtt-os-status

Publishes OS status to an mqtt broker

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

MQTT OS Status

Operating-system related data, published to an MQTT broker at fixed intervals.

Example output

$  mosquitto_sub -h 192.168.1.5 -t "+/os/#" -v
pi1/os {"hostname":"jeeves","type":"Linux","endianness":"LE","platform":"linux","arch":"arm","release":"3.10.25+"}
pi1/os/uptime 142.2680236
pi1/os/loadavg [1.07421875,0.68212890625,0.271484375]
pi1/os/mem {"totalmem":508874752,"freemem":396210176}
pi1/os/cpus [{"model":"unknown","speed":700,"times":{"user":373600,"nice":0,"sys":203500,"idle":547300,"irq":3700}}]
pi1/os/networkInterfaces {"lo":[{"address":"127.0.0.1","family":"IPv4","internal":true}],"eth0":[{"address":"192.168.1.5","family":"IPv4","internal":false}]}

Install as a service on Raspberry Pi

These instructions are for Raspbian on Raspberry Pi but could easily be adapted to most Linux distributions.

Source

Install forever.js

npm install -g forever

Install this module

npm install -g mqtt-os-status

Copy the sample etc/init.d/mqtt-os-status file to /etc/init.d and make it executable. Adjust the directory of your node.js installation if necessary.

sudo su
cp /home/pi/node-v0.10.2-linux-arm-pi/lib/node_modules/mqtt-os-status/etc/init.d/mqtt-os-status /etc/init.d/mqtt-os-status
chmod a+x /etc/init.d/mqtt-os-status

Edit the node binary paths, app paths, username and password, and optional adjustments to topic root and update inteval in the script as necessary

After putting the script in place, you should update the system service definitions:

update-rc.d mqtt-os-status defaults

Run or check on the script and its process with the following commands:

service mqtt-os-status start
service mqtt-os-status status
service mqtt-os-status restart
service mqtt-os-status stop

Keywords

FAQs

Package last updated on 07 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc