Sponsored Content
Top Forums Shell Programming and Scripting Unix shell script to query linux top consuming processes Post 302567305 by admin_xor on Sunday 23rd of October 2011 11:34:23 PM
Old 10-24-2011
We need to see the existing script to help you further!!! Can you share the SQL query? What do you mean by "automate this task and pass the top processes" if the SQL script can derive the CPU eating processes using by itself as you mentioned?

Please clarify your goal, so that we can help you!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

isql query in unix shell script

Dear all I want to execute some isql command from unix shell script. Kindly suggest me. isql command mention below. isql -U -P use gdb_1 go select count (*) from table_x go (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

2. Shell Programming and Scripting

A simple query on unix shell script

I want to write a script to go to particular path in file and run shell script from there. what will be shell script for the same. (2 Replies)
Discussion started by: shekhar_ssm
2 Replies

3. UNIX for Dummies Questions & Answers

Unix shell script for finding top ten files of maximum size

I need to write a Unix shell script which will list top 10 files in a directory tree on basis of size. i.e. first file should be the biggest in the whole directory and all its sub directories. Please suggest any ideas (10 Replies)
Discussion started by: abhilashnair
10 Replies

4. AIX

Command to find TOP 5 Memory consuming process

HI All, Can anyone send me a command to find TOP 5 Memory consuming process. It would be lelpful if I get output something like below processname - pid - memory(in MB) - command I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Discussion started by: bce_groups
4 Replies

5. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

6. Shell Programming and Scripting

Warning in Top 10 cpu consuming processes

I m using following command to find top 10 cpu consuming processes. However whenever i execute the command i get following warning. What can be done to avoid it? # ps -auxf | sort -nr -k 3 | head -10 Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ root ... (6 Replies)
Discussion started by: pinga123
6 Replies

7. Shell Programming and Scripting

Discrepancy in finding the top memory consuming processes

When I run 'top' command,I see the following Memory: 32G real, 12G free, 96G swap free Though it shows as 12G free,I am not able to account for processes that consume the rest 20G. In my understanding some process should be consuming atleast 15-16 G but I am not able to find them. Is... (1 Reply)
Discussion started by: prasperl
1 Replies

8. Shell Programming and Scripting

Need a script to see top processes for every hour

Hi All, I am new to Scripting , please give me guidance to write the script to see top processes on the Linux operating system. I executed this script on my Virtual Server(Linux) DATE=`date +%Y%m%d%H%M%S` HOME=/home/xmp/testing/xmp_report RADIUS_PID=`xms -xmp sh pr | grep... (2 Replies)
Discussion started by: madala
2 Replies

9. UNIX for Dummies Questions & Answers

Finding the most memory consuming processes in Linux

Platform: Oracle Linux 6.4 To find the most memory consuming processes, I tried the following 2 methods 1. Method1 # ps aux | head -1 ; ps aux | sort -nk +4 | tail -7 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 95 0.0 0.0 0 0 ? ... (2 Replies)
Discussion started by: kraljic
2 Replies

10. UNIX for Dummies Questions & Answers

GNU Linux sleeping processes in top command

hi all sleeping processes in the following output , are they doing anything , but consuming lot of sources, should I need to kill them , how to know , , what they are doing and the output says out of 260 processes only 9 are running , and 251 are sleeping , what does the sleeping means, can... (8 Replies)
Discussion started by: sidharthmellam
8 Replies
Class::DBI::AbstractSearch(3pm) 			User Contributed Perl Documentation			   Class::DBI::AbstractSearch(3pm)

NAME
Class::DBI::AbstractSearch - Abstract Class::DBI's SQL with SQL::Abstract::Limit SYNOPSIS
package CD::Music; use Class::DBI::AbstractSearch; package main; my @music = CD::Music->search_where( artist => [ 'Ozzy', 'Kelly' ], status => { '!=', 'outdated' }, ); my @misc = CD::Music->search_where( { artist => [ 'Ozzy', 'Kelly' ], status => { '!=', 'outdated' } }, { order_by => "reldate DESC", limit_dialect => 'LimitOffset', limit => 1 offset => 2 }); DESCRIPTION
Class::DBI::AbstractSearch is a Class::DBI plugin to glue SQL::Abstract::Limit into Class::DBI. METHODS
Using this module adds following methods into your data class. search_where $class->search_where(%where); Takes a hash to specify WHERE clause. See SQL::Abstract for hash options. $class->search_where(\%where,\%attrs); Takes hash reference to specify WHERE clause. See SQL::Abstract for hash options. Takes a hash reference to specify additional query attributes. Class::DBI::AbstractSearch uses these attributes: o order_by Array reference of fields that will be used to order the results of your query. o limit_dialect Scalar, DBI handle, object class, etc. that describes the syntax model for a LIMIT/OFFSET SQL clause. Please see SQL::Abstract::Limit for more information. o limit Scalar value that will be used for LIMIT argument in a query. o offset Scalar value that will be used for OFFSET argument in a query. Any other attributes are passed to the SQL::Abstract::Limit constructor, and can be used to control how queries are created. For example, to use 'AND' instead of 'OR' by default, use: $class->search_where(\%where, { logic => 'AND' }); AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net> with some help from cdbi-talk mailing list, especially: Tim Bunce Simon Wilcox Tony Bowden This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Class::DBI, SQL::Abstract, SQL::Abstract::Limit perl v5.10.0 2009-07-21 Class::DBI::AbstractSearch(3pm)
All times are GMT -4. The time now is 05:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy