Install and Use Sysdig on Rocky Linux 8

In this guide, we want to teach you to Install and Use Sysdig on Rocky Linux 8.

Sysdig is open source, system-level exploration: capture system state and activity from a running Linux instance, then save, filter, and analyze. Sysdig is scriptable in Lua and includes a command line interface and a powerful interactive UI, cystic, that runs in your terminal. 

How To Install and Use Sysdig on Rocky Linux 8

To install Sysdig, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide the Initial Server Setup with Rocky Linux 8.

Now follow the steps below to complete this guide.

Installing Sysdig Tool on Rocky Linux 8

First, you must update your local package index with the following command:

sudo dnf update -y

Then, add the yum repository on your server with the following commands:

# sudo rpm --import https://download.sysdig.com/DRAIOS-GPG-KEY.public
# sudo curl -s -o /etc/yum.repos.d/draios.repo http://download.sysdig.com/stable/rpm/draios.repo

Next, install the Epel repository on your server:

sudo dnf install epel-release

Now use the following command to install the Sysdig tool on your server:

sudo dnf -y install sysdig

When your installation is completed, verify it by checking the Sysdig version installed on Rocky Linux 8:

sysdig --version
Output
sysdig version 0.29.3

Use Sysdig Commands on Rocky Linux 8

At this point, you start using Sysdig monitoring software.

Note: You need to run sysdig as root because it requires access to critical areas such as /proc file system, /dev/sysdig* devices and needs to auto-load the sysdig-probe kernel module.

To do this, run the following command:

sudo csysdig
Sysdig command
Sysdig command

The output includes the following lines:

PID: Process PID.
CPU: Amount of CPU used by the process.
TH: Number of threads that the process contains.
VIRT: Total virtual memory for the process.
RES: Resident non-swapped memory for the process.
FILE: Total (input+output) file I/O bandwidth generated by the process, in bytes per second.
NET: Total (input+output) network I/O bandwidth generated by the process, in bytes per second.
Command: The full command line of the process

You can press the F2 button to change the view for future reference.

Also, you can use arrow keys to move around to select an option you would like to monitor. 

To return to the previous menu selection, use the F2 button key. From here, you can select quite an extensive list.

Let’s see some more examples of the Sysdig tool on Rocky Linux 8.

To see the top processes ranked by CPU utilization percentage, you can run the following command:

sudo sysdig -c topprocs_cpu

To see the system’s network connections, you can run the command below:

sudo sysdig -c netstat

Also, you can list all system processes by running the command below:

sudo sysdig -c ps

Conclusion

At this point, you learn to Install and Use Sysdig on Rocky Linux 8.

Hope you enjoy using it.

Please subscribe to us on Facebook and Twitter.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

POPULAR TAGS

Most Popular