Script for long running processes....


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script for long running processes....
# 1  
Old 08-23-2009
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  
Old 08-23-2009
This solution work for me
Code:
top -d 1 -o time | awk 'NR > 7 && int($9) > 12'

# 3  
Old 08-23-2009
Quote:
Originally Posted by danmero
This solution work for me
Code:
top -d 1 -o time | awk 'NR > 7 && int($9) > 12'

I tried your command but it didn't work. Guess it would've helped if I specified on what type Unix system I was trying to use this on: AIX 5.X Not sure if it makes a difference though. Appreciate if you can let me know whether I can use it still or should I try something different. Thanks for your quick reply, Dan.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

2. Shell Programming and Scripting

Websphere Running processes script

Hello experts, I'm trying to run a script that checks the processes listed and returns their name and their PIDs. #!/bin/bash PROCS="DMgr BPM.AppTarget BPM.Support BPM.WebApp BPM.Messaging nodeagent App.Messaging " for p in $PROCS do PROCEXIST=$(ps aux | grep $p | grep -v grep) ... (3 Replies)
Discussion started by: KingaKoopa
3 Replies

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

4. Shell Programming and Scripting

Kill long running script, if it crosses the threshold time

Hi, I need a script to kill the process if it running for long time. Inputs for the scripts: 1.test.sh (will be running fron cron scheduler) 2.1 hr (ie threshold_time - if the test.sh is running for more than 1 hr test.sh has to kill) Thanks, Divya (1 Reply)
Discussion started by: Divya Nochiyil
1 Replies

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

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

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

8. Shell Programming and Scripting

Alert for long running commands in script

Hi All, Is there a way in which a long running command can terminate by itself inside a script? I need something like below: echo Start <command> exit If the <command> is taking more than say 100 seconds to complete, the script should exit without manual intervention. Thanks, Deepak (2 Replies)
Discussion started by: deepakgang
2 Replies

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

10. 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. (2 Replies)
Discussion started by: Ikebana
2 Replies
Login or Register to Ask a Question