Shell script to monitor process with high CPU


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script to monitor process with high CPU
# 1  
Old 04-08-2013
Shell script to monitor process with high CPU

Hi,

Linux redhat 5.5

I need to write a kshell script that shows all the process that consume 100% CPU (or more. strange but there are time that top shows higger value that 100) and they are active more than 5 minute.

The top command shows all the relevat information:
The PID of the cpu , the process name and the ATIME

Please advise

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Process lose its parent then consume high CPU usage ...

Hello. In an informix context, on AIX 5.3 TL 12, we encounter this problem : Sometimes in the day (probably when users exits from their session), a child process lose its parent (PPID is now "1") and this child is consumming lot of CPU "USER". I tried, on different cases, "truss -p... (4 Replies)
Discussion started by: stephnane
4 Replies

2. Shell Programming and Scripting

Monitor the CPU load for each process and total

Hi guys, I have to set up a script which monitors the amount of AVG CPU load per each process and also the total load for a sum of processes. The processes have the same name, I can only differentiate by port number they listen to, as follows : 28171 root 20 0 1089m 21m 3608 S 103... (1 Reply)
Discussion started by: liviusbr
1 Replies

3. Shell Programming and Scripting

Restart debian server if one specific process has more than 10 seconds have high cpu load

Hi, could someone give me an example for a debian server script? I need to check a process if the process has a high cpu load (top). If yes the whole server needs to reboot. Thats it, nothing more. ;) Hope someone could help me. Regards woisch (2 Replies)
Discussion started by: woisch
2 Replies

4. UNIX for Advanced & Expert Users

Shell script to monitor cpu and VMstat, iostat

Hi , I am new to scripting. please help me out how to write a script to monitor cpu , vmstat, iostat in Redhat linux. we are doing the load test. Thanks in advance !!!! (1 Reply)
Discussion started by: saanvi
1 Replies

5. Shell Programming and Scripting

Need help on shell script to monitor each user cpu use on a cluster over time

Hi, I am relatively new to the cluster administration and shell scripting. I need help on a shell script which can help me determine how many cpu's over time, any particular ( or all registered users on a cluster ) are using. To generate data say over a period of week and list of users and their... (6 Replies)
Discussion started by: anuj06
6 Replies

6. Shell Programming and Scripting

Looking for shell script to monitor CPU utilization and send mail once exceed 75%

Dear Group, I'm look for shell script to Monitor CPU usage and send mail once it exceed 75% I'm running Suse10.4. (3 Replies)
Discussion started by: clfever
3 Replies

7. Shell Programming and Scripting

Cron job and shell script to kill a process if memory gets to high

Hello, I'd like to set a cron job that runs a shell script every 30 minutes or so to restart a java based service if the memory gets above 80%. Any advice on how to do this? Thanks in advance! - Ryan (19 Replies)
Discussion started by: prometheon123
19 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. AIX

High CPU utilization by a pro*C process

Hi , we upgarded our AIX from 5.3 to 6.1 and upgraded our xlc compiler from ver 6.0 to 9.0 . After this upgrade one of our pro*C program is utilizing around 20% of the CPU. Before upgarde its using only 0.2 %. when i try to debug using the truss command i got the below error. $... (6 Replies)
Discussion started by: mugunthanvh
6 Replies

10. Programming

how to monitor the child process on which cpu core

Hi all. Sorry to express my questions wrongly in my early post,I repost my question again here. My pc has dual core, I wirte an application with two process, parents process and child process. My quetion is how to realize :if the child process is on core 0,it will tell me I'm on core 0,if it... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
Login or Register to Ask a Question
LONGRUN(1)						      General Commands Manual							LONGRUN(1)

NAME
Transmeta(TM) Crusoe(TM) LongRun(TM) utility SYNOPSIS
longrun [-c device] [-m device] [-hlpv] [-f flag] [-s low high] DESCRIPTION
The longrun utility is used to control and query LongRun settings on Transmeta Crusoe processors. -c device Set the CPUID device. The default CPUID device is /dev/cpu/0/cpuid. -m device Set the MSR device. The default CPUID device is /dev/cpu/0/msr. -h Print help. -l List LongRun information about available performance levels for the CPU. The following values are reported on all Transmeta CPUs that implement LongRun. % An available performance level, expressed as a percentage of range of available core CPU frequencies. 0 corresponds to the lowest available frequency and 100 corresponds to the highest. MHz The core CPU frequency at that level. Volts The core CPU voltage at that level. usage The power usage relative to the maximum performance level. -p Print current LongRun settings and status: whether LongRun is enabled, whether LongRun Thermal Extensions are active, the current LongRun performance window (expressed as a percentile range), the current LongRun performance level (expressed as a percentile), and the current LongRun flags. -v Be more verbose. -f flag Set a LongRun mode flag. Currently, the two supported flags are performance and economy. This controls whether the processor is in "performance mode" or "economy mode". -s low high Set the current LongRun performance window as a percentile range. The low number cannot be greater than the high number. The minimum and maximum performance values accepted by the CPU are 0 and 100, respectively. ENVIRONMENT
No environment variables are used. FILES
This program requires that the Linux CPUID and MSR devices be compiled into the kernel (or loaded as kernel modules), that the CPUID character device be readable, and that the MSR character device be both readable and writable. SEE ALSO
acpid(8), apmd(8), hdparm(8) AUTHOR
Daniel Quinlan <quinlan@transmeta.com> February 14, 2001 LONGRUN(1)