3 Basic Commands and Simple Shell Scripts Once you have your first Red Hat Enterprise Linux rhel



Download 1.85 Mb.
View original pdf
Page47/67
Date26.02.2024
Size1.85 Mb.
#63678
1   ...   43   44   45   46   47   48   49   50   ...   67
Pablo Iranzo Gómez, Pedro Ibáñez Requena, Miguel Pérez Colino, Scott McCarty - Red Hat Enterprise Linux 9 Administration-Packt Publishing (2022) -chap 3 82 - 180
Other monitoring tools
For monitoring network resources, we can check the packages that are sent/received for each card via ifconfig (installed via the net-tools package, for example, and match the values that are received for transmitted packages, received packages, errors, and so on.
When the goal is to perform more complete monitoring, we should ensure that the sysstat package is installed. It includes some interactive tools such as iostat, which can be used to check disk performance, but the most important thing is that it also sets up a job that will collect system performance data on a periodical basis (the default is every 10 minutes. This will be stored in /
var/log/sa/.
Historical data that’s recorded and stored per day (##) at /var/log/sa/sa## and /var/log/
sa/sar## can be queried so that we can compare it against other days. By running the data collector which is executed by a systemd timer) with a higher frequency, we can increase the granularity for specific periods while an issue is being investigated.
However, it appears the sar file is showing lots of data, as we can see here:
Figure 4.9 – Contents of /var/log/sar02 on the example system

Checking for free resources – memory and disk (free and df Here, instead of seeing sda, we might see references to devices such as 8-0. In this case, the device’s name is using the values for the major/minor, which we can check in the /dev/ folder. We can see this by running ls -l /dev/*|grep 8, as shown in the following screenshot:
Figure 4.10 – Directory listing for /dev/ for locating the device corresponding to major 8 and minor Here, we can see that this corresponds to the full hard-drive statistics at /dev/sda.
Tip
Processing the data via saris a good way to get insights into what’s going on with our system, but since the sysstat package has been around fora longtime in Linux, there are tools such as sarstats (https://github.com/mbaldessari/sarstats) that help us process the data that’s recorded and present it graphically as ab Portable Document File
(PDF) file.
In the following screenshot, we can seethe system service times for the different drives, along with a label at the time the system crashes. This helps us identify the system’s activity at that point:

Tools for Regular Operations
128
Figure 4.11 – sarstats graphics for the disk service’s time in the example PDF at https://acksyn.org/software/sarstats/sar01.pdf
Modern tooling for monitoring the system’s resources has evolved, and Performance Co-Pilot (pcp and, optionally, the pcp-gui package) can beset up for more powerful options. Just bear in mind that pcp requires us to also start the data collector on the system.
RHEL 9 also includes Cockpit, which is installed by default when we do a server installation. This package provides a set of tools that enable web management for the system, and it can also be made part of other products via plugins that extend its functionality.
The web service provided by Cockpit can be reached at your host IP at port 9090, so you should access https://localhost:9090 to get a login screen so that we can use our system credentials to log in.

Checking for free resources – memory and disk (free and df )
129

Download 1.85 Mb.

Share with your friends:
1   ...   43   44   45   46   47   48   49   50   ...   67




The database is protected by copyright ©ininet.org 2024
send message

    Main page