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
start process at assidned date and time gd2003 UNIX for Dummies Questions & Answers 6 01-21-2008 11:15 AM
to get process start date and time naeem ahmad UNIX for Advanced & Expert Users 2 02-27-2006 05:09 AM
get process start time naeem ahmad High Level Programming 1 02-06-2006 08:40 PM
Process got terminated automatically Elango AIX 4 01-02-2006 11:37 PM
start a process at boot up time vtran4270 UNIX for Advanced & Expert Users 1 12-08-2002 07:31 PM

Closed Thread
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 09-01-2006
k_chaaya k_chaaya is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 2
start time of a terminated process

Hi,
I have a shell script which i am running. I want it's starting time (the time when the execution of the shell script started) in another shell script. Note that the process has already terminated when i need it's starting time.... else i could have used ps -f | cut -d" " -f5...
But that's not the case, since process has terminated. Also, since I am not superuser, I am unable to use process accounting..
I am using korn shell.
Any help..
  #2 (permalink)  
Old 09-01-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
In the first script do something like:
echo first script started $(date) > /some/file

In the second script do something like:
read starttime < /some/file
  #3 (permalink)  
Old 09-04-2006
k_chaaya k_chaaya is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 2
re:starting time of a terminated process

Thanks... But i cannot change my first script. It has to contain pre-determined things only.... Is there any way I can execute the script you suggested whenever my first script is executed?
THnaks in advance..
Sponsored Links
Closed Thread

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 06:08 AM.


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