Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to check how long the process has been running. Post 302225924 by ukatru on Sunday 17th of August 2008 07:45:24 PM
Old 08-17-2008
how to check how long the process has been running.

I have a requirement to check how long a process is running on unix system.If i use ps -ef i am getting the following message

guest 2453638 1998920 0 16:16:05 - 0:00 dsapi_slave 9 8 0

but this is showing only time not the date.Can any one please advice me any script to find out how long this process is running.

Thanks
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to check since when (for how long) a particular process is running ?

How do I check if a particular process is running from a certain date and time ? (2 Replies)
Discussion started by: hpuxlxboy
2 Replies

2. Shell Programming and Scripting

Check if Process is running

Hi , I have a csh code below which check the process if it's running. Can any expert advise me on the following: 1) what does this notationmean ">!" and how is it different from the append ">" notation ? 2) how does "setenv" work in this code ? # Check whether there is a running... (3 Replies)
Discussion started by: Raynon
3 Replies

3. Shell Programming and Scripting

Monitor a long running process

Gurus, I am writing a shell script that will be used to automate cold backup of an Oracle Database. The database size is around 300G and will take around 5-6 hours to copy. I have finished the script till the copy of the datafiles. Now, I am stuck at the point where I need to monitor the... (4 Replies)
Discussion started by: sunpraveen
4 Replies

4. Shell Programming and Scripting

need to check if the process is running

Hi, I check if the process is running or not using the below. /usr/ucb/ps auxww | grep 109 |grep rmi | awk '{print $2}' 9718 Thus we see 9718 is the PID. It return blank if the process is not running. I need to perform some action if the process is not running and leave it if... (8 Replies)
Discussion started by: shifahim
8 Replies

5. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies

6. Shell Programming and Scripting

Check for long running process on AIX

I want to write a shellscript which determines if a particular process is long running than my specified threshold time. Eg: My process name is "prsd" and is expected to run for 15 mins and completes. If I set a threshold limit of 1 hour, and how we can the get output of the long running... (4 Replies)
Discussion started by: chandu123
4 Replies

7. AIX

Need to check long running processes on the database server and the os is AIX

Hello, Please help me with a script with which I can check long running processes on the database server and the os is AIX. Best regards, Vishal (5 Replies)
Discussion started by: Vishal_dba
5 Replies

8. Shell Programming and Scripting

Killing the process if running for long time in script

I am running a script which will read the data from fail line by line and call the Java program by providing the arguments from the each line. The Java code is working fast for few records and for some records its getting hanged not providing response for morethan one hour. Currently am... (4 Replies)
Discussion started by: dineshaila
4 Replies

9. Shell Programming and Scripting

Check status of long running multiple curl commands in shell script

I am working on script. it reads a file which contains multiple lines Ex; curl --write-out %{http_code} --silent --output /dev/null http://hostname:port/input=1 curl --write-out %{http_code} --silent --output /dev/null http://hostname:port/input=2 curl --write-out %{http_code} --silent ... (2 Replies)
Discussion started by: oraclermanpt
2 Replies
PS(1)							      General Commands Manual							     PS(1)

NAME
ps - process status SYNOPSIS
ps [ aklx ] [ namelist ] DESCRIPTION
Ps prints certain indicia about active processes. The a option asks for information about all processes with terminals (ordinarily only one's own processes are displayed); x asks even about processes with no terminal; l asks for a long listing. The short listing contains the process ID, tty letter, the cumulative execution time of the process and an approximation to the command line. The long listing is columnar and contains F Flags associated with the process. 01: in core; 02: system process; 04: locked in core (e.g. for physical I/O); 10: being swapped; 20: being traced by another process. S The state of the process. 0: nonexistent; S: sleeping; W: waiting; R: running; I: intermediate; Z: terminated; T: stopped. UID The user ID of the process owner. PID The process ID of the process; as in certain cults it is possible to kill a process if you know its true name. PPID The process ID of the parent process. CPU Processor utilization for scheduling. PRI The priority of the process; high numbers mean low priority. NICE Used in priority computation. ADDR The core address of the process if resident, otherwise the disk address. SZ The size in blocks of the core image of the process. WCHAN The event for which the process is waiting or sleeping; if blank, the process is running. TTY The controlling tty for the process. TIME The cumulative execution time for the process. The command and its arguments. A process that has exited and has a parent, but has not yet been waited for by the parent is marked <defunct>. Ps makes an educated guess as to the file name and arguments given when the process was created by examining core memory or the swap area. The method is inherently somewhat unreliable and in any event a process is entitled to destroy this information, so the names cannot be counted on too much. If the k option is specified, the file /usr/sys/core is used in place of /dev/mem. This is used for postmortem system debugging. If a second argument is given, it is taken to be the file containing the system's namelist. FILES
/unix system namelist /dev/mem core memory /usr/sys/core alternate core file /dev searched to find swap device and tty names SEE ALSO
kill(1) BUGS
Things can change while ps is running; the picture it gives is only a close approximation to reality. Some data printed for defunct processes is irrelevant PDP11 PS(1)
All times are GMT -4. The time now is 10:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy