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:
- View Disk Space Usage:
- Command: df -h
- Verify the available and used
space in a human-readable format.
- Check File System
Configurations:
- Command: cat /etc/fstab
- Ensure all required file
systems are configured to mount at boot.
- 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:
- Verify DNS Resolver Permissions:
- Command: ls -ld
/etc/resolv.conf
- Display DNS Server
Configuration:
- Command: cat
/etc/resolv.conf
- 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:
- Detailed System Information:
- Command: uname -a
- Kernel Version:
- Command: uname -r
- Date and Time Verification:
- Command: date
4. User
and Group Configurations
Objective:
Ensure
proper permissions and verify user/group details.
Commands
and Steps:
- Check Permissions of Key Files:
- Command: ls -ld
/etc/passwd /etc/group /etc/hosts
- Display User Accounts:
- Command: cat /etc/passwd
- Show Group Definitions:
- Command: cat /etc/group
- Verify Host-to-IP Mappings:
- Command: cat /etc/hosts
5.
Scheduled Jobs
Objective:
Verify cron
jobs for automation.
Commands
and Steps:
- List Scheduled Cron Jobs:
- Command: crontab -l
6.
Process Monitoring
Objective:
Monitor
critical services and processes.
Commands
and Steps:
- 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:
- Verify Postfix Permissions:
- Command: ls -ld
/etc/postfix
- List Mail Queue Files:
- Command: ls -ltr
/var/spool/postfix
- Check Postfix Service:
- Command: ps -ef | grep
postfix
- Audit Mail Directory:
- Command: ls -ltr
/etc/mail/
- Verify Sendmail Service:
- Command: ps -ef | grep
sendmail
8.
Resource Utilization
Objective:
Monitor
system resource usage.
Commands
and Steps:
- CPU Details:
- Command: lscpu
- Memory Usage in GB:
- Command: free -g
- System Limits:
- Hard Limits: ulimit -aH
- Soft Limits: ulimit -aS
- Default File Permissions Mask:
- Command: umask
9.
Printer Services
Objective:
Monitor
printer status and jobs.
Commands
and Steps:
- Check Printer Status:
- Command: lpstat -a
10.
Library Dependencies
Objective:
Verify
critical library files.
Commands
and Steps:
- Check File Presence and
Permissions:
- Command: ls -ld
/usr/lib/libgtk-x11-2.0.so.0
Comments
Post a Comment