Sponsored Content
Top Forums Shell Programming and Scripting Script to produce report of High Utilization Processes Post 302507503 by thinakarmani on Thursday 24th of March 2011 04:33:28 AM
Old 03-24-2011
Hi Chubler_XL,

Thanks for your reply. I need output in the below format. For each process id listed in the prstat command, I need fetch the process detail through ps command and append in the same row of prstat command.

It means, additional column of PROCESS_DETAIL (cleard_relcom -C dom=clasuat2 -g 5 -i 21 -u clauat02) added in each row of the respective process id listed in the prstat command.

Expected output.
Code:
   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP PROCESS_DETAIL
  7241 tuxedo    269M  152M sleep   59    0   1:07.36 1.2% cleard/4     cleard_relcom -C dom=clasuat2 -g 5 -i 21 -u clauat02 -U /opt/tuxedo/appsrv_clasu
 23213 tuxedo    198M   95M sleep   59    0   0:11.15 0.7% cleard/4     cleard_batch -C dom=clasuat2 -g 5 -i 21 -u clauat02 -U /opt/tuxedo/appsrv_clasu
 18524 tuxedo    274M  158M sleep   59    0   0:31.10 0.7% cleard/4     cleard_batch -C dom=clasuat2 -g 5 -i 21 -u clauat02 -U /opt/tuxedo/appsrv_clasu
 24827 tuxedo    202M  120M sleep   59    0   0:06.46 0.5% WSH/4        WSH -C dom=clasuat2 -g 5 -i 21 -u clauat02 -U /opt/tuxedo/appsrv_clasu
 15415 tuxedo    139M   37M sleep   59    0   0:07.45 0.5% cleard/4     cleard_cb -C dom=clasuat2 -g 5 -i 21 -u clauat02 -U /opt/tuxedo/appsrv_clasu   
 NPROC USERNAME  SIZE   RSS MEMORY      TIME  CPU
    49 tuxedo   7129M 2524M    32%   5:51.53 6.6%

Total: 49 processes, 191 lwps, load averages: 0.46, 0.69, 0.70


Last edited by Franklin52; 03-24-2011 at 06:20 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Solaris

High CPU Utilization

Good morning, I need some help figuring out what's eating up my cpu. My application can't get enough cpu to do its job. this is a sunfire V440 2CPU's at 1/593 GHZ with 8GB of memory. In the morning hours the box is at less than 3%. I can't figure out what else is using the CPU. We use foglight and... (2 Replies)
Discussion started by: bbouhaik
2 Replies

2. AIX

High CPU utilization

Hi am facing high cpu utilization on my sybase server. I have P550 Number Of Processors: 4 Processor Clock Speed: 1656 MHz CPU Type: 64-bit Kernel Type: 32-bit LPAR Info: 1 65-D837E Memory Size: 7840 MB in topas it shows Name PID CPU% PgSp Owner dataserv 565264 ... (1 Reply)
Discussion started by: vjm
1 Replies

3. Shell Programming and Scripting

Unix Script to find and kill a process with high memory utilization

Hi Unix Gurus i am somewhat new to unix scripting so need your help to create a script as below. # This script would find the process consuming memory beyond a certain #limit. if the meemory consumption is more than 100% for a period of 1 # minute for the specific process. the script would... (0 Replies)
Discussion started by: robinforlinux
0 Replies

4. Shell Programming and Scripting

Script with high CPU utilization

Hi All, i have a script that finds the file with .txt .zip .Z .gzip that are 3 days old in directory /abc/def and removes them find /abc/def -name '0*.txt' -mtime +6 -exec rm {} \; find /abc/def -name '0*.zip' -mtime +6 -exec rm {} \; find /abc/def -name '0*.gzip' -mtime +6... (3 Replies)
Discussion started by: mad_man12
3 Replies

5. Shell Programming and Scripting

High CPU Utilization of the script

There is a script which processes the incoming files from a particular directory and sleeps if it doesnt find any. Currently, i have been told that eventhough there are no files to process, the CPU utilization is very high. An independent evaluation by advisory specialist has found this script does... (2 Replies)
Discussion started by: nandu
2 Replies

6. AIX

Script to identify high CPU usage processes

Hi Guys, I need to write a script capable of identifying when a high cpu utilitzation process. It sounds simple but we are on a AIX 5.3 environment with Virtual CPU's (VP's) and logical CPU's. Please any ideas or tips would be highly appreciated. Thanks. Harby. (6 Replies)
Discussion started by: arizah
6 Replies

7. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

8. Shell Programming and Scripting

script to check high cpu utilization for java process

Hello Team, I need help in preparing script to check for high cpu utilisation for java process. I have many java process on my system which consumes high cpu so i have to monitor it using script. ---------- Post updated 12-10-10 at 02:21 AM ---------- Previous update was 12-09-10 at... (1 Reply)
Discussion started by: coolguyamy
1 Replies

9. UNIX for Advanced & Expert Users

high cpu utilization

good morning. just wanted to ask if there's a way to check what causes the high cpu utilization of a server for the past 2 months? My jffnms report resulted to high utilization for a specific server last month. is there a way to check via a command line? thanks (9 Replies)
Discussion started by: lhareigh890
9 Replies

10. Shell Programming and Scripting

Help in modifying existing Perl Script to produce report of dupes

Hello, I have a large amount of data with the following structure: Word=Transliterated word I have written a Perl Script (reproduced below) which goes through the full file and identifies all dupes on the right hand side. It creates successfully a new file with two headers: Singletons and Dupes.... (5 Replies)
Discussion started by: gimley
5 Replies
clock(3C)																 clock(3C)

NAME
clock() - report CPU time used SYNOPSIS
DESCRIPTION
returns the amount of CPU time (in microseconds) used since the first call to The time reported is the sum of the user and system times of the calling process and its terminated child processes for which it has executed , or (see wait(2) , system(3S), and popen(3S)). To deter- mine the time in seconds, the value returned by should be divided by the value of the macro The resolution of the clock varies, depending on the hardware and on software configuration. If the processor time used is not available or its value cannot be represented, the function returns the value WARNINGS
The value returned by is defined in microseconds for compatibility with systems that have CPU clocks with much higher resolution. Because of this, the value returned wraps around after accumulating only 4295 seconds of CPU time (about 72 minutes). DEPENDENCIES
The default clock resolution is 10 milliseconds. SEE ALSO
times(2), wait(2), system(3S), thread_safety(5). STANDARDS CONFORMANCE
clock(3C)
All times are GMT -4. The time now is 11:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy