The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
wild card & regular expressions eerener UNIX for Dummies Questions & Answers 1 09-30-2007 09:04 PM
Wild card in find perm braindrain Shell Programming and Scripting 1 04-12-2007 03:24 PM
How do I pass a wild card as an argument eja UNIX for Dummies Questions & Answers 2 03-28-2007 11:03 AM
ls and wild card - Should be simple! GNMIKE UNIX for Dummies Questions & Answers 2 10-13-2005 04:41 AM
using if with wild card patterns rooh UNIX for Dummies Questions & Answers 1 05-18-2002 04:15 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-23-2008
Registered User
 

Join Date: Oct 2007
Posts: 289
Unhappy df, grep, wild card

Hi,

I want to monitor my filesystem capacity and I want to df with grep wildcard for all 9*%.

Is this possible? I want to replaced all the existing complicated scripts I have in the system.

Thanks,
Itik
Reply With Quote
Forum Sponsor
  #2  
Old 01-23-2008
Registered User
 

Join Date: Nov 2006
Location: Austria/Vienna
Posts: 235
Code:
df | grep 9.%
Reply With Quote
  #3  
Old 01-24-2008
Registered User
 

Join Date: Jan 2008
Posts: 2
If your system is running AIX 5.2 or 5.3, I would suggest using the AIX Remote Monitoring and Control (RMC) facility. Run the following command to see if the required fileset is installed:

lslpp -l rsct.core.errm

If it is installed, then you can let the AIX kernel monitor the filesystem space used. The operating system can be configured to send alerts both when the space used goes above a specified level and also when it drops below a specified level.

The following command creates a monitoring condition called "Filesystem space 2" to monitor the filesystems /u01 and /u02. An event will be generated when the space used goes above 85% and a rearm event will be generated when it falls below 80% (the following all goes on one line):

mkcondition -r "IBM.FileSystem" -e "PercentTotUsed > 85"
-E "PercentTotUsed < 80" -d "An event will be generated when more than 85 percent of the total space of the filesystem is in use." -D "The event will be rearmed when the percent of the space used in the filesystem falls below 80 percent." -s "Name == \"/u01\" || Name == \"/u02\"" -S i -m l "Filesystem space 2"

The following command creates a response called "E-mail app support" which is in effect seven days a week, 24 hours a day. It will send an e-mail to an alias "appmail" which is defined within /etc/aliases:

mkresponse -n "E-mail app support" -d "1-7" -t "0000-2400" -s "/usr/sbin/rsct/bin/notifyevent appmail" -r "-1" -e "b" "E-mail app support"

(Again, the above command would be typed all on one line)

Finally, you tie the response to the condition and start the monitoring:

startcondresp "Filesystem space 2" "E-mail app support"

Some of the commands that are available:

lscondition: lists existing conditions and their status (enabled/disabled)
lscondition "Filesystem space 2" (the quotes are required): lists the details about condition "Filesystem space 2"
lscondresp: lists existing responses
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:32 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0