Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators How to Post in the The UNIX and Linux Forums URGENT need script for CPU utilization Post 302897235 by shreven on Saturday 12th of April 2014 04:53:50 AM
Old 04-12-2014
URGENT need script for CPU utilization

Hi All
I am new to production support on unix platform
I need a script for the following requirement:
to monitor CPU usage for all the time in a day on unix server.And it has to send mail if CPU hits 100% and the mail also contains which user,process occupying the maximum CPU usage.And if it contains the first 5 processes occupying the large CPU usage in addition it will be grateful.

Everything should be automatic action and in a single script.

Please help me...its emergencySmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script for cpu utilization for each user

Can someone suggest me the script to calculate cpu utilization for each user in solaris say for a period of 24 Hrs or last 12 Hrs I am using solaris 10. Thanks in Advance (1 Reply)
Discussion started by: rajusa10
1 Replies

2. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

3. Shell Programming and Scripting

Script with high CPU utilization

Hi All, i have a script that finds the file with .txt .zip .Z .gzip that are 3 days old in directory /abc/def and removes them find /abc/def -name '0*.txt' -mtime +6 -exec rm {} \; find /abc/def -name '0*.zip' -mtime +6 -exec rm {} \; find /abc/def -name '0*.gzip' -mtime +6... (3 Replies)
Discussion started by: mad_man12
3 Replies

4. Shell Programming and Scripting

High CPU Utilization of the script

There is a script which processes the incoming files from a particular directory and sleeps if it doesnt find any. Currently, i have been told that eventhough there are no files to process, the CPU utilization is very high. An independent evaluation by advisory specialist has found this script does... (2 Replies)
Discussion started by: nandu
2 Replies

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

6. Shell Programming and Scripting

Script to note CPU and Memory Utilization

Hi, I need to write a script which would take the CPU and Memory usage at an interval of 10 mins. I tried using sar, but that does not solve my purpose. Its not only one system that i have, but approximately 10 server from where i need to achive this date. Can anyone share a script or idea... (1 Reply)
Discussion started by: Siddheshk
1 Replies

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

8. Shell Programming and Scripting

Cpu utilization script

I have a set of requirement 1)cpu utilization on a server with pid and and process name. It should display the above and also the script should have an option to record the cpu utilization for a given period of time first part i can get with below commands ps -eo pcpu,pid,user,args or... (5 Replies)
Discussion started by: NarayanaPrakash
5 Replies

9. Shell Programming and Scripting

Automated script for CPU utilization

I am new to production support on unix platform I need a script for the following requirement: to monitor CPU usage for all the time in a day on unix server.And it has to send mail if CPU hits 100% and the mail also contains which user,process occupying the maximum CPU usage.And if it contains the... (2 Replies)
Discussion started by: shreven
2 Replies

10. Red Hat

CPU Utilization and Memory Utilization of Services and Applications

Hi, i am new to linux/RHEL 6.0 and i have two questions. 1) How to get the CPU utilization and Memory Utilization of all Services running currently? 2) How to get the CPU utilization and Memory Utilization of all Applications running currently? Please help me to find the script. ... (2 Replies)
Discussion started by: nossam
2 Replies
less(3pm)						 Perl Programmers Reference Guide						 less(3pm)

NAME
less - perl pragma to request less of something SYNOPSIS
use less 'CPU'; DESCRIPTION
This is a user-pragma. If you're very lucky some code you're using will know that you asked for less CPU usage or ram or fat or... we just can't know. Consult your documentation on everything you're currently using. For general suggestions, try requesting "CPU" or "memory". use less 'memory'; use less 'CPU'; use less 'fat'; If you ask for nothing in particular, you'll be asking for "less 'please'". use less 'please'; FOR MODULE AUTHORS
less has been in the core as a "joke" module for ages now and it hasn't had any real way to communicating any information to anything. Thanks to Nicholas Clark we have user pragmas (see perlpragma) and now "less" can do something. You can probably expect your users to be able to guess that they can request less CPU or memory or just "less" overall. If the user didn't specify anything, it's interpreted as having used the "please" tag. It's up to you to make this useful. # equivalent use less; use less 'please'; "BOOLEAN = less->of( FEATURE )" The class method "less->of( NAME )" returns a boolean to tell you whether your user requested less of something. if ( less->of( 'CPU' ) ) { ... } elsif ( less->of( 'memory' ) ) { } "FEATURES = less->of()" If you don't ask for any feature, you get the list of features that the user requested you to be nice to. This has the nice side effect that if you don't respect anything in particular then you can just ask for it and use it like a boolean. if ( less->of ) { ... } else { ... } CAVEATS
This probably does nothing. This works only on 5.10+ At least it's backwards compatible in not doing much. perl v5.18.2 2013-11-04 less(3pm)
All times are GMT -4. The time now is 08:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy