Process, Memory and IO monitoring in Linux

Process monitoring utilities:

  • ps -ef OR ps aux                                              (e-> all; f-> format)
  • ps -eo ppid,pid,pmem,pcpu,lstart,cmd
  • ps -u user1; ps -C httpd; ps -p 1234; ps –ppid 1234
  • ps aux –sort=-pcpu,+pmem | head -5 (Top 5 process using cpu & memory)
  • top OR top -p 1234
  • netstat -tupan |grep 80     (List ports used by a process)
  • netstat -tupae | grep httpd
  • ls -ld /proc/pid           (List date and time when a process was started)
  • pstree -aAp 1234 OR ls -l /proc/pid/task
  • jobs (To find process running in background)

Memory monitoring utilities:

  • free -m; cat /proc/meminfo
  • vmstat; vmstat -s; vmstat -d  (s-> stats/summaryd- > disk)
  • vmstat -S M 2 5       (S-> unit; M-> MB; 2-> secs; 5-> count)
  • pmap 1234

IO monitoring utilities:

  • iostat; iostat -xm;               (x-> extended; m-> MB)
  • iostat -xmd /dev/sda 2 5   (d-> device; 2-> secs; 5-> count)
  • iotop; iotop -o                    (o-> show only active process doing IO)

CPU, Memory, and IO benchmarking utilities:

  • fs_mark -d /tmp -n 1000 -s 10240
  • time sudo bonnie++ -n 0 -u 0 -r 100 -f -b -d /mnt
  • stress -c 8 -i 4 -m 6 -t 30s

 

 

 

 

Advertisements

About Ishtiaque

I am IBM Certified Infrastructure Systems Architect, TOGAF 9 Certified, ITIL V3 Foundation certified and Oracle Certified Export in Java Web Component Developer with over 10 years of support and development experience in IBM middleware software and Java. Additionally, have a sound grip in databases, Linux and OpenStack administration. I hold the following certifications: IBM Certified Infrastructure Systems Architect TOGAF 9 Certified Oracle Certified Expert, Java EE6 Web Component Developer Oracle Certified Professional – Java 6 Programmer ITIL v3 Foundation Certified IBM Certified Solution Architect – Cloud Computing Infrastructure V1 IBM Certified System Administrator – WebSphere Portal V8, V7, V6.1, V6 IBM Certified System Administrator – WebSphere Application Server V7, V6.1 IBM Certified System Administrator – AIX V7 IBM Certified System Administrator – WebSphere MQ V7 IBM Certified Deployment Professional – Business Process Manager Advanced V7.5 IBM Certified Solution Advisor – Cloud Computing Architecture V3 IBM Certified Solution Developer – WebSphere Portal V5.1
This entry was posted in LFCS, Linux and tagged . Bookmark the permalink.