Sponsored Content
Full Discussion: Customizing ps command
Top Forums Shell Programming and Scripting Customizing ps command Post 302895120 by ratheeshjulk on Friday 28th of March 2014 02:07:08 PM
Old 03-28-2014
[Solved] Customizing ps command

Hi,
I want to monitor our batch jobs at a specific interval for later analysis to see the performance and CPU utilization
Code:
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

Code:
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

Last edited by ratheeshjulk; 03-28-2014 at 03:31 PM.. Reason: few userid masked
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

customizing xterm windows

Does anyone now how to customize an xterm window in solaris to dynamically 'pwd' in the banner. I know how to launch with xterm -n 'cwd' but it does not change when I change dir's. (4 Replies)
Discussion started by: toddy44
4 Replies

2. UNIX for Dummies Questions & Answers

Customizing CDE background

i have a question about setting the background in a workspace in CDE. I have CDE runnning on Solaris 8 here at work and I want to use some images I have as the background in or two of the workspaces. When I use xv on the image and choose the option the option from the Display Menu -> Root:... (1 Reply)
Discussion started by: Kanu77
1 Replies

3. Shell Programming and Scripting

customizing desktop

I need help editing my openwin file. I've got it all set up so the options I normally use (xman, cmdtools, xeyes, printtool) automatically come up when I log on, but it won't read my -geometry entries. I got them by right-clicking on the desktop, but apparently they need to be entered a certain... (0 Replies)
Discussion started by: sdienlin
0 Replies

4. Red Hat

Customizing RHEL OS

Hello Every One, I am not sure if this is the correct forum to post this question. But please help me with your ideas. I have got a work (proj) where i need to customize the RHEL OS . This would involve building packages, installing them , correcting privileges etc and all these... (4 Replies)
Discussion started by: shirsha
4 Replies

5. UNIX for Dummies Questions & Answers

Customizing UNIX

Hello i'm just wondering how to customize the color of unix's (or SSH) background, cursor, and letter? Thank you for your time (4 Replies)
Discussion started by: mgyeah
4 Replies

6. UNIX for Dummies Questions & Answers

Customizing from address in mailx command

Currently I am using mailx command for sending mails. But the mail is sent as from userid@servername by default. Is it possible to customise the from mail address in mailx command? Thanks (2 Replies)
Discussion started by: pandeesh
2 Replies

7. UNIX for Dummies Questions & Answers

customizing default file permission

By default, the files are creates with this permissions:-rw-rw-r-- Is it possible to customize that in such away that ,always created as 777. Where i need to make changes? Please guide me. Thanks (2 Replies)
Discussion started by: pandeesh
2 Replies

8. Red Hat

RHEL6 customizing prompt do not work

Hi, I'm trying to customize the ksh prompt for users on a RHEL 6.6 system for having user@host pwd : $ and user@host pwd # in red color for root. I think it's possible but i do not even succeded for a non root user : I added in my ~/.kshrc : PS1="Hello : " and it works but when i... (4 Replies)
Discussion started by: Fundix
4 Replies

9. UNIX for Advanced & Expert Users

Customizing bash on AIX

AIX is really different from most distros I am used to. I am trying to set up my .bashrc so I did this in the file. I noticed when I ssh into the server or use the bash command for a new shell it was being ignored. #------------------------------------------------------------- # Source global... (2 Replies)
Discussion started by: cokedude
2 Replies
ATD(8)							      System Manager's Manual							    ATD(8)

NAME
atd - run jobs queued for later execution SYNOPSIS
atd [-l load_avg] [-b batch_interval] [-d] [-f] [-s] DESCRIPTION
atd runs jobs queued by at(1). OPTIONS
-l Specifies a limiting load factor, over which batch jobs should not be run, instead of the compile-time choice of 0.8. For an SMP system with n CPUs, you will probably want to set this higher than n-1. -b Specify the minimum interval in seconds between the start of two batch jobs (60 default). -d Debug; print error messages to standard error instead of using syslog(3). This option also implies -f. -f Run atd in the foreground. -s Process the at/batch queue only once. This is primarily of use for compatibility with old versions of at; atd -s is equivalent to the old atrun command. WARNING
atd won't work if its spool directory is mounted via NFS even if no_root_squash is set. FILES
/var/spool/at The directory for storing jobs; this should be mode 700, owner root. /var/spool/at/spool The directory for storing output; this should be mode 700, owner root. /etc/at.allow, /etc/at.deny determine who can use the at system. SEE ALSO
at(1), at.deny(5), at.allow(5), cron(8), crontab(1), syslog(3). BUGS
The functionality of atd should be merged into cron(8). 2009-11-14 ATD(8)
All times are GMT -4. The time now is 11:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy