Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Starting a process and setting the PID - UNIX

Thread Tools
 
Search this Thread
 
Old 20 September 2006, 12:30 PM
  #1  
druddle
Scooby Regular
Thread Starter
 
druddle's Avatar
 
Join Date: Mar 2001
Location: Berkshire
Posts: 5,528
Likes: 0
Received 0 Likes on 0 Posts
Default Starting a process and setting the PID - UNIX

Hello

I have a tar process that runs for quite a few hours (far too long in other words) on a RHEL4 server. I want to run strace on the process to see what its doing, i dont need to capture 8 hours of output, but i need the very start.

Is there a way of getting the strace output for this without having to cancel the tar (strace -o <file> tar xxxxx xxx)? Can I force the PID of the tar and then monitor that PID straight away ? Or can I get some info from the /proc/PID directory ?

Dave
Old 20 September 2006, 01:59 PM
  #2  
stevem2k
Scooby Regular
 
stevem2k's Avatar
 
Join Date: Sep 2001
Location: Kingston ( Surrey, not Jamaica )
Posts: 4,670
Likes: 0
Received 0 Likes on 0 Posts
Default

strace -ff -o <filename> tar xxxxxxxxxxxxx


?
Old 21 September 2006, 03:36 PM
  #3  
druddle
Scooby Regular
Thread Starter
 
druddle's Avatar
 
Join Date: Mar 2001
Location: Berkshire
Posts: 5,528
Likes: 0
Received 0 Likes on 0 Posts
Default

I dont want to strace the tar process for the whole 12 hours as i dont need all the output, just the first 30 odd seconds, and I cant stop the strace and run the tar again.

Dave
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
taylor85
Wheels And Tyres For Sale
9
28 September 2015 11:34 PM
johnnybon
Wheels And Tyres For Sale
7
25 September 2015 07:49 AM
Nick71
Subaru Parts
0
21 September 2015 07:54 PM
domino46
Subaru Parts
1
11 September 2015 08:54 AM
jono300
Non Scooby Related
3
10 September 2015 08:00 PM



Quick Reply: Starting a process and setting the PID - UNIX



All times are GMT +1. The time now is 07:01 PM.