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.
2.
Check File System Configurations:
Command: cat /etc/fstab
Ensure all required file systems are configured to mount at
boot.
3.
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
2.
Display DNS Server Configuration:
Command: cat /etc/resolv.conf
3.
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
2.
Kernel Version:
Command: uname -r
3.
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
2.
Display User Accounts:
Command: cat /etc/passwd
3.
Show Group Definitions:
Command: cat /etc/group
4.
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
2.
List Mail Queue Files:
Command: ls -ltr /var/spool/postfix
3.
Check Postfix Service:
Command: ps -ef | grep postfix
4.
Audit Mail Directory:
Command: ls -ltr /etc/mail/
5.
Verify Sendmail Service:
Command: ps -ef | grep sendmail
8. Resource
Utilization
Objective:
Monitor
system resource usage.
Commands
and Steps:
1.
CPU Details:
Command: lscpu
2.
Memory Usage in GB:
Command: free -g
3.
System Limits:
Hard Limits: ulimit -aH
Soft Limits: ulimit -aS
4.
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
Related Posts:
Linux Mount and
Umount file system in linux
Frequently Used Linux Commands for System & Oracle DBA Operations
Comments
Post a Comment