Top 10 Linux Commands for Monitoring and Troubleshooting Your System

1. Disk and File System Checks

Objective:

Monitor disk usage and verify file system configurations.

Commands and Steps:

 

  1. View Disk Space Usage:
    • Command: df -h
    • Verify the available and used space in a human-readable format.

 

  1. Check File System Configurations:
    • Command: cat /etc/fstab
    • Ensure all required file systems are configured to mount at boot.

 

  1. Verify Permissions of fstab File:
    • Command: ls -ld /etc/fstab
    • Check permissions to ensure security and avoid unauthorized changes.

2. Network Configuration and Connectivity

Objective:

Validate DNS configurations and network routes.

Commands and Steps:

 

  1. Verify DNS Resolver Permissions:
    • Command: ls -ld /etc/resolv.conf

 

  1. Display DNS Server Configuration:
    • Command: cat /etc/resolv.conf

 

  1. Check Kernel Routing Table:
    • Command: ip route
    • Confirm active routes for network connectivity.

3. System Information

Objective:

Gather details about the system and verify date/time settings.

Commands and Steps:

 

  1. Detailed System Information:
    • Command: uname -a

 

  1. Kernel Version:
    • Command: uname -r

 

  1. Date and Time Verification:
    • Command: date

4. User and Group Configurations

Objective:

Ensure proper permissions and verify user/group details.

Commands and Steps:

 

  1. Check Permissions of Key Files:
    • Command: ls -ld /etc/passwd /etc/group /etc/hosts

 

  1. Display User Accounts:
    • Command: cat /etc/passwd

 

  1. Show Group Definitions:
    • Command: cat /etc/group

 

  1. Verify Host-to-IP Mappings:
    • Command: cat /etc/hosts

5. Scheduled Jobs

Objective:

Verify cron jobs for automation.

Commands and Steps:

 

  1. List Scheduled Cron Jobs:
    • Command: crontab -l

6. Process Monitoring

Objective:

Monitor critical services and processes.

Commands and Steps:

 

  1. Check for Specific Processes:
    • FTP: ps -ef | grep ftp
    • VNC: ps -ef | grep vnc
    • Agents: ps -ef | grep agent
    • Oracle PMON: ps -ef | grep pmon
    • Oracle Listener: ps -ef | grep tns

7. Mail Service Checks

Objective:

Ensure proper functioning of mail services.

Commands and Steps:

 

  1. Verify Postfix Permissions:
    • Command: ls -ld /etc/postfix

 

  1. List Mail Queue Files:
    • Command: ls -ltr /var/spool/postfix

 

  1. Check Postfix Service:
    • Command: ps -ef | grep postfix

 

  1. Audit Mail Directory:
    • Command: ls -ltr /etc/mail/

 

  1. Verify Sendmail Service:
    • Command: ps -ef | grep sendmail

8. Resource Utilization

Objective:

Monitor system resource usage.

Commands and Steps:

 

  1. CPU Details:
    • Command: lscpu

 

  1. Memory Usage in GB:
    • Command: free -g

 

  1. System Limits:
    • Hard Limits: ulimit -aH
    • Soft Limits: ulimit -aS

  2. Default File Permissions Mask:
    • Command: umask

9. Printer Services

Objective:

Monitor printer status and jobs.

Commands and Steps:

 

  1. Check Printer Status:
    • Command: lpstat -a

10. Library Dependencies

Objective:

Verify critical library files.

Commands and Steps:

 

  1. Check File Presence and Permissions:
    • Command: ls -ld /usr/lib/libgtk-x11-2.0.so.0

 

Comments

Popular posts from this blog

How to troubleshoot long running concurrent request in R12.2

How to run Gather Schema Statistics in R12.2

How to compile forms in R12.2