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

7 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!

  3. Darius3652

    This should be required reading for new devs.

  4. Avery3532

    This clarified a concept I’ve struggled with for years.

  5. Hermione4068

    This saved me hours—thank you!

  6. Kelly3775

    This is the kind of content that makes tech exciting.

  7. Scott4798

    Loved the use of visual debugging—super helpful.

Leave a Reply

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