Sponsored Content
Operating Systems AIX etime - get processes running for more than 30 days Post 302439161 by chipahoys on Thursday 22nd of July 2010 03:10:23 AM
Old 07-22-2010
etime - get processes running for more than 30 days

In AIX I am trying to get the processes ran by user declan using the following format:

Code:
 
ps -aef -o user,pid,etime,args | grep declan

Then I get a result similar to (for example):

Code:
declan  103264 123-12:47:33 /applications/apache/1.3.39.0/bin/httpd -d /var/applications/apache/www1

I know that the 123-12:47:33 follows the format days-hh:min:sec when etime is used .

Can you help me with the script to check for processes running for more than 30 days old using the data from the result of the first command above?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to find all processes that are running

Hi i've been googling a lot but can't find an answer. All I would like to know is how to find out all processes that are running on a machine. I know ps gives all YOUR processes. thanks (9 Replies)
Discussion started by: speedieB
9 Replies

2. Shell Programming and Scripting

Need to kill processes that are older than 3 days

Hi, I need a .ksh script that lists all the process that are currently running and older than 3 days. once the process list is available i need to mail the list and then kill those processes. Quick response is highly appreciated :b: Thanks in Advance!!! Sri (3 Replies)
Discussion started by: Sriranga
3 Replies

3. Shell Programming and Scripting

Need help with running processes script

I'm doing a script with the Shell. I need that it only show the number of running processes. Ex: echo "There are `command` running processes" Thnx! Pd: Sorry the idiom. I'm spanish. (5 Replies)
Discussion started by: Ikebana
5 Replies

4. Shell Programming and Scripting

Need to list 3 days old processes

ps -xfu <user name> this command line will list all the process currently running for <user name>. I need to filter this output. I need all the process which are running for more than 3 days(excluding demon/sys process) . The list should include PID, PPID, STIME, process/command. I am using... (20 Replies)
Discussion started by: Sriranga
20 Replies

5. Shell Programming and Scripting

how to know the running processes.

Hi can anybody help me regarding this.. i want know the output of ps -ef with explanation. how can we know the running processess. this is the output of ps -elf F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 19 T root 0 0 0 0 SY ... (1 Reply)
Discussion started by: rajesh_pola
1 Replies

6. Shell Programming and Scripting

Cron job running for some days and is not running for some days

Hi.. i have written a shell script and made this script to run on every day night 11: 55 pm using a cron job. This cron job running for some days and is not running for some day. but i need this script to run every day night. Please help me. Here is the cron tab entries, 55 23 * * *... (1 Reply)
Discussion started by: vidhyaS
1 Replies

7. HP-UX

listing processes older than n days

Hello; trying to find processes older than n days, mostly user shells Tried the following code on 11.31 box: in this case older than 5 days UNIX95= ps -ef -o user,pid,ppid,cpu,etime,stime | grep "-" | awk '{print $2}' | xargs ps -ef|grep -v '?' |\ awk '$5 !~ ""' | awk '($5 ~ "$(date "+%b")")... (6 Replies)
Discussion started by: delphys
6 Replies

8. Solaris

Running processes on GZ/LZ

Hi guys just a question is it normal to see running process on a non-global zone in the global zone... processes such as cron. (3 Replies)
Discussion started by: batas
3 Replies

9. Linux

Running processes

Hi guys is it normal to have 5-10 cron/syslog processes running... in my case i got 10 cron process running. (4 Replies)
Discussion started by: batas
4 Replies

10. Shell Programming and Scripting

Cancel process running for more than 5 days

Hello Group, We want to create a script in order to filter process in the system with more than five days (STIME) and then kill them under Solaris 10. How can we filter these kind of process ? ps -efa Thanks in advance for your help (4 Replies)
Discussion started by: csierra
4 Replies
serialize(1)						      General Commands Manual						      serialize(1)

NAME
serialize - force target process to run serially with other processes SYNOPSIS
command [command_args] pid] DESCRIPTION
The command is used to force the target process to run serially with other processes also marked by this command. The target process can be referred to by pid value, or it can be invoked directly on the command. Once a process has been marked by the process stays marked until process completion unless is reissued on the serialized process with the option. The option causes the pid specified with the option to return to normal timeshare scheduling algorithms. This call is used to improve process throughput, since process throughput usually increases for large processes when they are executed serially instead of allowing each program to run for only a short period of time. By running large processes one at a time, the system makes more efficient use of the CPU as well as system memory, since each process does not end up constantly faulting in its working set, to only have the pages stolen when another process starts running. As long as there is enough memory in the system, processes marked by behave no differently from other processes in the system. However, once memory becomes tight, processes marked by are run one at a time with the highest priority processes being run first. Each process will run for a finite interval of time before another serialized process is allowed to run. Options supports the following options: Indicates the process specified by pid should be returned to timeshare scheduling. Indicates the pid of the target process. If neither option is specified, is invoked on the command line passed in. RETURN VALUE
returns the following value: Successful completion. Invalid pid specification, nonnumeric entry, or pid specification is that of a special system process. Could not execute the specified command. No such process. Must be root or a member of a group having the privilege to execute ERRORS
fails under the following condition and sets (see errno(2)) to the following value: The pid passed in does not exist. EXAMPLES
Use to force a database application to run serially with other processes marked for serialization: Force a currently running process with a pid value of 215 to run serially with other processes marked for serialization: Return a process previously marked for serialization to normal timeshare scheduling. The pid of the target process for this example is WARNINGS
The user has no way of forcing an execution order on serialized processes. AUTHOR
was developed by HP. SEE ALSO
setprivgrp(1M), getprivgrp(2), serialize(2). serialize(1)
All times are GMT -4. The time now is 01:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy