updated notes
This commit is contained in:
@@ -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
|
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
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user