The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 08:25 AM
Cmd to determine my OS version? brian.wilson UNIX for Dummies Questions & Answers 2 09-15-2005 09:11 PM
Determine database used? RageMonkey UNIX for Dummies Questions & Answers 2 04-25-2005 05:21 AM
How to determine the interface? kikikaka IP Networking 2 11-04-2004 10:36 PM
How do I determine # of processors ... bbrandeb49 UNIX for Dummies Questions & Answers 2 10-16-2002 01:13 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-25-2007
new2ss new2ss is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 133
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?
  #2 (permalink)  
Old 09-25-2007
porter porter is offline Forum Advisor  
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.
  #3 (permalink)  
Old 09-26-2007
new2ss new2ss is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 133
thanks porter.
  #4 (permalink)  
Old 09-26-2007
NIMISH AGARWAL NIMISH AGARWAL is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 24
nimish

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

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

Join Date: Jan 2006
Posts: 133
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?
  #7 (permalink)  
Old 05-03-2009
harlock59's Avatar
harlock59 harlock59 is offline
Registered User
  
 

Join Date: May 2009
Location: France
Posts: 11
Exclamation

Hello,

i am trying to upgrade my aptitude (i mean "sudo aptitude upgrade") ! but i get an error with a resource taken by another process.

i typed ps -e and killed one process ("update-agent" i think), but it was not the one.

i can't remember the command line with grep to identify which process is holding the hand of that file.

the file is /var/lib/dpkg/lock

can i find the one using grep and something ?

thanks.
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0