Sponsored Content
Full Discussion: Processes
Top Forums Shell Programming and Scripting Processes Post 302104411 by Krrishv on Thursday 25th of January 2007 05:22:21 AM
Old 01-25-2007
Processes

I have a file like this.

No. State Query Times User Processed Syslog
1 ready idle 973s 0 /Application/ugsvols/bldata01/logs/imanscript1562.syslog
2 ready idle 803s 83997 13 /Application/ugsvols/bldata01/logs/imanscript1542.syslog
3 ready idle 2954s 106641 5 /Application/ugsvols/bldata01/logs/imanscript24717.syslog
4 ready idle 5674s 82692 15 /Application/ugsvols/bldata01/logs/imanscript16618.syslog
5 ready idle 12626s X035077 5 /Application/ugsvols/bldata01/logs/imanscript27216.syslog
6 ready idle 16088s X038493 19 /Application/ugsvols/bldata01/logs/imanscript16795.syslog
7 ready idle 19069s 105837 14 /Application/ugsvols/bldata01/logs/imanscript8563.syslog

the final number before .syslog is the process id.

for eg: in the above if you take 7th one 8563 is the PID.

Now what i want to achieve is if the user name is null in the users column all
the process should be killed. then it should check for all users. if the users idle time that is $4 is greater than 20000 secs it should kill those process. Please let me know how to acheive this.

i tried the below command for $4 > 200000s but it's not printing correctly.

cat procs.txt|awk '{if( $4 > 200000s ) print $4,$7 }

Last edited by Krrishv; 01-25-2007 at 06:29 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

co-processes

Is it possible to have a main script (i will call it main.ksh) that executes say, 4 other scripts (sub_prog_1.ksh, sub_prog_2.ksh etc..) from within this main.ksh (simultaneously/in parallel), have them run in the background and communicate back to main.ksh when complete? My guess is to use... (1 Reply)
Discussion started by: google
1 Replies

2. UNIX for Dummies Questions & Answers

processes

What command string will locate ONLY the PID of a process and ouput only the number of PID of the process? (1 Reply)
Discussion started by: mma_buc_98
1 Replies

3. Shell Programming and Scripting

I need some example of Co-Processes

I want to know how to work the Co-Processes in kornshell scripts. So, I very need some script about Co-Processes! thanks ...:) (3 Replies)
Discussion started by: javalee
3 Replies

4. Filesystems, Disks and Memory

processes

write a program create two processes to run a for loop which adds numbers 1 to n , say one process adds odd numbers and other adds even numbers (1 Reply)
Discussion started by: jayaram_miryabb
1 Replies

5. UNIX for Dummies Questions & Answers

Processes

Can someone tell how to find out how long a process has been running? I want to find something that is usually there that the paging system can check on. Thanks (4 Replies)
Discussion started by: Beetlejuice
4 Replies

6. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies

7. Solaris

Identifying and grouping OS processes and APP processes

Hi Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages. Any free tools or scripts to do this? Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies

8. UNIX for Dummies Questions & Answers

Processes

Hi all, I needed a little help. It's OS thing. Suppose I have 2 machine connect over a network, I will call my machines as M1and M2. If I copy a files from M1 to M2. What tasks are these two machine performing for copy to work. My assumption is that M1 is performing read action and... (1 Reply)
Discussion started by: vishwesh
1 Replies

9. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies

10. UNIX for Dummies Questions & Answers

processes

may i know a command to find processes not attached to a terminal?? (1 Reply)
Discussion started by: riya9
1 Replies
Query(3pm)						User Contributed Perl Documentation						Query(3pm)

NAME
CGI::Application::Plugin::DevPopup::Query - show CGI query in DevPopup window SYNOPSIS
use CGI::Application::Plugin::DevPopup; use CGI::Application::Plugin::DevPopup::Query; The rest of your application follows ... DESCRIPTION
This module is a plugin for CGI::Application::Plugin::DevPopup. Whenever used, it creates two sections in the DevPopup output. First section, "Current Run Mode", shows name of run mode executed. Second section, "CGI Query", contains a list of CGI query parameters and associated values passed to your CGI::Application. See "query()" in CGI::Application and CGI.pm for more information about query parameters. VERSION
1.03 SUBROUTINES
/METHODS No public methods for this module exist. DEPENDENCIES
CGI::Application::Plugin::DevPopup CONFIGURATION AND ENVIRONMENT
N/A DIAGNOSTICS
N/A SEE ALSO
CGI::Application::Plugin::DevPopup, CGI::Application INCOMPATIBILITIES
Not known. BUGS AND LIMITATIONS
Not known. AUTHOR
Serguei Trouchelle, <mailto:stro@cpan.org> Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa Rozendaal, <mailto:rhesa@cpan.org> LICENSE AND COPYRIGHT
This module is distributed under the same terms as Perl itself. Copyright (c) 2009-2011 Serguei Trouchelle perl v5.12.4 2011-11-01 Query(3pm)
All times are GMT -4. The time now is 05:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy