How to log start/stop time of ALL processes


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to log start/stop time of ALL processes
# 8  
Old 12-17-2007
Thanks matrixmadhan. I could try that, but as I said before, I am not allowed to modify the cron entry (It's not my company's constratint, but imposed by our client). I know probably there is no way to do this, but is there anything which logs all processes start-stop time?

One last hope - If I have the process id of any process that has exited normally (or abnormally, whatever), can I get the time when it finished?
# 9  
Old 12-17-2007
if cron mails the output then the time/date of when the script finished will be in the mail. Is this the case with HP UX?
# 10  
Old 12-17-2007
Thanks wempy.
The HP-UX man page says:
=========================================
Be sure to redirect the standard output and standard error from commands. If this is not done, any enerated standard output or standard error is mailed to the user.
=========================================
Cuerrently the output of all scripts is directed to various log files. They do not contain time and date stamp. Just the output from the script ("Connected to DB", "Processing record nnnn" and so on)
# 11  
Old 12-18-2007
If the log file to which debug messages and error messages are redirected donot contain time - stamping information ( it should have been time stamped debug message ) I think there is no way to retrieve the start and end time.

As far as I know, once the process is exited or terminated abnormally start and stop information of the process is not stored in process table entry as the process is a clean - no more existing
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Find processes by start time

How do I find the process ( which might got completed ) which were ran at specific time. for e.g. I should be able to find below process after 2 hrs if I find by time 04:00 myuser 23285 22522 0 04:00 pts/0 00:00:00 /home/myuser/bin/abc.ksh (3 Replies)
Discussion started by: sameermohite
3 Replies

2. Shell Programming and Scripting

how to synch 2 processes to start at the same time

Hey Excuse me if this question is repeated everywhere but I am still new with scripting and I couldn't apply what I found to my case :confused::confused: I am trying to run a rec process on a ssh client and at the same time play a file from my computer so i tried this #!/bin/bash echo... (3 Replies)
Discussion started by: Antaha
3 Replies

3. UNIX for Advanced & Expert Users

Multiple processes write to log file at the same time

If we have 3 process to write to same log file at the same time like below. will it cause the data outdated because the multiple process writing same time? It this a safe way to keep the log for multiple process? p1 >> test.log &; p2 >> test.log &; p3 >> test.log & Thanks, (1 Reply)
Discussion started by: casttree
1 Replies

4. SuSE

List of processes/ which ones to stop

Hi there, I've install a testserver with SLES 11.0! I'll install/test XEN + WebServer not all things at the moment! In a first time, I'd like to stop all unuse processes... but I don't understand all processes! As someone a list of all processes with his signification and which should/could... (3 Replies)
Discussion started by: hiddenshadow
3 Replies

5. UNIX for Dummies Questions & Answers

Stop/Start vs. Restart

Is there any functional difference between: issuing separate stop/start commands like this; super (handler) (instance) stop super (handler) (instance) start versus issuing a single recycle command like this; super (handler) (instance) restart (3 Replies)
Discussion started by: Newbix
3 Replies

6. Solaris

How to start/stop processes

Please anyone tell me In my last interview the HR asks me how to monitor, start,stop & kill the various processes and subprocesses. Please anyone explain me clearly. It's my personal request (3 Replies)
Discussion started by: suneelieg
3 Replies

7. Shell Programming and Scripting

Start program in background (or start crontab ahead of time)

Hey! I'm working on a script that will add a user, create some configfiles, and add a crontab for the user. The crontab looks like the following: @reboot /home/user/program config.conf & I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies

8. Shell Programming and Scripting

Servers Start and Stop

HI I am using below code to start and stop servers but it is not working ,how to run the script please suggest me ,if any errors in the script please let me know. #!/bin/bash IMS_START="/Webserver/AppServer/bin/startServer.sh" IMS_STOP="/Webserver/AppServer/bin/stopServer.sh" case "$1" in ... (1 Reply)
Discussion started by: RG18173
1 Replies

9. UNIX for Advanced & Expert Users

Log 'syslog start/stop/restart' messages

How can I tell my syslog.conf to log "syslog start/stop/restart" messages on a Solaris box? (1 Reply)
Discussion started by: SunnyK
1 Replies

10. Shell Programming and Scripting

Checking before start and stop processes

Hi, I have 2 start and stop sh. Start sh -------- This will start few processes. Example code: echo "start process : lgz200 /pipe=test_jobs" nohup lgz200 /db=test/test1@test1 /pipe=test_jobs > ../log/lgz200_j.log & echo "echo \"stop process (pid=$!): lgz200 /pipe=test_jobs\"" >>... (3 Replies)
Discussion started by: maldini
3 Replies
Login or Register to Ask a Question