Have to add that even the HH: is usually omitted if HH is zero.
A suitable postprocessing with awk:
The { print $1 } prints only the pids.
Another example with two more columns and printing everything:
BTW Sun made the /usr/bin/ps Posix compliant; there is no /usr/xpg4/bin/ps. But df, find, awk, and >60 more Posix compliant commands live in /usr/xpg4/bin/
Last edited by MadeInGermany; 03-07-2019 at 10:18 AM..
Reason: $NF and another example.
Hi, I was wondering if somebody could help me as I am struggling with writing a script for a training course.
Ive had to write 5 scripts and this is the last one but am struggling with this even though I understand what it is meant to do.....
PROBLEM: write a script which will allow you to... (1 Reply)
Hi,
Can any one help me on this.
How to capture the running process for two hours with an interval of 10 sec.
Thanks in andvance
Double post, continued here, thread closed (0 Replies)
Hi Experts,
Please help me in this.
I am trying this code on AIX 5.3.
I need list of jobs that executed in last 4 hours.
I have a schedule on this script - cron executes it and sends mail to me for every 2 hours.
I have a Job time and have around 100 jobs those execute daily.
What all i need... (2 Replies)
HI Guys
I want to create date folder in unix base on currant date minus 12 hours.
Ex:
Currant date :07222013 and time is 1 Am
So the folder will create date :07212013 (6 Replies)
How can I print ONLY processes running for more than 24 hours. Using ps command or any other method
I use this to get a whole list.
ps -eo pid,pcpu,pmem,user,args,etime,cmd --sort=start_time
We can also sort the outout of the above command to list processes older than 24 hours using... (9 Replies)
Hi All,
new to the forum and new to Unix but I have an issue which is annoying on a new level. I have included a short and full version for anyone needing more information.
Short Version
I am running a set of scripts that work and run fine. one of the scripts arranges the first... (4 Replies)
HI
can someone help me to check the process running more than 2 hours.
I have the below command which shows the time and process id, however, I only need the processes running more than 2 hours. (8 Replies)