Sponsored Content
Full Discussion: df, grep, wild card
Operating Systems AIX df, grep, wild card Post 302161366 by DHoffman on Thursday 24th of January 2008 09:41:39 AM
Old 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

using if with wild card patterns

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

ls and wild card - Should be simple!

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

How do I pass a wild card as an argument

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

Wild card in find perm

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

How to use wild card character in string concatenation--please help

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

wild card in if condition not working

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

Grep using wild card issue

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

Passing variable and wild card character to grep in Perl

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

find with wild card [solved]

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

Wild card for dir path

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
Sys::Filesystem::Freebsd(3pm)				User Contributed Perl Documentation			     Sys::Filesystem::Freebsd(3pm)

NAME
Sys::Filesystem::Freebsd - Return Freebsd filesystem information to Sys::Filesystem SYNOPSIS
See Sys::Filesystem. INHERITANCE
Sys::Filesystem::Freebsd ISA Sys::Filesystem::Unix 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. fs_spec Describes the block special device or remote filesystem to be mounted. fs_file Describes the mount point for the filesystem. For swap partitions, this field should be specified as none. If the name of the mount point contains spaces these can be escaped as 40. fs_vfstype Dscribes the type of the filesystem. fs_mntops Describes the mount options associated with the filesystem. fs_freq Used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. fs_passno Used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. SEE ALSO
Sys::Filesystem, Sys::Filesystem::Unix, fstab(5) VERSION
$Id: Freebsd.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 2009,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::Freebsd(3pm)
All times are GMT -4. The time now is 06:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy