Jump to Navigation

273 - Monitor processes in Linux Server

1. Monitor CPU, Memory per a specific process

# watch -n 3 "ps auxw | grep -v root | grep ora_p0"

* watch - Run the script comnand repeatedly (by default, every two seconds) and display the output so you can watch it change over time.
                The command and any options are passed to sh -c, so you may need to use quotes to get correct results.

2. Monitor I/O per process

* iotop is useful tool to monitor I/O on a process

# iotop -oaP -d 3 -u oracle

-o, Only show processes or threads actually doing I/O, instead of showing
-a, Show accumulated I/O instead of bandwidth. In this mode,
    iotop shows the amount of I/O processes have done since iotop started.
-P, Only show processes. Normally iotop shows all threads.
-d SEC, Set the delay between iterations in seconds (1 second by default). 
   Accepts non-integer values such as 1.1 seconds.
-u USER, A list of users to monitor (all by default)
-p PID,  A list of processes/threads to monitor (all by default).



Main menu 2

Story | by Dr. Radut