The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Determine LOM version? sysera SUN Solaris 2 10-21-2005 05:25 AM
Cmd to determine my OS version? brian.wilson UNIX for Dummies Questions & Answers 2 09-15-2005 06:11 PM
Determine database used? RageMonkey UNIX for Dummies Questions & Answers 2 04-25-2005 02:21 AM
How to determine the interface? kikikaka IP Networking 2 11-04-2004 06:36 PM
How do I determine # of processors ... bbrandeb49 UNIX for Dummies Questions & Answers 2 10-16-2002 10:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-25-2007
Registered User
 

Join Date: Jan 2006
Posts: 125
determine pid from ps -ef | grep something

Hi all,

i have a script called a.sh and within a.sh it calls b.sh.

when i do a ps -ef | grep a.sh, i get two sets of number

user_test 4225 3250 0 10:31 pts/1 00:00:00 a.sh

when i do a ps -ef | grep b.sh, i get two sets of number

user_test 4269 4225 22 10:31 pts/1 00:00:45 b.sh

why are there there two sets of numbers? which is the pid of a.sh and b.sh respectively?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-25-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
From the listing the first number is the process id, the second number is that processes' parent.
Reply With Quote
  #3 (permalink)  
Old 09-25-2007
Registered User
 

Join Date: Jan 2006
Posts: 125
thanks porter.
Reply With Quote
  #4 (permalink)  
Old 09-25-2007
Registered User
 

Join Date: Sep 2007
Posts: 17
nimish

user_test 4225 3250 0 10:31 pts/1 00:00:00 a.sh
UID PID PPID C STIME TTY TIME cmd
Reply With Quote
  #5 (permalink)  
Old 09-25-2007
grial's Avatar
El UNIX es como un toro
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
Very easy:
Code:
man ps
Reply With Quote
  #6 (permalink)  
Old 02-03-2008
Registered User
 

Join Date: Jan 2006
Posts: 125
Hi,

i would like to clarify certain columns. I tried to man ps, and i was not able to understand the information provided. In the man pages, it states the flag -f was to print out the full-format listing, however it does not say what information comes with the full-format listing. May i know what does C, STIME,TTY and TIME means? I reckon STIME means start time and time means it has been running for how long?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0