Linux: System Monitor Tool for CLI

This article will describe about system monitor tool for CLI like server machine which does have no GUI environment. Interval of monitoring is 10 seconds. I like glances.

Table of Contents

1 top

  • Most of Linux distribution have top command. The busybox which is used by embedded system has top command.
  • Pressing m key shows graphical memory usage.
$ top -d 10

0001_top.png

2 htop

  • htop can specified more shorter period than top (100msec).
  • CPU usage for each core.
$ htop -d 100 # 100 x 100msec = 10sec.

0002_htop.png

Userland thread is displayed by default. hide_userland_threads=1 will turn off userland thread.

$ mkdir -p ${HOME}/.config/htop/
$ echo "hide_userland_threads=1" >> ${HOME}/.htoprc
$ htop
$ # After terminating, config will be written to ${HOME}/.config/htop/htoprc.

3 glances

  • Network, disk IO and file system usage.
  • Color of string will be changed by usage.
  • Log for high load average is displayed at the bottom.
$ glances -t 10

0003_glances.png