LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 07-16-2013, 08:32 AM   #1
sras
Member
 
Registered: Jul 2013
Posts: 31

Rep: Reputation: Disabled
how to capture process ID of a job


Hello Guys,

Is there a way to capture the process ID of the job which is going to be started?

thanks.
 
Old 07-16-2013, 09:43 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Depending on when to record it yes or no or maybe.
There is a shell variable thats gives the PID of the last process started in the background. Search for "Special Shell Variables".
Or eleaborate a bit more on the question and we'll find a solution.
 
Old 07-16-2013, 09:46 AM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
echo $!
 
Old 07-17-2013, 02:46 AM   #4
sras
Member
 
Registered: Jul 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thanks for the reply..Just I'd like to record the process id to monitor it's status at specific intervals..
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture complete process structure/stack rahulchandrak Linux - General 4 02-27-2013 02:29 PM
Process / Job control. arashi256 Linux - Newbie 4 01-05-2010 11:17 AM
How to capture both stdin and stdout of a child process? jineshkj Linux - Software 2 04-21-2006 06:34 AM
Capture at job number upon submission AmyBVT Programming 4 03-10-2006 12:31 AM
log cron job to capture errors if there are ashley75 Linux - General 1 05-21-2004 10:34 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 09:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration