Hello,
Please help me with a script with which I can check long running processes on the database server and the os is AIX.
Best regards,
Vishal
Hello,
Please help me with a script with which I can check long running processes on the database server and the os is AIX.
Best regards,
Vishal
Hello Vishal,
Following may help.
ps -eo uid,pid,etime
Thanks,
R. Singh
Hello Ravinder,
If I need to sort this on the basis of elapsed time what should I do?
Additionally,is there a way that process name can also be included in this?
Best regards,
Vishal
Hello Vishal,
Following may help you.
ps -eo pid,comm,cmd,start,etime
Thanks,
R. Singh
Thanks Ravinder! Comm is working but cmd is not working
ps -eo pid,comm,start,etime
but with cmd it's giving error
ps -eo pid,comm,start,etime,cmd
ps: 0509-048 Flag -o was used with invalid list.
Usage: ps [-ANPaedfklmMZ] [-n namelist] [-F Format] [-o specifier[=header],...]
[-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T pid] [ -L pidlist]
Usage: ps [aceglnsuvwxU] [t tty] [processnumber]
Best regards,
Vishal
You don't give your OS or version, so there may be subtle differences between what you have and the response you got.
Try it without the -
, so:-
ps eo pid,comm,start,etime
If you are AIX, it might be:-
ps eo pid,cmd,start,etime
I hope that this helps. Have a read of your man page for ps. They are generally not the best written ones because the range of options is so wide, but persevere.
Robin