There are plenty of command line and graphical monitoring tools exists to view system statistics in Linux and Unix operating systems. The most popular and most widely used tool is top. There are also a few good alternatives available to top. Using top and top-like programs, we can get the system summary information as well as a list of processes or threads currently being managed by the Linux kernel. Today, we will see yet another command line utility named Saidar.
What is Saider?
Saidar is a simple, curses-based tool for viewing Linux system statistics and resource usage in real-time. It is part of libstatgrab library that can be used to access key system statistics including CPU, processes, load, memory, swap, network I/O, disk I/O, and file system information.
Saider is written in C and tested in GNU/Linux and various Unix-like distributions such as FreeBSD, NetBSD, OpenBSD, Solaris, DragonFly BSD, HP-UX and AIX.
Install Saidar in Linux
Saidar is available in the default repositories of popular Linux distributions.
To install Saidar on Debian, Ubuntu and its derivatives, run:
$ sudo apt install saidar
Saidar is available in EPEL repository for RHEL and its clones like CentOS, AlmaLinux, and Rocky Linux. Enable EPEL repository using command:
$ sudo dnf install epel-release
Then install Saidar with command:
$ sudo dnf install saidar
$ sudo dnf install saidar
$ sudo zypper install saidar
View Linux System Statistics With Saidar
To view the current system statistics with Saidar in Linux, simply run:
Hostname : ostechnix Uptime : 05:58:30 Date : 2020-09-15 17:10:46 Load 1 : 0.65 CPU Idle : 97.14% Running : 51 Zombie : 0 Load 5 : 0.63 CPU System: 0.75% Sleeping : 222 Total : 277 Load 15 : 0.67 CPU User : 8.68% Stopped : 2 No. Users : 1 Mem Total : 7869M Swap Total: 2047M Mem Used : 39.65% Paging in : 0 Mem Used : 3120M Swap Used : 0B Swap Used : 0.00% Paging out: 0 Mem Free : 4749M Swap Free : 2047M Total Used: 31.46% Disk Name Read Write Network Interface rx tx loop0 0B 0B tap-d8f1eebb39f 0B 0B loop1 0B 0B mpqemubr0 0B 0B loop2 0B 0B virbr0 0B 0B loop3 0B 0B wlp9s0 86B 57B loop4 0B 0B enp5s0 0B 0B loop5 0B 0B mpqemubr0-dummy 0B 0B loop6 0B 0B lo 0B 0B loop7 0B 0B virbr0-nic 0B 0B sda 0B 28672B sda1 0B 28672B Mount Point Free Used sr0 0B 0B /sys 0B - sdb 0B 0B /proc 0B - loop8 0B 0B /dev 3890M 0.00% loop9 0B 0B /dev/pts 0B - loop10 0B 0B /run 785M 0.24% loop11 0B 0B / 44051M 90.09% loop12 0B 0B /sys/kernel/securit 0B - loop13 0B 0B /dev/shm 3487M 11.36% loop14 0B 0B /run/lock 5116K 0.08% loop15 0B 0B /sys/fs/cgroup 3934M 0.00% loop16 0B 0B /sys/fs/cgroup/unif 0B - loop17 0B 0B /sys/fs/cgroup/syst 0B - loop18 0B 0B /sys/fs/pstore 0B - loop19 0B 0B /sys/fs/bpf 0B - loop20 0B 0B /sys/fs/cgroup/pids 0B - loop21 0B 0BTotal /sys/fs/cgroup/cpu, 0B - /sys/fs/cgroup/memo 0B -/sys/fs/cgroup/net_ 0B -/sys/fs/cgroup/perf 0B -/sys/fs/cgroup/devi 0B
As you can see in the above output, the top row shows the folowing details:
- Linux system's hostname,
- total uptime
- and the current date and time.
The second row displays the CPU usage statistics such as,
- CPU load,
- total number of processes,
- total no of currently running/sleeping/stopped/zombie processes,
- and total number of logged-in users.
The third row displays the memory usage details such as,
- total memory,
- how much memory is currently being used,
- and how much memory is free.
- swap usage (total, used and free)
- paging in and out.
All the memory usage details are shown in MB.
The fourth column shows the hard disk, network and file system details such as,
- disk partitions,
- loopback devices,
- Disk I/O speed,
- no of available network interface cards,
- network I/O,
- system mount points,
- total percentage of free and used disk space by each file system.
Just like top command, Saidar will keep running and monitoring the system resources until you manually exit it by pressing
Display system statistics in colour
To enable coloured output, use
$ saidar -c
Change refresh interval
By default, Saidar updates the statistics every 3 seconds. You can change this refresh delay interval with
$ saidar -d 5
Here, I have set 5 seconds as refresh interval. Meaning - Saidar will update the statistics every 5 seconds.
You can even combine the parameters to get a desired output.
$ saidar -c -d 2
As per the above example, Saidar will output system statistics in colour and update the stats every 2 seconds.
To display Saidar help section, run:
$ saidar -h
Usage: saidar [-d delay] [-c] [-v] [-h] -d Sets the update time in seconds -c Enables coloured output -v Prints version number -h Displays this help information. Report bugs to <https://libstatgrab.org/issues>.
Saidar is just a simple, light-weight monitoring utility to get the basic system resource details. It does the job just fine. However, if you want to know insights of everything happening on a Linux system in real-time, you should consider using Netdata and Doppler.
Featured image by Lorenzo from Pexels.