https://github.com/lambda-zhang/systemmonitor
systemmonitor
https://github.com/lambda-zhang/systemmonitor
golang linux orangepi raspberrypi system-monitor
Last synced: 10 months ago
JSON representation
systemmonitor
- Host: GitHub
- URL: https://github.com/lambda-zhang/systemmonitor
- Owner: lambda-zhang
- License: mit
- Created: 2019-01-20T17:33:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-14T08:25:04.000Z (over 4 years ago)
- Last Synced: 2025-02-09T02:44:34.261Z (12 months ago)
- Topics: golang, linux, orangepi, raspberrypi, system-monitor
- Language: Go
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# systemmonitor Quickstart Guide
---
systemmonitor是go语言编写的“系统资源监视器”,监视的资源包括:系统信息、CPU使用、内存使用、网络、硬盘IO、主板温度
用法可以参考[这个简单的web项目](https://github.com/lambda-zhang/systemmonitor-web)
注意: 目前只支持linux
# how to run example
---
```
$ go get -u -v github.com/lambda-zhang/systemmonitor
$ cd $GOPATH/src/github.com/lambda-zhang/systemmonitor
$ go run example/test_monitor.go
###############################################
os:
StartTime=2019-02-16 08:46:40 +0800 CST Arch=amd64 Os=linux KernelVersion=Linux-4.4.0-131-generic KernelHostname=lambda-Lenovo NumCpu=8 UpTime=36701 UsePermillage=35‰
cpu:
Cpu_permillage=27‰ Avg1min=0.840000
memory:
MemTotal=16779108352 MemUsePermillage=228‰ SwapTotal=2046816256 SwapUsePermillage=0‰
net:
eth1: inKBps=0 outKBps=0
eth0: inKBps=0 outKBps=0
total TcpConnections=91 ESTABLISHED=42 TCP_LISTEN=34
disk:
sda7 FsVfstype=TODO BytesAll=257588736000 BytesUsedPermillage=822‰ ReadBytes=0KBps WriteBytes=124KBps ReadRequests=0qps WriteRequests=2qps
sda2 FsVfstype=ext4 BytesAll=105192407040 BytesUsedPermillage=825‰ ReadBytes=0KBps WriteBytes=0KBps ReadRequests=0qps WriteRequests=0qps
sda5 FsVfstype=ext4 BytesAll=126692069376 BytesUsedPermillage=932‰ ReadBytes=0KBps WriteBytes=0KBps ReadRequests=0qps WriteRequests=0qps
thermal:
acpitz0 = 27800
acpitz1 = 29800
x86_pkg_temp2 = 34000
```