選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
17607550577 a80cdcf8f6 修改makefile 4年前
Makefile 修改makefile 4年前
readme.md 添加另一个获取cpu温度的文件路径 4年前
server-monitor first commit 4年前
server-monitor.c 修改makefile 4年前

readme.md

sever-monitor v1.0

mqtt服务器默认端口:127.0.0.1:1883

主题:server-status,5秒钟采集一次发送到服务器

以上都是默认配置可自己修改源码

  • 通过C语言实现的采集内存、cpu使用情况、cpu温度、硬盘温度。

  • cpu温度通过读取liux内核伪文件获得:“/sys/class/hwmon/hwmon1/temp3_input”或者 “/sys/class/therma/temp”。

  • 硬盘温度通过通过Smartmontools api获取。

  • CPU使用率通过读取linux内核伪文件计算获得:”/proc/stat”。

  • 内存使用率通过读取linux内核伪文件计算获得:”/proc/meminfo”。

需要安装的依赖:mosquitto客户端、emqx或mosquitto服务器、Smartmontools ,测试基于centos7.9

运行效果

  • shell启动命令

Usage: sever-monitor /dev/sda

源码地址: http://gitea.huangyulong-iot.com/private/server-monitor.git

Web体验地址: http://nodeui.huangyulong-iot.com/