01-24-2008
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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Please help me.
Suppose I have a file which contains files like:
My file :/tmp/rooh_20020518.lst
it consists:
ASI00320225041925URD01
ASI00320225041925KER02
ASI00390228095244KER08 ... (1 Reply)
Discussion started by: rooh
1 Replies
2. UNIX for Dummies Questions & Answers
I am trying to cp files that have F0 as prefix in their name in path p1/p2 to path p3/p4
this command does not work - Why? (I am using HP/UX)
cp p1/p2/F0* p3/p4
thanks. (2 Replies)
Discussion started by: GNMIKE
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I would like to pass a wild card as part of an argument. But when I do it the script views the wild card as text.
Example:
sFile=MG1A*
sort $sFile > $sFile.sorted
What I get is MG1A*.sorted
The problem is I am passed a series of files where the first few characters like "MG1A"... (2 Replies)
Discussion started by: eja
2 Replies
4. Shell Programming and Scripting
Hi,
Is there a way to use find command to list the directories for certain permissions. I know we can use find . -type d -perm nnn, where nnn is the permission number . However I wold like to know if I wanna search for wild card permissions i.e 75* / 7* / 55* , as i do not know the actual... (1 Reply)
Discussion started by: braindrain
1 Replies
5. Shell Programming and Scripting
Hi All,
I'm new to shell scripting. Please help me in achieving this
I am trying to a find regular expression that need to pick a file with begin with the below format and this code is called in xml file.
currently the script accepts:... (0 Replies)
Discussion started by: vasavi_cherku
0 Replies
6. Shell Programming and Scripting
Hi,
I am using RHEL5.
I have following if condition.
if
In the above condition, if the value of a contains word WARNING, it should match. i.e., WARNING_MESSAGE, CRITICAL WARNING, WARNING ALERT etc. it should match.
For b, alert error, ALERT ERROR, ERROR IMMEDIATE ACTION REQUIRED, etc... (2 Replies)
Discussion started by: user7509
2 Replies
7. Shell Programming and Scripting
Hi,
I am having a file (file1) having following contents
" xet B - All Divers/All Rivers - - ns - "
Now when i use
cat file1 | grep 'RF'
it doesn't returns anything.
But on using
cat file1 | grep 'RF*'
shows me... (6 Replies)
Discussion started by: sarbjit
6 Replies
8. Shell Programming and Scripting
HI All,
I have a script that needs to find out a list of files in a directory, i pass the search parameter as an argument.
opendir ( DIR, $dir ) || die "Error in opening dir $dirname\n";
@filename1 = (grep {/$File_pattern/ } readdir(DIR));
The problem is my file patterns are like... (1 Reply)
Discussion started by: amit1_x
1 Replies
9. Shell Programming and Scripting
Can somebody help me with the following syntax? I want to find all
files that end with *.arc
SUFFIX=".arc"
find /tmp -name "\*$SUFFIX" -print 2>/dev/null
---------- Post updated at 03:45 PM ---------- Previous update was at 03:41 PM ----------
got it thanks
-name... (0 Replies)
Discussion started by: BeefStu
0 Replies
10. Shell Programming and Scripting
I have dir structure like this :
/opt/oracle/product/abc/sqlplus/admin/
/opt/oracle/product/def/sqlplus/admin
/opt/oracle/product/ghi/sqlplus/admin
I am trying to use wildcard ( for dirs abc,def,ghi) ..something like this :
cp xyz.txt ... (1 Reply)
Discussion started by: talashil
1 Replies
LEARN ABOUT DEBIAN
sys::filesystem::aix
Sys::Filesystem::Aix(3pm) User Contributed Perl Documentation Sys::Filesystem::Aix(3pm)
NAME
Sys::Filesystem::Aix - Return AIX filesystem information to Sys::Filesystem
SYNOPSIS
See Sys::Filesystem.
INHERITANCE
Sys::Filesystem::Aix
ISA UNIVERSAL
METHODS
version ()
Return the version of the (sub)module.
ATTRIBUTES
The following is a list of filesystem properties which may be queried as methods through the parent Sys::Filesystem object.
account
Used by the dodisk command to determine the filesystems to be processed by the accounting system.
boot
Used by the mkfs command to initialize the boot block of a new filesystem.
check
Used by the fsck command to determine the default filesystems to be checked.
dev Identifies, for local mounts, either the block special file where the filesystem resides or the file or directory to be mounted.
free
This value can be either true or false. (Obsolete and ignored).
mount
Used by the mount command to determine whether this file system should be mounted by default.
nodename
Used by the mount command to determine which node contains the remote filesystem.
size
Used by the mkfs command for reference and to build the file system.
type
Used to group related mounts.
vfs Specifies the type of mount. For example, vfs=nfs specifies the virtual filesystem being mounted is an NFS filesystem.
vol Used by the mkfs command when initializing the label on a new filesystem. The value is a volume or pack label using a maximum of 6
characters.
log The LVName must be the full path name of the filesystem logging logical volume name to which log data is written as this file system is
modified. This is only valid for journaled filesystems.
SEE ALSO
Sys::Filesystem
Example /etc/filesystems
* @(#)filesystems @(#)29 1.22 src/bos/etc/filesystems/filesystems, cmdfs, bos530 9/8/00 13:57:45
* IBM_PROLOG_BEGIN_TAG
* This is an automatically generated prolog.
*
* <snip>
*
* This version of /etc/filesystems assumes that only the root file system
* is created and ready. As new file systems are added, change the check,
* mount, free, log, vol and vfs entries for the appropriate stanza.
/:
dev = /dev/hd4
vol = "root"
mount = automatic
check = false
free = true
vfs = jfs2
log = /dev/hd8
type = bootfs
/proc:
dev = /proc
vol = "/proc"
mount = true
check = false
free = false
vfs = procfs
/scratch:
dev = /dev/fslv02
vfs = jfs2
log = INLINE
mount = true
account = false
Example /usr/sbin/mount output
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Mar 24 12:14 rw,log=/dev/hd8
/proc /proc procfs Mar 24 12:15 rw
/dev/fslv02 /scratch jfs2 Mar 24 12:15 rw,log=INLINE
filesystems(4)
Manpage includes all known options, describes the format and comment char's.
VERSION
$Id: Aix.pm 128 2010-05-12 13:16:44Z trevor $
AUTHOR
Nicola Worthington <nicolaw@cpan.org> - <http://perlgirl.org.uk>
Jens Rehsack <rehsack@cpan.org> - <http://www.rehsack.de/>
COPYRIGHT
Copyright 2004,2005,2006 Nicola Worthington.
Copyright 2008-2010 Jens Rehsack.
This software is licensed under The Apache Software License, Version 2.0.
<http://www.apache.org/licenses/LICENSE-2.0>
perl v5.10.1 2010-05-18 Sys::Filesystem::Aix(3pm)