what time did my process die ??


 
Thread Tools Search this Thread
Operating Systems Solaris what time did my process die ??
# 1  
Old 10-19-2006
what time did my process die ??

Hi there

I have a backup script that runs every night and for some reason ive been getting in in the morning and the process has died, Is there any way I can tell when it died? if not .....would anybody recommend some scripting that i could do that would be able to tell me this information


Cheers
# 2  
Old 10-20-2006
the only way that i know of to know when a process disappears is to actually check for the process periodically ...

write a script that loops every minute (or second or hour) and looks for the backup process through a ps check ... if found, sleep and recheck again later ... if not found, send an email or log the error somewhere ...

good luck!
# 3  
Old 10-20-2006
Another way is to run process from a programm (that will be a parent) and wait when the process is finished (use fork/exec/waitpid functions).

I do not know whether waitpid() can be used by process that is not a parent for process with given pid.
# 4  
Old 10-20-2006
Does the backup process write to a log? If so look at the timestamp (with "ls -l /var/backup/log" or whatever) on the log to see when it was last updated. Even with no log, a backup process must write somewhere. By looking at the timestamps maybe you can figure it out.

A script?
Code:
#! /usr/bin/ksh
/path/to/backup.process
echo backup.process finished at $(date) > /tmp/backup_end.time
exit 0

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

oracle process appears to die

periodically my oracle 11.2.0.1 listener process 'tnslsnr' seems to crash and disappear ( I am using an AIX 6.1 unix platform ). When this happens I am able to restart my listener ok. However when this happens there is is no stop recorded in my listener log (as there normally would be - hence why I... (1 Reply)
Discussion started by: jimthompson
1 Replies

2. Shell Programming and Scripting

FTP Connection die out

Hi, I will ftp aroung 80 files after connecting to an FTP Server. But after 2 minutes of connection, it is timed out and connection is dying. Server had a 2 minute connection timeout if connection is idle. But my question, Isn't tranfering files not considered as an activity. Is the connection... (7 Replies)
Discussion started by: vasuarjula
7 Replies

3. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

4. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

5. UNIX for Advanced & Expert Users

Process accounting and Shell process time

Hi All, I am running the following accounting on one of my executable, $ accton /home/myexe-acct $ ./myexe $ accton When I check the process timings I get the below result, Shell process time: 300ms myexe time: 100ms I want to know on why the shell(sh) process is taking so much time... (1 Reply)
Discussion started by: santoshbr4
1 Replies

6. UNIX for Dummies Questions & Answers

how to Decrease priority of a particular process in time of process creation

how to decrease priority of a particular process in time of process creation... and also how to decrease priority of a particular process after process creation.. can any one please help me out... (2 Replies)
Discussion started by: Ramkum
2 Replies

7. UNIX for Dummies Questions & Answers

Python 2.5 must die.

I am using SunOS 5.7 I have installed Python 2.5 via make install Without going into details, I'd like to uninstall it and replace it with an earlier version. Maybe as far back as 2.2.3. Unfortuantely, make uninstall gives me Don't know how to make target 'uninstall'. This is thematically... (2 Replies)
Discussion started by: Dbecker
2 Replies

8. News, Links, Events and Announcements

Live Free or Die!

Mods: Delete this if you think that this is not appropriate. I found this rather amusing. If you go to www.unix.net now you will see the OpenGroup selling license plates that read "Live Free or Die/Unix/Unix is a trademark of the OpenGroup" (http://www.unix.net/unix_plates.html) I just... (12 Replies)
Discussion started by: auswipe
12 Replies
Login or Register to Ask a Question