Cortez is a RHEL Sysadmin studying for his LFCS exam.
His objective: Monitor system performance using tools like top, vmstat, sar, and iostat.
Please give Cortez several detailed command examples to help him to master this objective.
Certainly! Here are several command examples that Cortez can use to monitor system performance using various tools:
topis a real-time monitoring tool that provides a dynamic view of system processes. It displays CPU usage, memory utilization, load average, and other important metrics. Cortez can run the following command to launch
topis running, Cortez can press the
1key to view CPU utilization on individual cores, or the
mkey to sort processes by memory usage.
vmstatis a versatile command-line tool that reports virtual memory statistics, including system-wide performance metrics. Cortez can use the following command to run
vmstatand get an overview of system performance:
This command provides a summary of various memory-related statistics, such as total memory, free memory, swap usage, and more.
sar(System Activity Reporter) is a command-line utility that collects and reports system activity data over time. Cortez can use it to monitor CPU usage, disk activity, memory utilization, and other metrics. To generate a CPU usage report with
sar, Cortez can run:
This command displays CPU statistics such as user time, system time, and idle time. Cortez can specify an interval and count to control the frequency and duration of data collection, e.g.,
sar -u 5 10for data every 5 seconds for a total of 10 iterations.
iostatis a command-line tool that provides I/O statistics for devices and partitions. It is useful for monitoring disk I/O performance. Cortez can use the following command to check disk activity:
This command displays statistics for each device, including transfer rate, read/write operations per second, and average I/O wait time.
These commands will help Cortez monitor system performance using tools like
iostat. Remember to explore their respective man pages (
man iostat) for a more comprehensive list of available options and detailed explanations of the output. Good luck with your LFCS exam, Cortez!