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 Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Completed IBM AIX udayn AIX 8 4 Weeks Ago 12:09 PM
Does sync(2) block writes until completed? mschwage UNIX for Advanced & Expert Users 4 09-24-2008 05:48 PM
FQO: V1 Completed iBot Software Releases - RSS News 0 07-12-2008 05:30 PM
killing a unix job after the job process gets completed dtazv SUN Solaris 7 09-28-2005 07:18 AM
When a FTP download is completed Javi SuSE 11 06-20-2005 07:17 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 2 Weeks Ago
Mansoor8810 Mansoor8810 is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 4
Background job when completed

Hello - I submitted one background job last night and it completed today morning.I want to know exact time the job completed.

I submitted backgroung job like this

nohup cp -Rp /opt/apps/prod/proddb/proddata . &

I want to know when above job completed on UNIX server.Above command submitted on following server.

SunOS proddb 5.10 Generic_141414-09 sun4u sparc SUNW,Sun-Fire-880

Thanks in advance.

Mansoor.
  #2 (permalink)  
Old 2 Weeks Ago
scottn scottn is offline Forum Advisor  
VIP Member
  
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,042
Hi.

If you ran the job nohup, check the timestamp of the nohup.out file in the directory you started the job.
  #3 (permalink)  
Old 2 Weeks Ago
Mansoor8810 Mansoor8810 is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 4
Scott - Thanks for your reply.There are three background jobs submitted from same directory.How can I determine which background job updated this nohup.out file?

Is there any command or series of commands to correlate background job with timestamp like syslog or etc...?

Thanks,
Mansoor.
  #4 (permalink)  
Old 2 Weeks Ago
Scrutinizer Scrutinizer is online now
Registered User
  
 

Join Date: Nov 2008
Posts: 597
You can use this:
Code:
nohup cp -Rp /opt/apps/prod/proddb/proddata . >filename.out &
To give each job its own output file. nohup.out is not being used then..
  #5 (permalink)  
Old 2 Weeks Ago
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,163
Post withdrawn. Test is in retrospect and with three processes submitted in this manner it is not possible to determine when each one finished.

Last edited by methyl; 2 Weeks Ago at 09:28 PM..
  #6 (permalink)  
Old 2 Weeks Ago
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
Quote:
Originally Posted by Scrutinizer View Post
You can use this:
Code:
nohup cp -Rp /opt/apps/prod/proddb/proddata . >filename.out &
To give each job its own output file. nohup.out is not being used then..
Just adding to it,
if the file is immediately modified by another process, then timestamp can't be modified.

Instead, along with nohup process write a sequent process that just creates a hidden file to know the time stamp later. I know this is hacky and dirty way but just a quick and easy way to do that.
  #7 (permalink)  
Old 2 Weeks Ago
Mansoor8810 Mansoor8810 is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 4
Hi Folks - Thanks for all your responses.This is very good information.

But in my case one background job is already completed.I want to know when that job completed.As I mentioned the nohup.out file time stamp is modified by other jobs.

Is there any command or steps to find out when that background job is compelted.

Thanks,
Mansoor.
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 03:37 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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