From d386f6044c435db97ca03617e8da12536cc2cc11 Mon Sep 17 00:00:00 2001 From: Hugh Ratsch Date: Thu, 20 Feb 2025 09:01:32 -0600 Subject: [PATCH] updated notes --- src/rhcsa.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/rhcsa.md b/src/rhcsa.md index 71317c8..5a4ba29 100644 --- a/src/rhcsa.md +++ b/src/rhcsa.md @@ -839,3 +839,51 @@ logger -p local0.info "This is a test message" # Log a message to the local0.inf sudo tail /var/log/messages # Display the messages ``` + +## Troubleshoot RHEL Systems + +### Troubleshooting Capacity Problems +```bash +### df +sudo df -h # Display the disk space usage +sudo df -i # Display the inode usage +sudo df -T # Display the filesystem type + +### dd +sudo dd if=/dev/zero of=/dev/sda1 bs=1M count=100 # Create a 100MB file on the /dev/sda1 partition +sudo dd if=/dev/zero of=/dev/sda1 bs=1M count=100 status=progress # Create a 100MB file on the /dev/sda1 partition with progress + +### du +sudo du -hs /home/user1 # Display the disk space usage of the /home/user1 directory +sudo du -h file.txt # Display the disk space usage of the file.txt file +``` + +### Troubleshooting CPU Issues +```bash +### uptime +sudo uptime # Display the uptime of the system + +### lscpu +sudo lscpu # Display the CPU information + +### stress test cpu with stress-ng +sudo stress-ng --cpu 2 --timeout 10s # Stress test the CPU for 10 seconds + +### vmstat +sudo vmstat 1 5 # Display the VM statistics every 1 second for 5 seconds + +### top +sudo top # Display the top processes +``` + +### Troubleshooting Memory Issues +```bash +### free +sudo free -h # Display the memory usage + +### vmstat +sudo vmstat 1 5 # Display the VM statistics every 1 second for 5 seconds + +### top +sudo top # Display the top processes then press m to sort by memory +```