Podcast
Questions and Answers
What command is used to display active processes as well as CPU and memory usage in real-time?
What command is used to display active processes as well as CPU and memory usage in real-time?
- `top` (correct)
- `mpstat`
- `uptime`
- `free`
Which of the following is the primary purpose of system monitoring?
Which of the following is the primary purpose of system monitoring?
- To encrypt all network traffic.
- To automatically update the operating system.
- To identify bottlenecks, optimize performance, and troubleshoot issues. (correct)
- To predict future hardware failures.
In the top
command, what key is pressed to terminate a process?
In the top
command, what key is pressed to terminate a process?
- k (correct)
- r
- e
- q
Which of the following commands provides a better visual representation of system resource usage compared to top
?
Which of the following commands provides a better visual representation of system resource usage compared to top
?
The mpstat
command is part of which package?
The mpstat
command is part of which package?
What does the uptime
command primarily display?
What does the uptime
command primarily display?
Which command is used to check RAM (memory) and swap usage?
Which command is used to check RAM (memory) and swap usage?
Which command gives a detailed overview of system performance including CPU, memory, swap, disk and process activity?
Which command gives a detailed overview of system performance including CPU, memory, swap, disk and process activity?
You suspect that a particular directory is consuming excessive disk space. Which command would you use to investigate?
You suspect that a particular directory is consuming excessive disk space. Which command would you use to investigate?
What is the primary function of the df
command?
What is the primary function of the df
command?
To identify disk read/write bottlenecks, which command would be most appropriate?
To identify disk read/write bottlenecks, which command would be most appropriate?
Which command is used to display active network connections, routing tables and interface statistics?
Which command is used to display active network connections, routing tables and interface statistics?
Which command is considered a faster and more efficient alternative to netstat
for displaying network socket information?
Which command is considered a faster and more efficient alternative to netstat
for displaying network socket information?
If you want to monitor the bandwidth usage on a specific network interface in real-time, which tool should you use?
If you want to monitor the bandwidth usage on a specific network interface in real-time, which tool should you use?
Which command is best suited for displaying the bandwidth usage per process?
Which command is best suited for displaying the bandwidth usage per process?
What is the primary purpose of the journalctl
command?
What is the primary purpose of the journalctl
command?
Which command is used to continuously monitor log files in real-time?
Which command is used to continuously monitor log files in real-time?
To monitor new entries to syslog which command would you use:
To monitor new entries to syslog which command would you use:
After noticing slow system performance, which of the following tools would provide the most comprehensive overview to start diagnosing the issue?
After noticing slow system performance, which of the following tools would provide the most comprehensive overview to start diagnosing the issue?
A web server is experiencing high traffic. You need to identify which processes are consuming the most network bandwidth. Which command would be most suitable for this task?
A web server is experiencing high traffic. You need to identify which processes are consuming the most network bandwidth. Which command would be most suitable for this task?
Flashcards
System Monitoring Purpose
System Monitoring Purpose
Identifies bottlenecks, optimizes performance, and troubleshoots issues in a system.
top command
top command
Displays active processes, CPU, and memory usage in real-time.
htop command
htop command
Provides a better visual representation of system resrouce usage.
mpstat command
mpstat command
Signup and view all the flashcards
uptime command
uptime command
Signup and view all the flashcards
free command
free command
Signup and view all the flashcards
vmstat command
vmstat command
Signup and view all the flashcards
df command
df command
Signup and view all the flashcards
du command
du command
Signup and view all the flashcards
iostat command
iostat command
Signup and view all the flashcards
netstat command
netstat command
Signup and view all the flashcards
ss command
ss command
Signup and view all the flashcards
iftop command
iftop command
Signup and view all the flashcards
nethogs command
nethogs command
Signup and view all the flashcards
journalctl
journalctl
Signup and view all the flashcards
tail -f command
tail -f command
Signup and view all the flashcards
Study Notes
- System monitoring helps with identifying bottlenecks, optimizing performance, and troubleshooting issues.
Monitoring CPU Usage
- The
top
command is used for real-time process monitoring. - It displays active processes, CPU, and memory usage.
- Press "q" to exit, "k" to kill a process, and "r" to renice a process in
top
. - The command
htop
provides a better visual representation of system resource usage. - Install
htop
withsudo apt install htop
. - The
mpstat
command is part of thesysstat
package. mpstat
is used to monitor CPU usage per core in real-time.- Use
mpstat -P ALL 1
to view all CPU cores. - The
uptime
command provides a quick summary of how long the system has been running and its load average.
Monitoring Memory Usage
- The
free
command displays memory statistics. free
checks the RAM (memory) and swap usage on a Linux system.- Use
free -m
for output in megabytes.
System Performance Overview
- The command
vmstat
(Virtual Memory Statistics) provides a detailed overview of system performance. - This includes CPU, memory, swap, disk, and process activity.
- Use
vmstat 2 5
to update every 2 seconds, 5 times.
Monitoring Disk Usage
- The
df
(Disk Filesystem) command displays the disk space usage on Ubuntu. - Command
df -h
shows disk usage in human readable format. - Command
df -h /home
shows disk usage for the/home
directory.
Directory Disk Usage
- The
du
(Disk Usage) command checks how much disk space directories and files are consuming. - Command
du -sh /home
shows the total disk usage for/home
in summary format. - Command
du -h /home
shows disk usage for/home
in human readable format. - Command
du -ah /home | sort -rh | head -10
lists the 10 largest files/directories in/home
.
Disk I/O Statistics
- The
iostat
command monitors disk performance. iostat
helps analyze disk read/write speeds, utilization, and performance bottlenecks.- Command
iostat -dx 1
shows detailed disk I/O statistics, updating every 1 second.
Monitoring Network Usage
- The
netstat
(Network Statistics) command displays active network connections, routing tables, and interface statistics and more. - The option
netstat -tulnp
shows listening ports.
Monitoring Socket Statistics
- The
ss
command (Socket Statistics) is a faster and more efficient alternative tonetstat
for displaying network socket information. - Use
ss -tulnp
to show listening ports.
Real-time Network Bandwidth Monitoring
- The
iftop
is a real-time network monitoring tool. iftop
shows bandwidth usage on an interface by monitoring the traffic between hosts.- Use
sudo iftop
to run command.
Per Process Bandwidth Usage
nethogs
is also a real-time network monitoring toolnethogs
displays the bandwidth usage per process.- Use
sudo nethogs
to run the command.
Monitoring Logs
journalctl
is the command-line utility used to query and view logs stored in the systemd journal.- Use the command
journalctl -xe
to show logs with explanations and extra details.
Live System Log Monitoring
tail -f
is a command used to continuously monitor log files in real time.tail -f
allows for watching new log entries as they are added.- Command
tail -f /var/log/syslog
monitors the system log file continuously.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.