Hi,
I want to monitor our batch jobs at a specific interval for later analysis to see the performance and CPU utilization
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
ps aux|grep dsadm|head
xxxxx 386 0.0 0.0 103524 15448 pts/0 S Mar27 0:00 /etrade/home/dsadm/sqllib/bin/db2bp 28075A14861 5 A
dsadm 1339 0.0 0.0 24780 1696 ? Ss Mar13 0:00 dscs 4 0 0
dsadm 1351 0.0 0.0 158212 37128 ? Ss Mar13 0:00 dsapi_slave 7 6 0
xxxxxx 1911 0.0 0.0 103780 15800 pts/5 S 13:04 0:00 /etrade/home/dsadm/sqllib/bin/db2bp 24828A14861 5 A
dsadm 2721 0.0 0.0 24804 1752 ? Ss Mar19 0:00 dscs 4 0 0
dsadm 2722 0.0 0.0 158548 38036 ? Ss Mar19 0:02 dsapi_slave 7 6 0
dsadm 7298 0.0 0.0 11848 3520 ? S Mar23 0:08 /bin/ksh /etrade/prd/dsadm/batch/uscrm/prod/run//DCM/dcm_canary.ksh -project_code DCM -exec_mode PROD -run_date 20140316 -process_name DW_DCM_LOAD -hbinterval 5 -jobname DWDCM01LD
dsadm 7332 0.0 0.0 10924 2556 ? S Mar23 0:02 /bin/ksh /etrade/prd/dsadm/batch/uscrm/prod/run/DCM/dcm_load.ksh -project_code DCM -exec_mode PROD -run_date 20140316 -process_name DW_DCM_LOAD -hbinterval 5 -jobname DWDCM01LD
dsadm 10724 0.0 0.0 24780 1688 ? Ss Mar13 0:00 dscs 4 0 0
dsadm 10725 0.0 0.0 158924 38284 ? Ss Mar13 0:25 dsapi_slave 7 6 0
From which i can later identify the CPU and memory utilization etc.
But couldnt figure out a way to print the parent id in this output
ps -eo command,user,pid,ppid
i have this command to get the parent id also. but here i cant display the any of the performance parameter's. Is there a way to print both PID hierarchy and various performance factors for each process