![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to calculate CPU time under HP-UX | limame | HP-UX | 1 | 06-18-2007 02:28 PM |
| calculate the time differnce between two given timings | Olti | UNIX for Dummies Questions & Answers | 1 | 01-05-2006 10:22 AM |
| How to calculate with awk | whatisthis | Shell Programming and Scripting | 4 | 11-09-2005 09:39 AM |
| Calculate Elapsed Time | sysera | Shell Programming and Scripting | 5 | 06-16-2004 10:10 PM |
| Please Help ( Calculate time taken in a script) | sanjay92 | UNIX for Dummies Questions & Answers | 9 | 10-02-2001 11:20 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
How do I calculate time? I need to create an alert if a process is running more than 30 minutes. I need to get the first time and then get another, calculate it if more than 30 mins and then alert it to pager. Can't find it in internet. Thanks in advance, itik |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
If you run the process from a script then sleep(1) is what you want. Start the process, sleep for 30 minutes and then check for the process using pgrep(1) or similar.
|
|
#3
|
|||
|
|||
|
You could use RSCT for monitoring, have a look at: Status daemon monitoring
A simple way could be to: Identify the process to monitor and create a trigger for monitoring it (such as a shell script) that are armed when the process time exceeds 30 min, and then do the paging. Check the "IBM.Program" resource class and "Processes" resource: "IBM.Program Each resource of this class represents a program that is running on the host. " (Resource classes defined by the host resource manager) |
|||
| Google The UNIX and Linux Forums |