09-19-2013
Script for CPU usage -Linux
Hi all
I was wondering if its possible to write a script to keep CPU usage at 90%-95%? for a single cpu linux server?
I have a perl script I run on servers with multple cpu's and all I do is max all but one cpu to get into the 90'% utilised area. I now need a script that raises the CPU to 90-95% for 15mins on a server with a single cpu.
---------- Post updated at 09:53 AM ---------- Previous update was at 09:52 AM ----------
Sorry, I should add it needs to be at that level for 10-15mins
Last edited by sudobash; 09-19-2013 at 12:35 PM..
10 More Discussions You Might Find Interesting
1. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
2. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
3. UNIX for Advanced & Expert Users
Hi
Is there any shell script that accesses multiple linux servers to get details such as CPU usage, RAM used etc. The access of the servers must be parallel not serial in the sense it must ping all the servers at a time to get information.The script has to be triggered from a host system and get... (7 Replies)
Discussion started by: mssrivatsa
7 Replies
4. UNIX for Dummies Questions & Answers
hi guys
the application guy told me that his server was executing linux commands with some delay...let's say 1-2-3 seconds....
checking the system we found that when the delay took place CPU usage for that command in top was 100%.... this happens for bash, chkconfig, w, df, du among others in... (2 Replies)
Discussion started by: karlochacon
2 Replies
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
Hi ,
Please some one help me How to write a shell script to monitor cpu usage vmstat in Redhat linux .
Thanks, (4 Replies)
Discussion started by: saanvi
4 Replies
7. HP-UX
Hi Experts,
I am executing multiple instances(in parallel) of perl script on HP-UX box.
OS is allocating substantial amount of CPU to these perl processes,resulting higher cpu utilization.
Glance always shows perl processes are occupying majority of the CPU resource. It is causing slower... (2 Replies)
Discussion started by: sai_2507
2 Replies
8. Shell Programming and Scripting
I am looking for a way to log and graphically display cpu and RAM usage of linux processes over time. Since I couldn't find a simple tool to so (I tried zabbix and munin but installation failed) I started writing a shell script to do so
The script file parses the output of top command through... (2 Replies)
Discussion started by: andy_dufresne
2 Replies
9. Shell Programming and Scripting
Hi All,
I have a script which does report the cpu usuage, there are few output parameter/fields displayed from the script. My problem is I have monitor the output and decide
which cpu number (column 2) has maximum value (column 6).
Since the output is displayed/updated every seconds, it's very... (1 Reply)
Discussion started by: Optimus81
1 Replies
10. Shell Programming and Scripting
Hello Friends,
I am trying to create a shell script which will check the CPU utilization. I use command top to check the %CPU usage. It give s me below output
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.31 9.6% 0.0% 6.1% 84.3% 0.0% 0.0%... (3 Replies)
Discussion started by: Nakul_sh
3 Replies
LEARN ABOUT DEBIAN
drawterm
DRAWTERM(1) General Commands Manual DRAWTERM(1)
NAME
drawterm - connect to Plan 9 CPU servers from other operating systems
SYNOPSIS
drawterm [-d] [-a authserver] [-c cpuserver] [-e encription_hash_algs] [-k keyspec] [-s secstoreserver] [-u username] [-C command args ...]
DESCRIPTION
drawterm is not a Plan 9 program. It is a program that users of non-Plan 9 systems can use to establish graphical cpu(1) connections with
Plan 9 CPU servers. Just as a real Plan 9 terminal does, a drawterm serves its local name space as well as some devices (the keyboard,
mouse, and screen) to a remote CPU server, which mounts this name space on /mnt/term and starts a shell. Typically, either explicitly or
via the profile, one uses the shell to start rio(1).
By default, drawterm uses the CPU server $cpu or cpu, and the authentication server $auth or auth,
OPTIONS
This program follows the syntax of the cpu(1) Plan 9 command.
A summary of options is included below.
-h Show summary of options.
-a Specifies the authentication server to use. If not present uses the $auth environment variable, if present, or tries with a host
name of auth.
-c Specifies the cpu server to use. If not present uses the $cpu environment variable, if present, or tries with a host name of cpu.
-u Specifies the username to authenticate with. If not present uses the $USER environment variable, if present, or asks interactively
for an username.
-s Specifies the secstore server to use.
-C Specifies a command to be executed remotely.
-e,-k Allow for selecting the hash algorithm and keys used, they have the same meaning as in cpu(1).
SOURCE
In Plan 9 distributions, /sys/src/cmd/unix/drawterm.
DIAGNOSTICS
Drawterm prints most diagnostics in its own window.
BUGS
Although at first drawterm may seem like a Plan 9 terminal, in fact it is just a way to provide a CPU server with some terminal devices.
The difference is important because one cannot run terminal-resident programs when using drawterm. The illusion can be improved by deli-
cate adjustments in /usr/$user/lib/profile.
Should import latest /dev/draw to allow resize of window
Should copy 9term code and make console window a real 9term window instead.
Should implement /dev/label.
SEE ALSO
cpu(1), rio(1) in the Plan 9 documentation
AUTHOR
drawterm was written by Russ Cox <rsc@swtch.com>.
This manual page was written by Russ Cox <rsc@swtch.com>, with modifications by Martin Ferrari <tincho@debian.org> for the Debian project.
October 16, 2008 DRAWTERM(1)