Sponsored Content
Operating Systems AIX Script to identify high CPU usage processes Post 302468584 by purdym on Wednesday 3rd of November 2010 08:25:45 AM
Old 11-03-2010
I use a command such as:

Code:
ps -eF "%C %u %n %p %a" | grep -vE "^ *0\.0|defunct|CPU|high_cpu|init"

If I remember right it won't match nmon because ps will list the CPU usage since the process started - not the instantaneous CPU usage.

Example output:

Code:
>high_cpu

=======================================================================================================================================
/home/unxsa/bin/high_cpu started at Wed Nov  3 07:24:34 CDT 2010 on ms.
=======================================================================================================================================
CPU    User       Nice   CPU  PID        Command
---------------------------------------------------------------------------------------------------------------------------------------
10.0   root       24     -    1147122    /usr/java5/jre/bin/java -Dhcdaemon -Dhmc -Djava.class.path=/opt/csm/codebase:/opt/freeware
0.2    root       20     -    307414     /usr/bin/dsmc sched
---------------------------------------------------------------------------------------------------------------------------------------

=======================================================================================================================================
/home/unxsa/bin/high_cpu ended at Wed Nov  3 07:24:34 CDT 2010 on ms.
=======================================================================================================================================

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

identify the unix processes performing high disk i/o reads and writes

I would like to write shell/perl script which identifies the top unix processes that are performing high disk I/O's or/and writes If any one knows the solution please help me? -Swamy (0 Replies)
Discussion started by: avsswamy
0 Replies

2. Ubuntu

High System CPU Usage

I am running a Dell PE R815 with 4 x AMD 12 core CPUs with 128GB of RAM and a RAID 5 array of 6 SAS disks. This is an HPC application and is definitely CPU bound, however once I run 16 of these processes (thus pinning 16 cores) the work performed slows down dramatically, to maybe 5 or 10% of what... (2 Replies)
Discussion started by: mowmentous
2 Replies

3. AIX

HELP!!! high CPU usage with ITM kuxagent

ibm tivoli monitor's kuxagent is taking up a lot of cpu usage. anybody has any idea? i attatched a screenshot. (3 Replies)
Discussion started by: curtis911
3 Replies

4. Shell Programming and Scripting

Identify CPU usage on the Linux server

We are using linux server. We have below script running on the crontab and it send the alert if the cpu usage is above 90%. My question is, the below script tells the CPU usage for one CPU or all CPU in the server? sar 1 1 | sed '$!d' | awk '{printf("%d", $8)}' > $SAR_LOG Please let me... (4 Replies)
Discussion started by: govindts
4 Replies

5. Linux

System Went panic after CPU usage high

Hi All, Yesterday my Linux server went panic and even a small command took a lot of time to run. When i monitored pl find the below output Cpu(s): 0.1%us, 98.4%sy, 0.0%ni, 1.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st the time spent on kernel mode is 98 % and also idle time is around 1.5 %...... (4 Replies)
Discussion started by: jegaraman
4 Replies

6. AIX

Identify All Processes memory and cpu usage.

Hi All, Anyone has script to monitor AIX total processes memory and cpu usage that contribute to the total memory and CPU utilize so far ? The purpose of this is to analyze process memory trend. Thanks. Best Regards, ckwan (2 Replies)
Discussion started by: ckwan
2 Replies

7. AIX

High CPU Usage , users affected

Dear All, One production Server is affected by high usage. Application is slow now. Please guide me how to solve it? NMON Report shows full cpu usage. Here im posting some server details. bash-3.2# lparstat -i Node Name : ********* Partition Name ... (6 Replies)
Discussion started by: Thala
6 Replies

8. Shell Programming and Scripting

High cpu usage

I have created one script and i have added it into cron to run after 10 mins. However I have noted that whenever that script runs, It causes CPU utilization of server to increase about 10-20 % I have rechecked script and there is no way i can make changes, Script contain only 2-3 commands. So... (4 Replies)
Discussion started by: Nakul_sh
4 Replies

9. Solaris

How can i restrict user high cpu usage?

HI In my M5000 , one of domain is having SAp installed. from today onwards we are facing some stange issue. when we start SAP application, that particular user is taking 95 % of system CP and renaming 5 % is taken by system . because of this reason application is slow. i have 4 CPU(32... (4 Replies)
Discussion started by: bentech4u
4 Replies

10. UNIX for Advanced & Expert Users

Identify cause of high resource usage

hello all, on linux servers sometimes any of these resources (cpu,memory,disk) get a spike when you are not in front of the server. the duration of these spikes might be 5 mins or even whole weekend. my question is there a good way of capturing the events that caused these issues ( cpu or... (5 Replies)
Discussion started by: coolatt
5 Replies
trafgen(8)							netsniff-ng-toolkit							trafgen(8)

NAME
trafgen - a high-performance zero-copy network packet generator SYNOPSIS
trafgen [-d|--dev <netdev>][-c|--conf <file>][-J|--jumbo-support] [-x|--interactive][-n|--num <uint>][-r|--rand][-t|--gap <usec>] [-S|--ring-size <size>][-k|--kernel-pull <usec>][-b|--bind-cpu <cpu>] [-B|--unbind-cpu <cpu>][-H|--prio-high][-Q|--notouch-irq][-v|--version] [-h|--help] DESCRIPTION
A high-performance network traffic generator that uses the zero-copy TX_RING for network I/O. For instance, on comodity Gigabit hardware up to 1,488,095 pps 64 Byte pps have been achieved with trafgen. OPTIONS
trafgen --dev eth0 --conf trafgen.txf --bind-cpu 0 Use packet configuration trafgen.txf, eth0 as transmission device and CPU0 for binding the process. OPTIONS
-h|--help Print help text and lists all options. -v|--version Print version. -d|--dev <netdev> Device for transmission i.e., eth0. -c|--conf <conf> Path to packet configuration file. -x|--interactive Start trafgen in interactive mode. -J|--jumbo-support Support for 64KB Super Jumbo Frames -n|--num <uint> Number of packets to generate before exiting. 0 means forever until SIGINT. -r|--rand Randomize packet selection process instead of round-robin. -t|--gap <uint> Interpacket gap in microseconds. -S|--ring-size <size> Manually set ring size to <size>: mmap space in KB/MB/GB. -k|--kernel-pull <uint> Kernel pull from user interval in microseconds. Default value is 10 microseconds. -b|--bind-cpu <cpu> Bind to specific CPU (or CPU-range). -B|--unbind-cpu <cpu> Forbid to use specific CPU (or CPU-range). -H|--prio-high Make this high priority process. -Q|--notouch-irq Do not touch IRQ CPU affinity of NIC. EXAMPLES
Generate traffic defined in trafgen.txf on eth0 using CPU 0 trafgen --dev eth0 --conf trafgen.txf --bind-cpu 0 Generate traffic on eth0 using CPU 0, wait 100 us between packets trafgen --dev eth0 --conf trafgen.txf --bind-cpu 0 --gap 100 Generate 100,000 packet on eth0 using CPU 0 trafgen --dev eth0 --conf trafgen.txf --bind-cpu 0 --num 100000 AUTHOR
Written by Daniel Borkmann <daniel@netsniff-ng.org> DOCUMENTATION
Documentation by Emmanuel Roullit <emmanuel@netsniff-ng.org> BUGS
Please report bugs to <bugs@netsniff-ng.org> 2012-06-29 trafgen(8)
All times are GMT -4. The time now is 09:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy