Saturday, October 1, 2022

Monitoring a Process Mem and CPU in Linux


Explained about Virtual Memory and Hows it works with Block diagram

https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/9_VirtualMemory.html 



https://www.digitalocean.com/community/tutorials/atop-command-in-linux

Useful option: 

atop

  • SYSCPU - The amount of CPU consumed by the process while system handling.
  • USRCPU - The amount of CPU consumed by the process, during its running in user mode.
  • VGROW - The amount of virtual memory that the process has occupied since the last value update.
  • RGROW - The amount of resident (physical) memory grown since last value update.
  • RDDSK - The size of data transferred during disk reads.
  • WRDSK - The size of data transferred during disk writes.
  • RUID - The real user ID under which the process is being executed.
  • EUID - The effective user ID under which the process is being executed.
  • ST - The current status of the process.
  • EXC - The exit code after the process terminates
  • THR - The number of threads within the process.
  • S - The current status of the primary thread of the process.
  • CPU - The percentage of CPU utilization of the entire process.
  • CMD - The name of the process.

 atop -m 

  • MINFLT - The number of minor page faults that have been solved by accessing data from free pages.
  • MAJFLT - The number of major page faults that have been solved by especially retrieving data from disk.
  • VSTEXT - The virtual memory occupied by the process text.
  • VSLIBS - The virtual memory occupied by the shared libraries of the process.
  • VDATA - The virtual memory size of the private data of the process.
  • VSTACK - The virtual memory size of the private stack of the process.
  • VSIZE - The total virtual memory size of the process.
  • RSIZE - The total resident memory occupied by the process.
  • MEM - The percentage of RAM consumed by the process.