The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-29-2008
victorcheung victorcheung is offline
Registered User
 

Join Date: Oct 2007
Posts: 23
Hi Era,

I use the following in AIX :

ps aux | awk '$11 ~ /(^|\/)f60/ { split ($9,t,/:/); if (t[1] > 8) print $2 }'

and it return:

4468962

and I grep the process:
root@lkmprod11i:/home/oracle/victor> ps -ef|grep 4468962
appl115 4468962 6123696 0 09:05:04 - 0:00 f60runm webfile=5,27368,lkmprod11i_9002_PROD11i
root 9077560 10519380 0 15:15:38 pts/0 0:00 grep 4468962

The program start time is 09:05 and the system current time is 15:15, it is less then 8 hours long, it should not be returned, can you please help and review? Thanks!

On the other hand, I have to add one more condition to it, if the process id or parent process id is 1 then don't let it returned, how to do that?

Thanks!
Victor Cheung

Last edited by victorcheung; 04-30-2008 at 12:12 AM.
Reply With Quote