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
LAMNODES(1)                                                          LAM TOOLS                                                         LAMNODES(1)

NAME
lamnodes - Resolve LAM node/CPU notation to Unix hostnames. SYNOPSIS
lamnodes [-chin] [where] OPTIONS
-c Suppress printing the CPU count for each node. -h Print the command help menu. -i Print IP addresses (instead of IP names) -n Suppress printing CPU count for each node DESCRIPTION
The lamnodes command is used to resolve LAM node/CPU nomenclature to Unix hostnames. It can be used to determine the current running con- figuration of the LAM/MPI run-time environment, and generate a boot schema that can be used to launch LAM in the future. By default, lamnodes will print out the node number, default IP name, CPU count, and per-node flags for each node in the running LAM. gethostbyaddr(3) is used to obtain default hostnames. If gethostbyaddr(3) fails, the IP number is displayed instead. This command can be used by setup shell scripts (and the like) to determine information from a currently-running LAM universe. For exam- ple, use lamnodes to resolve particular CPUs and/or nodes to specific unix hostnames. In a batch environment, lamnodes can be used to determine which CPUs share a common node (note that MPI_GET_PROCESSOR_NAME can be used for a similar effect in an MPI program). lamnodes also shows per-node flags. Currently defined flags are: origin The node where lamboot was executed. this_node The node where lamnodes is running. no_schedule The node will not be used to run MPI and serial processes when N and C are used to mpirun and lamexec. EXAMPLES
lamnodes N -n Display IP names and CPU counts for all nodes. This output can be saved and later used with lamboot(1). lamnodes C -n -c Display the IP name of the nodes containing each CPU, and suppress the LAM node number and CPU count. This output can be saved and later used with lamboot(1). SEE ALSO
bhost(5), gethostbyaddr(3), lamboot(1) LAM 7.1.4 July, 2007 LAMNODES(1)