micromonitor
micromonitor is a fast linux command line tool that outputs a number of metrics from your OS in plain text or json format.
How to use
TODO
Metrics
-
Info
-
Version
-
Collect date
-
Execution time
-
uname report
-
Metric count (TODO)
-
System
-
Uptime
-
Idle time
-
CPU
-
Load: 1 min, 5 min, 15 min
-
Tasks: total, running, sleeping, stopped, zombie
-
State: user, system, nice, idle, IO wait, hardware interrupts, software interrupts, steal
-
Memory
-
Physical: total, used, free, shared, buffers, cached
-
Swap: total, used, free
-
Partitions
-
Device, mount point, type
-
Space: total, used, free
-
Inodes: total, used, free
-
Network (TODO)
-
hostname
-
inet/inet6 addr
-
RX: bytes, packets, errors, dropped, overrun, mcast
-
TX: bytes, packets, errors, dropped, carrier, collsns
-
Processes (TODO)
-
TODO
Commands
List of commands used. Your OS must support these tools in order to micromonitor to work.
Info:
uname -a
System:
cat /proc/uptime
CPU:
top -bn 1 | head -n 3
Memory:
free -b
Partitions:
df -T -x tmpfs -x rootfs -x devtmpfs --block-size=1
df -i
cat /proc/sys/fs/file-nr (TODO)
Network:
hostname
ip -s link
ip -s addr (TOOO) (inet/inet6)
Process:
TODO ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
Output
Output example in plain text.
Version 0.0.5
Collect date 2015-02-28T00:24:32.000Z
Execution time 753
uname Linux raspberrypi 3.12.32+ #721 PREEMPT Fri Nov 7 16:50:31 GMT 2014 armv6l GNU/Linux
Uptime 7h 39m 40s
Idle time 6h 56m 2s
CPU 1min load 0.32
CPU 5min load 0.28
CPU 15min load 0.36
Total tasks 73
Running tasks 2
Sleeping tasks 71
Stopped tasks 0
Zombie tasks 0
CPU % user 4.59 %
CPU % system 1.7 %
CPU % nice 0 %
CPU % idle 90.5 %
CPU % IO wait 3.1 %
CPU % hardware interrupts 0 %
CPU % software interrupts 0.2 %
CPU % steal 0 %
Total physical memory 484 MiB
Used physical memory 471 MiB (97.26 %)
Free physical memory 13 MiB (2.73 %)
Shared physical memory 0 B (0 %)
Buffers physical memory 51 MiB (10.57 %)
Cached physical memory 342 MiB (70.71 %)
Total swap 99 MiB
Used swap 0 B (0 %)
Free swap 99 MiB (100 %)
/ total 14909 MiB
/ used 3090 MiB (20.72 %)
/ free 11169 MiB (74.91 %)
/ inodes total 957712
/ inodes used 93557 (9.76 %)
/ inodes free 864155 (90.23 %)
/media/MyBook2 total 1877634 MiB
/media/MyBook2 used 103848 MiB (5.53 %)
/media/MyBook2 free 1678385 MiB (89.38 %)
/media/MyBook2 inodes total 122093568
/media/MyBook2 inodes used 1235 (0 %)
/media/MyBook2 inodes free 122092333 (99.99 %)
/boot total 55 MiB
/boot used 14 MiB (25.7 %)
/boot free 41 MiB (74.29 %)
/boot inodes total 0
/boot inodes used 0
/boot inodes free 0
Hostname raspberrypi
lo receive bytes 6 KiB
lo receive packets 114
lo receive errors 0
lo receive dropped 0
lo receive overrun 0
lo receive multicast 0
lo transmit bytes 6 KiB
lo transmit packets 114
lo transmit errors 0
lo transmit dropped 0
lo transmit carrier 0
lo transmit collisions 0
eth0 receive bytes 186 MiB
eth0 receive packets 351131
eth0 receive errors 0
eth0 receive dropped 0
eth0 receive overrun 0
eth0 receive multicast 0
eth0 transmit bytes 262 MiB
eth0 transmit packets 402326
eth0 transmit errors 0
eth0 transmit dropped 0
eth0 transmit carrier 0
eth0 transmit collisions 0
Output example in json format.