C
clearguy02
Hi folks,
I am looking out for some help here. I am working on an email alert
mechanism.
I need to parse the output of "df- k" command and if the capacity is
more than 50%, the output (pritn statement) of the perl script should
print out the whole line that contains the number, 50%.
Example: diskSpaceCheck.pl
Output of df -k on the unix server:
+++++++++++++++++++++
$ df -k
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/rootvol 15493995 981301 14357755 7% /
/proc 0 0 0 0%
/proc
fd 0 0 0 0%
/dev/fd
mnttab 0 0 0 0%
/etc/mnttab
/dev/vx/dsk/proddg/PRODdata01 15728640 8209296 7460600 53%
/oracle/PROD/data01
+++++++++++++++++++++++++++++++++++
Now the output should print out below two lines:
/oracle/PROD/data01 currently has 53%.
The whole line (/dev/vx/dsk/proddg/PRODdata01 15728640
8209296 7460600 53% /oracle/PROD/data01).
Thanks in advance,
CG
I am looking out for some help here. I am working on an email alert
mechanism.
I need to parse the output of "df- k" command and if the capacity is
more than 50%, the output (pritn statement) of the perl script should
print out the whole line that contains the number, 50%.
Example: diskSpaceCheck.pl
Output of df -k on the unix server:
+++++++++++++++++++++
$ df -k
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/rootvol 15493995 981301 14357755 7% /
/proc 0 0 0 0%
/proc
fd 0 0 0 0%
/dev/fd
mnttab 0 0 0 0%
/etc/mnttab
/dev/vx/dsk/proddg/PRODdata01 15728640 8209296 7460600 53%
/oracle/PROD/data01
+++++++++++++++++++++++++++++++++++
Now the output should print out below two lines:
/oracle/PROD/data01 currently has 53%.
The whole line (/dev/vx/dsk/proddg/PRODdata01 15728640
8209296 7460600 53% /oracle/PROD/data01).
Thanks in advance,
CG