Sponsored Content
Full Discussion: df -k Alerts
Top Forums Shell Programming and Scripting df -k Alerts Post 302373899 by niraj_bhatt on Sunday 22nd of November 2009 11:26:26 PM
Old 11-23-2009
Question df -k Alerts

Hi -

I would like to send an e-mail alerts if in the output below capacity reaches to 80% and 90%

df -k /d500/oracle /d905/oracle /d805/oracle /d705/oracle
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/abcde_raid5_db/d500
52428800 24994408 27221040 48% /d500/oracle
/dev/vx/dsk/abcde_raid5_db/d905
41943040 16203832 25538992 39% /d905/oracle
/dev/vx/dsk/abcde_raid5_db/d805
20971520 10527896 10362888 51% /d805/oracle
/dev/vx/dsk/abcde_raid10/d705
41871360 4102520 37474800 10% /d705/oracle

How to do this in Shell script ?
Thanks in advance
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Vulnerability Alerts

Aside from CERT, are there any additional sources for unix/linux vulnerabilities? (1 Reply)
Discussion started by: kmgrady01
1 Replies

2. Solaris

Alarms/Alerts

Is there a imbedded command (Solaris v8 ksh) that will send an administrative alert/alarm. Or is it just triggering a mail message via shell script? If no, is there a good open-source code someone knows about? Thanks so much in advance for any replies. ...Gozer13 (3 Replies)
Discussion started by: gozer13
3 Replies

3. IP Networking

Email Alerts

Dear Network Masters, I want to know who brought up the concept of Email Alerts Feature. are their any RFC's on Email Alerts???? Please let me know. Thanks in Adv, meti (1 Reply)
Discussion started by: ashokmeti
1 Replies

4. Solaris

sms alerts

how to configure sms alerts in SUN SPARC servers to notify file system , cpu, memory and disk errors. (2 Replies)
Discussion started by: phani.madiraju
2 Replies

5. UNIX for Dummies Questions & Answers

Email Alerts

hi I am running so scripts that clean up empty folders on our servers once a week. I run from a cron. But what i would like to do is add a email notfication so i can be notified that it completed. The script is #Clean Empty Folders on Studio Share perl... (1 Reply)
Discussion started by: treds
1 Replies

6. Solaris

ALOM Email Alerts

Hi I'm new to this forum and I was hoping you can help me with this strange activity. I have a Sol10 sun4u sparc SunFireV250 machine. Currently running ALOM 1.6.8 firmware. The following error was experienced on this machine: "Input power unavailable for PSU @ PS0" Reading the documention... (0 Replies)
Discussion started by: La-Paloma78
0 Replies

7. Emergency UNIX and Linux Support

Grouping of Nagios alerts

Hi! I want to group alerts in Nagios and want to know if and how that can be done? So something like 1 alert for multiple alerts and I am notified only once than multiple times. I tried using nan and nans (two of the opensource solutions) and tried hooking them into Nagios but after... (0 Replies)
Discussion started by: jacki
0 Replies

8. UNIX for Dummies Questions & Answers

Nagios, clean all alerts

In NAGIOS i have an host with lots of alerts , host detail- warnings -service , is there any way to acknowledge all of then at one time , or i have to click in all of then one by one? (3 Replies)
Discussion started by: prpkrk
3 Replies

9. Shell Programming and Scripting

False alerts

Hi I have written a script to send email alerts when load of my linux server reaches max point I keep getting false emails thought the load is normal , looks like same email is generated again and again - called from cron tab checked if the tempfile is present , no it is not , cleaned... (22 Replies)
Discussion started by: anil529
22 Replies
BBHOSTGREP(1)						      General Commands Manual						     BBHOSTGREP(1)

NAME
bbhostgrep - pick out lines in bb-hosts SYNOPSIS
bbhostgrep --help bbhostgrep --version bbhostgrep [--noextras] [--test-untagged] [--bbdisp] [--bbnet] TAG [TAG...] DESCRIPTION
bbhostgrep(1) is for use by extension scripts that need to pick out the entries in a bb-hosts file that are relevant to the script. The utility accepts test names as parameters, and will then parse the bb-hosts file and print out the host entries that have at least one of the wanted tests specified. Tags may be given with a trailing asterisk '*', e.g. "bbhostgrep http*" is needed to find all http and https tags. The bbhostgrep utility supports the use of "include" directives inside the bb-hosts file, and will find matching tags in all included files. If the DOWNTIME or SLA tags are used in the bb-hosts(5) file, these are interpreted relative to the current time. bbhostgrep then outputs a "INSIDESLA" or "OUTSIDESLA" tag for easier use by scripts that want to check if the current time is inside or outside the expected uptime window. OPTIONS
--noextras Remove the "testip", "dialup", "INSIDESLA" and "OUTSIDESLA" tags from the output. --test-untagged When using the BBLOCATION environment variable to test only hosts on a particular network segment, bbtest-net will ignore hosts that do not have any "NET:x" tag. So only hosts that have a NET:$BBLOCATION tag will be tested. With this option, hosts with no NET: tag are included in the test, so that all hosts that either have a matching NET: tag, or no NET: tag at all are tested. --no-down[=TESTNAME] bbhostgrep will query the Xymon server for the current status of the "conn" test, and if TESTNAME is specified also for the current state of the specified test. If the status of the "conn" test for a host is non-green, or the status of the TESTNAME test is dis- abled, then this host is ignored and will not be included in the output. This can be used to ignore hosts that are down, or hosts where the custom test is disabled. --bbdisp Search the bb-hosts file following include statements as a BBDISPLAY server would. --bbnet Search the bb-hosts file following include statements as a BBNET server would. EXAMPLE
If your bb-hosts file looks like this 192.168.1.1 www.test.com # ftp telnet !oracle 192.168.1.2 db1.test.com # oracle 192.168.1.3 mail.test.com # smtp and you have a custom Xymon extension script that performs the "oracle" test, then running "bbhostgrep oracle" would yield 192.168.1.1 www.test.com # !oracle 192.168.1.2 db1.test.com # oracle so the script can quickly find the hosts that are of interest. Note that the reverse-test modifier - "!oracle" - is included in the output; this also applies to the other test modifiers defined by Xymon (the dialup and always-true modifiers). If your extension scripts use more than one tag, just list all of the interesting tags on the command line. bbhostgrep also supports the "NET:location" tag used by bbtest-net, so if your script performs network checks then it will see only the hosts that are relevant for the test location that the script currently executes on. USE IN EXTENSION SCRIPTS
To integrate bbhostgrep into an existing script, look for the line in the script that grep's in the $BBHOSTS file. Typically it will look somewhat like this: $GREP -i "^[0-9].*#.*TESTNAME" $BBHOSTS | ... code to handle test Instead of the grep, we will use bbhostgrep. It then becomes $BBHOME/bin/bbhostgrep TESTNAME | ... code to handle test which is simpler, less error-prone and more efficient. ENVIRONMENT VARIABLES
BBLOCATION If set, bbhostgrep outputs only lines from bb-hosts that have a matching NET:$BBLOCATION setting. BBHOSTS Filename for the Xymon bb-hosts(5) file. FILES
$BBHOSTS The Xymon bb-hosts file SEE ALSO
bb-hosts(5), hobbitserver.cfg(5) Xymon Version 4.2.3: 4 Feb 2009 BBHOSTGREP(1)
All times are GMT -4. The time now is 11:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy