Sponsored Content
Top Forums Shell Programming and Scripting Restart debian server if one specific process has more than 10 seconds have high cpu load Post 302752245 by woisch on Sunday 6th of January 2013 11:01:27 AM
Old 01-06-2013
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. Smilie
Hope someone could help me.

Regards
woisch
 

10 More Discussions You Might Find Interesting

1. AIX

Application high CPU load

after a long period of running, the network application's CPU load in our syst em increase slowly, the failed at the end. we use "truss" tool to trace the process, found that it processes something like "semop" ,"semctl","thread_waitlock","kread" kernel call . The trace log file looks like the... (0 Replies)
Discussion started by: Frank2004
0 Replies

2. Red Hat

High cpu load average

Hi Buddies, Thanx for reading my first post... After googling a lot and searching so many forums I am feeling down a bit... Please don't mind my ignorence, and my grammer ... :) My server is running RHEL 2.6.9-5.EL. The cpu load is going higher than roof, almost 100 sometimes. I am... (2 Replies)
Discussion started by: squid04
2 Replies

3. 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

4. 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

5. Red Hat

apache high cpu load on high traffic

i have a Intel Quad Core Xeon X3440 (4 x 2.53GHz, 8MB Cache, Hyper Threaded) with 16gig and 1tb harddrive with a 1gb port and my apache is causing my cpu to go up to 100% on all four cores heres my http.config <IfModule prefork.c> StartServers 10 MinSpareServers 10 MaxSpareServers 15... (4 Replies)
Discussion started by: awww
4 Replies

6. Shell Programming and Scripting

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 ,... (0 Replies)
Discussion started by: yoavbe
0 Replies

7. 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

8. Red Hat

CPU high - apache real server OK, virtual server not

Got two RHEL servers - one real and one virtual/cloud. Both run apache web server. When traffic is applied, CPU seems to go quite high on virtual one (20%) but real is not really affected. Worry is that a further increase in traffic will see a problem. Experience of RHEL is limited. Whats... (2 Replies)
Discussion started by: psychocandy
2 Replies

9. UNIX for Dummies Questions & Answers

I have a 12 core Linux cpu but the load is really high on this box, hovering around 50.

I have a 12 core linux cpu but the load is really high on this box, hovering around 50. What configuration changes do we need to make so that system have no bottleneck. (13 Replies)
Discussion started by: Moon1234
13 Replies

10. 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
vlimit(3)						     Library Functions Manual							 vlimit(3)

Name
       vlimit - control maximum system resource consumption

Syntax
       #include <sys/vlimit.h>

       vlimit(resource, value)

Description
       This facility has been superseded by

       Limits  the  consumption by the current process and each process it creates to not individually exceed value on the specified resource.	If
       value is specified as -1, then the current limit is returned and the limit is unchanged.  The resources which  are  currently  controllable
       are:

       LIM_NORAISE    Pseudo-limit; if set nonzero then the limits may not be raised.  Only the super-user may remove the noraise restriction.

       LIM_CPU	      The maximum number of cpu-seconds to be used by each process.

       LIM_FSIZE      The largest single file which can be created.

       LIM_DATA       The maximum growth of the data+stack region via beyond the end of the program text.

       LIM_STACK      The maximum size of the automatically-extended stack region.

       LIM_CORE       the size of the largest core dump that will be created.

       LIM_MAXRSS     a  soft  limit for the amount of physical memory (in bytes) to be given to the program.  If memory is tight, the system will
		      prefer to take memory from processes which are exceeding their declared LIM_MAXRSS.

       Because this information is stored in the per-process information this system call must be executed directly by	the  shell  if	it  is	to
       affect all future processes created by the shell; limit is thus a built-in command to

       The  system  refuses to extend the data or stack space when the limits would be exceeded in the normal way.  A break call fails if the data
       space limit is reached, or the process is killed when the stack limit is reached.  Since the stack cannot be extended, there is no  way	to
       send a signal.

       A file I/O operation which would create a file which is too large will cause a signal SIGXFSZ to be generated, this normally terminates the
       process, but may be caught.  When the cpu time limit is exceeded, a signal SIGXCPU is sent to the offending process; to allow  it  time	to
       process the signal it is given 5 seconds grace by raising the cpu time limit.

Restrictions
       If LIM_NORAISE is set, then no grace should be given when the CPU time limit is exceeded.

See Also
       csh(1)

																	 vlimit(3)
All times are GMT -4. The time now is 02:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy