Sponsored Content
Operating Systems AIX Creating a shell script to check filesystem space Post 302075793 by heprox on Tuesday 6th of June 2006 09:43:04 PM
Old 06-06-2006
Question Creating a shell script to check filesystem space

I need to create a simple shell script to check filesystems space in a file system called "/arch_nb" then based on the percentage use either run another script or exit.

I was thinking of something simple along the lines of:

df -k | then some action to pipe for percentage used

...place all of this in a logic "if/then" clause?

Anyone have something like that already?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script to mount filesystem

Hi, Gurus: I need your help to finish a script that will mount two file systems automatically when saver is reboot or start. I am working on a new Sun Sparc machine with Solaris 9 on it. This box got two disk. disk one has been partitioned to hold Solaris OS. disk two has been partitioned as... (6 Replies)
Discussion started by: duke0001
6 Replies

2. Shell Programming and Scripting

Urgent:FileSystem Check Script

This script monitors a FileSystem named /Monthly and send a page; works great but I need to monitor /Daily/All ....Im getting Syntax Error MSG=`df -Ik|awk '$6~/Monthly$/{gsub("%"," "); if ($5>20){print "FS:Monthly filesystem is "$5"%"}}'` if then echo $MSG | mail 2149724690@mobilecomm.net... (1 Reply)
Discussion started by: Openware
1 Replies

3. Shell Programming and Scripting

Please help - disk space check script

I have a disk space check script that uses an exceptions file, the only issue with the script is that it does not work with values higher than the FSMAX=85 value. I have a file system that is at 92% and it doesn't change, so I would like to add it to the exceptions file. The exceptions file format... (0 Replies)
Discussion started by: maddhadder71
0 Replies

4. Shell Programming and Scripting

Perl script to check free disk space

hello, I have to check the free space on the disk that would work both on Windows and Unix platform e.g on C: \ for Windows and / on Unix. I could use Unix command 'df ' ( my windows system has Unix emulator cygwin and could run 'df ' as well). But I'd like not to rely on system command but... (1 Reply)
Discussion started by: susja
1 Replies

5. Shell Programming and Scripting

Script to check top 5 biggest disk space users

Hi all, I am needing a bash shell script to generate a list of the top 5 users using the most disk space. I am thinking that the du command would be used somehow but I am at a loss. Can anyone help? Thanks! (3 Replies)
Discussion started by: sytemx
3 Replies

6. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

7. Shell Programming and Scripting

Filesystem alert shell script not working!!

Hi All, My below shell script is not capturing %used value in the filesystem alert in the subject of the mail alert: #!/bin/bash export DBALIST="abc@xyz.com" df -k /oradata/xyz/archive > dfk.result archive_capacity=`awk -F" " '{ print $5 }' dfk.result|grep -i %| cut -c 1-4` if ] then... (5 Replies)
Discussion started by: a1_win
5 Replies

8. Shell Programming and Scripting

Shell script for Server Mount Point space check

Does anybody have anything I can use to help me out with this one? (4 Replies)
Discussion started by: lbone007
4 Replies

9. Solaris

archive logs mount point space check script

I have the below shell script which is checking /archlog mount point space on cappire(solaris 10) server. When the space usage is above 80% it should e-mail. When i tested this script it is working as expected. -------------------------------------------------------------------------... (0 Replies)
Discussion started by: dreams5617
0 Replies

10. Shell Programming and Scripting

Filesystem alert shell script not working!!

Hi All, My below shell script is not capturing %used value in the filesystem alert in the subject of the mail alert: Code: #!/bin/bash export DBALIST="abc@xyz.com" df -k /oradata/xyz/archive > dfk.result archive_capacity=`awk -F" " '{ print $5 }' dfk.result|grep -i %| cut -c 1-4` if... (6 Replies)
Discussion started by: harveyclayton
6 Replies
INNDF(8)						    InterNetNews Documentation							  INNDF(8)

NAME
inndf - Report free disk, inodes, and overview information SYNOPSIS
inndf [-Fhi] [-f filename] directory [directory ...] inndf -n inndf -o DESCRIPTION
inndf was originally a replacement for "df | awk" in innwatch.ctl(5) and innstat(8), and now also reports various other usage information about INN's storage that df(1) doesn't understand. inndf doesn't sync, forks less, and is generally less complicated than df(1). Its default behavior is to report free kilobytes (not disk blocks), or free inodes if -i is used, in the file systems holding the directories given on the command line. (A kilobyte in this case is 1024 bytes.) If only one directory is given, the output will be a simple number; if more than one directory is given, the output will be formatted for human readability. If enableoverview is set to true in inn.conf, inndf can also be used to get information about the overview database. With the -n option, it reports a count of the total number of overview records stored. With -o, it reports the percentage of space used in the overview database (for those overview methods where this is meaningful data). OPTIONS
-f filename filename should contain a list of directories to use in addition to those given by the arguments, one per line. Blank lines and anything after "#" on any line are ignored. -F Like -f except that the filename is pathetc/filesystems and it is not an error if this file doesn't exist. (This option is used primarily by such things as innstat(8), so that the news administrator can add additional file systems to check to pathetc/filesystems without having to modify the script.) -h Print a usage message and exit. -i Report the number of free inodes rather than the amount of free disk space. -n Report the total number of records in the overview database. Note that crossposted articles will have one overview record for each newsgroup they're posted to. -o Report the percentage usage of the overview database space. This is only meaningful for overview methods that pre-allocate a certain amount of space rather than grow to accomodate more records. Currently, this flag is only useful for the buffindexed overview method. EXAMPLES
Print the free kilobytes in pathspool as a simple number: inndf <pathspool in inn.conf> Report the free inodes in pathnews and pathspool in a format designed for human readability: inndf -i <pathnews> <pathspool> The same, but also add in all file systems in pathetc/filesystems: inndf -i -F <pathnews> <pathspool> Print out the number of overview records and the percentage space used by a buffindexed overview database: inndf -no HISTORY
inndf was written by Ian Dickinson <idickins@fore.com>. This manual page was written by Swa Frantzen <Swa.Frantzen@belgium.eu.net>. Thanks also to the following folks for ports, patches, and comments: Mahesh Ramachandran <rr@eel.ufl.edu> Chuck Swiger <chuck@its.com> Sang-yong Suh <sysuh@kigam.re.kr> Brad Dickey <bdickey@haverford.edu> Taso N. Devetzis <devetzis@snet.net> Wei-Yeh Lee <weiyeh@columbia.edu> Jeff Garzik <jeff.garzik@spinne.com> and to all the other folks I met and worked with during my 10 years as a newsadmin. Katsuhiro Kondou added the -n and -o options. Russ Allbery added reporting of percentage free disk space. Support for -f and -F was added by Fabien Tassin <fta@sofaraway.org>. $Id: inndf.pod 8232 2008-12-14 17:05:57Z iulius $ SEE ALSO
df(1), innwatch.ctl(5), innstat(8). INN 2.5.2 2009-05-21 INNDF(8)
All times are GMT -4. The time now is 05:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy