Sponsored Content
Operating Systems AIX Need to check long running processes on the database server and the os is AIX Post 302885759 by Vishal_dba on Tuesday 28th of January 2014 09:27:27 AM
Old 01-28-2014
Hello Ravinder,

If I need to sort this on the basis of elapsed time what should I do?

Additionally,is there a way that process name can also be included in this?



Best regards,
Vishal
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to check running processes on remote server.

Hi, I am trying to write a script, which queries a db to get the names of processes, stores it in a file and then checks if that process is running on a remote server. However I am not getting it right, could anyone help me out. #!/bin/sh echo "select Address from Device where Cust =... (5 Replies)
Discussion started by: amitsayshii
5 Replies

2. UNIX for Advanced & Expert Users

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... (2 Replies)
Discussion started by: ukatru
2 Replies

3. 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

4. Shell Programming and Scripting

Script for long running processes....

I searched the forums but didn't see anything related to what I'm looking for. I need a script that would give me a listing of jobs running longer than, for example, 12 hours or so. Thanks in advance for your assistance!! (2 Replies)
Discussion started by: CyberOptiq
2 Replies

5. Shell Programming and Scripting

determine the active processes on the system which are running since long time

Hi , Please help me shell script to determine the active processes on the system which are running since long time (2 Replies)
Discussion started by: itian2010
2 Replies

6. AIX

How to Identify long running unix processes

Hi All, Need an urgent help, I have a requirement to find long running unix processes.. I have tried the below commands, but not succeed. I need to arrange the unix processess in an order of elapsed time (high to low) that runs in a system. For Eg: Consider we have 3 processes, Pid 1 pid 2... (5 Replies)
Discussion started by: mohamedirfan
5 Replies

7. Shell Programming and Scripting

Quick question about finding the PID of long-running processes

The end result that I'd like is to terminate any process on my ps -u username list that extends beyond 20 minutes. I know for a fact that this process will be named l.exe, but I don't know the number in between and I won't know the PID. Is there a way to use grep or pidof to do this task every 20... (2 Replies)
Discussion started by: Bolanok
2 Replies

8. 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

9. Shell Programming and Scripting

Check Running Processes

I want to check how many processes are running with same names and get their respective counts. ps -ef|grep -Eo 'process1|process2|process3| '|sort -u | awk '{print $2": "$1}' Output would look like : $ ps -ef|grep -Eo 'process1|process2|process3| '|sort | uniq -c | awk '{print $2":... (8 Replies)
Discussion started by: simpltyansh
8 Replies

10. UNIX for Beginners Questions & Answers

Check processes running on remote server

Hello Guys, I need some help to find out if processes are running on remote server or not. I could do 'ssh' to do that but due to some security reasons, I need to avoid the ssh & get result from remote server. Could you please suggest some that can be done without ssh or similar sort of... (8 Replies)
Discussion started by: UnknownGuy
8 Replies
times(3)						     Library Functions Manual							  times(3)

NAME
times - Gets process and child process times LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <sys/times.h> clock_t times( struct tms *buffer); Programs that are being developed for conformance to the AT&T System V Interface Definition must specify two #include statements, as fol- lows: #include <sys/types.h> #include <sys/times.h> STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: times(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to type tms structure space where system time information is stored. DESCRIPTION
The times() function fills the type tms structure space pointed to by the buffer parameter with time-accounting information. All time val- ues reported by this function are in hardware-dependent clock ticks. The times of a terminated child process are included in the tms_cutime and tms_cstime elements of the parent process when a wait function returns the process ID of that terminated child. The tms structure, which is defined in the sys/times.h header file, contains the following members: User time. The CPU time charged while executing user instructions of the calling process. System time. The CPU time charged during system execution on behalf of the calling process. User time, children. The sum of the tms_utime and the tms_cutime times of the child processes. System time, children. The sum of the tms_stime and the tms_cstime times of the child processes. When a child process does not wait for its children, its child-process times are not included in its times. This information comes from the calling process and each of its terminated child processes for which a wait function has been executed. RETURN VALUES
Upon successful completion, the times() function returns the elapsed real time since an arbitrary reference time in the past (for example, system start-up time). The reference time does not change from one invocation of times() within the process to another. The elapsed times are in units of 1/CLK_TCK seconds, where CLK_TCK is processor dependent. For application portability, the value of CLK_TCK should be queried using the sysconf() function (see sysconf(3)). The return value may overflow the possible range of type clock_t values. When the times() function fails, a value of (clock_t)-1 is returned. RELATED INFORMATION
Commands: cc(1) Functions: exec(2), fork(2), getrusage(2), profil(2), stime(3), sysconf(3), time(3), wait(2) Standards: standards(5) delim off times(3)
All times are GMT -4. The time now is 12:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy