RHCSA Red Hat Enterprise Linux 10: Training and Exam Preparation Guide (EX200), Fourth Edition
ISBN: 978-1775062189 ASIN:
HIGHLIGHTS:
ISBN: 978-1775062189 ASIN:
HIGHLIGHTS:
https://www.redhat.com/en/services/training/ex200-red-hat-certified-system-administrator-rhcsa-exam
The Red Hat Certified System Administrator (RHCSA) exam (EX200) is a performance-based test conducted on a live system running Red Hat Enterprise Linux 10. Your exam environment will consist of two RHEL 10 virtual machines where you will perform all tasks. This is a closed-book exam; no external resources, including the internet, personal devices, or printed materials, are permitted. Access is limited to documentation and manual pages installed on the exam VMs.
The official exam objectives (62 in total as of this writing) are the definitive source for exam content and are subject to change. For the most current list, always refer to:
http://www.redhat.com/training/courses/ex200/examobjective
There are no formal prerequisites to attempt the RHCSA certification.
This book provides comprehensive coverage of all official exam objectives. The following list enumerates each objective and directs you to the corresponding chapter for detailed study.
Understand and Use Essential Tools
Manage Software
Create Simple Shell Scripts
Operate Running Systems
Configure Local Storage
Create and Configure File Systems
Deploy, Configure, and Maintain Systems
Manage Basic Networking
Manage Users and Groups
Manage Security
A system can have hundreds or thousands of processes running concurrently, depending on its purpose. You can view and monitor these processes using various native tools such as ps (process status) and top (table of processes). The ps command offers plentiful switches that influence its output, whereas top is used for real-time viewing and monitoring of processes and system resources.
Without options, the ps command lists only the processes associated with the current terminal session:
The above output returns the elementary information about processes in four columns. These processes are tied to the current terminal window. It exhibits the PID, the terminal (TTY) where the process was spawned, the cumulative time (TIME) the system CPU has given to the process, and the name of the actual command or program (CMD) being executed.
Some common options that can be used with the ps command to generate detailed reports include -e (every), -f (full-format), -F (extra full-format), and -l (long format). A combination of -e, -F, and -l (ps -eFl) produces a comprehensive process report, though this level of detail may be unnecessary for most situations. Other common options such as –forest and -x will report the output in tree-like hierarchy and include the daemon processes as well. Check the manual pages for the command for additional options and their usage.
Here are a few sample lines from the beginning and end of the output when ps is executed with -e and -f flags on the system.
This output is displayed across eight columns showing details about every process running on the system. Table 9-1 describes the content type of each column.
| Column | Description |
| UID | User ID or name of the process owner |
| PID | Process ID of the process |
| PPID | Process ID of the parent process |
| C | Processor utilization |
| STIME | Process start time (date if process started over 24 hours ago) |
| TTY | Controlling terminal. “pts“ indicates pseudo terminal, “tty” indicates physical terminal, “?” represents no controlling terminal (daemon processes), and “Console” represents the graphical console. |
| TIME | Aggregated execution time for a process |
| CMD | The command or program name |
Table 9-1 ps Command Output Description
The ps output above pinpoints several daemon processes running in the background. These processes are not associated with any terminal, which is why there is a ? in the TTY column. Notice the PID and PPID numbers. The smaller the number, the earlier it is started. The process with PID 0 is started first at system boot, followed by the process with PID 1, and so on. Each PID has an associated PPID in column 3. The owner of each process is exposed in the UID column along with the name of the command or program under CMD.
Information for each running process is recorded and maintained in the /proc file system, which ps and many other commands reference to acquire desired data for viewing.
The ps command output may be customized to view only the desired columns. For instance, if you want to produce an output with the command name in column 1, PID in column 2, PPID in column 3, and owner name in column 4, run it as follows:
Make sure the -o option is specified for a user-defined format and there is no white space before or after the column names. You can add or remove columns and switch their positions as needed.
Another switch to look at with the ps command is -C (command list). This option is used to list only those processes that match the specified command name. For example, run it to check how many sshd processes are currently running on the system:
The output exhibits multiple background sshd processes.
The other popular tool for viewing process information is the top command. This command displays real time, continuously updated statistics, which can help identify performance issues on the system. A sample of a running top session is shown below:
Press q to quit.
The top output may be divided into two major portions: the summary portion and the tasks portion. The summary area spreads over the first five lines of the output, and it shows the information as follows:
Line 1: Indicates the system uptime, number of users logged in, and system load averages over the period of 1, 5, and 15 minutes. See the description for the uptime command output in Chapter 02 “Initial System Interaction”.
Line 2: Displays the task (or process) information, which includes the total number of tasks running on the system and how many of them are in running, sleeping, stopped, and zombie states.
Line 3: Shows CPU utilization percentages: us (user processes), sy (system processes), id (idle), wa (I/O wait), hi (hardware interrupts), si (software interrupts), and st (steal time).
Line 4: Shows memory usage: total physical memory, free memory, used memory, and memory used for buffers and cache.
Line 5: Exhibits swap (virtual memory) usage that includes the total amount of swap allocated to the system, and how much of it is free and in use. The “avail Mem” shows an estimate of the amount of memory available for starting new processes without using the swap.
The second major portion in the top command output showcases the details for each process in 12 columns as described below:
Columns 1 and 2: Pinpoint the process identifier (PID) and owner (USER)
Columns 3 and 4: Display the process priority (PR) and nice value (NI)
Columns 5 and 6: Depict amounts of virtual memory (VIRT) and non-swapped resident memory (RES) in use
Column 7: Shows the amount of shared memory used by the process (SHR)
Column 8: Represents the process status (S)
Columns 9 and 10: Express the CPU (%CPU) and memory (%MEM) utilization
Column 11: Exhibits total CPU time used by the process (TIME+)
Column 12: Identifies the process name (COMMAND)
While in top, you can press “o” to re-sequence the process list, “f” to add or remove fields, “F” to select the field to sort on, and “h” to obtain help. top is highly customizable. See the command’s manual pages for details.
While ps and top show detailed process information, the pidof and pgrep commands are used to quickly find the PID of a specific process. These commands have switches to modify their behavior; however, their most elementary use is to pass a process name as an argument to view its PID. For instance, to list the PID of the rsyslogd daemon, use either of the following:
Both commands produce an identical result if used without an option.
A process can be listed by its owning user or owning group. You can use the ps command for this purpose. For example, to list all processes owned by user1, specify the -U (or -u) option with the command and then the username:
The command lists the PID, TTY, TIME, and CMD name for all the processes owned by user1. You can specify the -G (or -g) option instead and the name of an owning group to print processes associated with that group only:
The above output reveals all the running processes with root as their owning group.
No errors are reported