file server monitoring and auditing

Important Linux Commands to Monitor Servers

to see top service’s memory and cpu consumption

sudo ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head

To Check Top 5 Processes

sudo ps -A --sort -pcpu -o pid,comm,user,pcpu,pmem,rss,vsz | head -11

to see top service’s memory and cpu consumption including space consumption by files

sudo ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head && df -h

To Check which process is taking much memory

sudo ps -ef | grep [PID]

To Check Directory Size

sudo du -sh *
or
du -sh /*

To Check Partition Size

df -Th
or
df -h

2 Comments

  1. Valeron Peelm

    Hello!
    You’re setting a high bar for technical blogging. Thanks for leading the way!

    Good luck 🙂

  2. Omggrea

    The quality of this content is top-notch. Clear, concise, and actionable!

Leave a Reply

Your email address will not be published. Required fields are marked *