Sponsored Content
Top Forums Shell Programming and Scripting shell script to alert cpu memory and disk usage help please Post 302558078 by ahamed101 on Thursday 22nd of September 2011 04:43:30 PM
Old 09-22-2011
Code:
root@bt:~# df -H
Filesystem             Size   Used  Avail Use% Mounted on
/dev/sda4               15G   7.6G   5.8G  57% /
none                   1.1G   349k   1.1G   1% /dev
none                   1.1G    25k   1.1G   1% /dev/shm
none                   1.1G    99k   1.1G   1% /var/run
none                   1.1G      0   1.1G   0% /var/lock
none                   1.1G      0   1.1G   0% /lib/init/rw
/dev/sda7               61G    36G    25G  60% /media/Utils
/dev/sda5               17G   3.1G    14G  19% /media/Dev
/dev/sda6               38G    12G    26G  32% /media/New Volume
/dev/sda1               32G    15G    17G  47% /media



df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ if( 100-$5 < 10 ) print $6  "  warning " $1 }'

this will check if available is < 10 and report the warning. What is the exact condition you want to check?

--ahamed
 

10 More Discussions You Might Find Interesting

1. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies

2. Programming

CPU usage and memory usage

Please tell me solaris functions/api for getting following information 1- Function that tells how much memory used by current process 2- Function that tells how much memory used by all running processes 3- Function that tells how much CPU is used by current process 4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

3. UNIX for Dummies Questions & Answers

cpu, memory and virtual memory usage

Hi All, Does anyone know what the best commands in the UNIX command line are for obtaining this info: current CPU usage memory usage virtual memory usage preferably with date and time parameters too? thanks ocelot (4 Replies)
Discussion started by: ocelot
4 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

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

5. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

6. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

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

7. Shell Programming and Scripting

help in high memory usage alert script

can any one please help me to shell script high memory usage alert (6 Replies)
Discussion started by: robo
6 Replies

8. Shell Programming and Scripting

Get the memory and cpu usage

what is the best way to get the memory and cpu usage of a process on any system? this is relatively simple. however, i'm looking for a unified method that would work on linux, sunos, hpux, aix. ps -ef | egrep myprocess | awk '{print $4}' ---> there could be several instances of 'myprocess'... (3 Replies)
Discussion started by: SkySmart
3 Replies

9. Shell Programming and Scripting

Shell script for logging cpu and memory usage of a Linux process

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

10. Shell Programming and Scripting

Help with Shell script that monitors CPU Usage

I'm a newbie to shell scripting, I was given this script to modify. This script that monitors when CPU Usage is too high based off the top command. The comparison is not working as it should. Its comparing a decimal to a regualar interger. When it send me an email, it send an email and ignores the... (21 Replies)
Discussion started by: mhannor
21 Replies
saidar(1)						      General Commands Manual							 saidar(1)

NAME
saidar - a curses-based tool for viewing system statistics SYNOPSIS
saidar [-d delay] [-c] [-v] [-h] DESCRIPTION
saidar is a curses-based tool for viewing the system statistics available through libstatgrab. Statistics include CPU, processes, load, memory, swap, network I/O, disk I/O, and file system information. OPTIONS
The following options are supported. -d DELAY Wait DELAY seconds between updates (default 3) -c Enables coloured output -v Prints the version number -h Display help and exits COLOURED OUTPUT
When the -c option is used saidar uses colours to display the data. Each area has a different colour to distinguish it from the nearby fields. Bold and reverse video effects are used to emphasis fields where necessary. The load average figures are displayed in bold when they're notably (greater that 1) different to each other. This purely shows that a change in the load is occurring. When CPU usage goes over 60% it will be displayed in bold. At 90% the field is displayed using reverse video. Likewise for memory, swap and disk usage at 75% and 90%. Zombie processes are also highlighted. Other values (paging, disk I/O and network I/O) are not highlighted due to the nature of the values; it's not easy to determine what thresholds are significant. SEE ALSO
statgrab(1) statgrab(3) AUTHORS
This man page was written by Bartosz Fenski for the Debian GNU/Linux distribution. WEBSITE
http://www.i-scream.org/libstatgrab/ i-scream $Date: 2006/11/30 23:42:42 $ saidar(1)
All times are GMT -4. The time now is 05:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy