Urgent:FileSystem Check Script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Urgent:FileSystem Check Script
# 1  
Old 04-25-2008
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 [ "$MSG" != "" ]
then echo $MSG | mail 2149724690@mobilecomm.net
fi
-------------------------------------------------------------
I need to check another filesystem called /Daily/All

Thanks for your help
# 2  
Old 04-25-2008
The slashes around Monthly are the regular expression separator in awk; to specify a regular expression containing literal slashes, you need to backslash them.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

2. AIX

Command to check on which vg filesystem resides

Hi, I need to know on which volume group filesystem resides. TIA (5 Replies)
Discussion started by: sumanthupar
5 Replies

3. Shell Programming and Scripting

Check if NAS filesystem is mounted

Anyone know the best way to check and see if a NAS filesystem is mounted on a linux box. I have no idea where to start :wall:. (2 Replies)
Discussion started by: d3mon_spawn
2 Replies

4. Shell Programming and Scripting

Check This Script very Urgent PLZZZZZ

Hi guys, I am sending the script i created..plzzz check it correct if any mistakes...:). Plz reply early by today.. here i want to find the files based on date , if files are avaliable i want to send a mail to the user. here there are a total of 43 files. they are constant. Here is the... (3 Replies)
Discussion started by: apple2685
3 Replies

5. Solaris

How to check Utilization of single filesystem

Hi all I am facing high utilization of my root partition. below is the output of df -h bash-3.00# df -h Filesystem size used avail capacity Mounted on /dev/md/dsk/d10 9.9G 9.4G 406M 96% / /devices 0K 0K 0K 0% /devices ctfs ... (13 Replies)
Discussion started by: waqasahsan
13 Replies

6. AIX

How to check if a filesystem is part of a cluster

Hello, - How do I know if a filesystem is part of a cluster? - Or do I have to check if the vg related to the fs is part of a cluster instead? if so, how do I check it? - I would also need to check if there are vxfs type inside aix machines and if there are, how do I know if that type of... (2 Replies)
Discussion started by: asanchez
2 Replies

7. Solaris

Unable to check / filesystem

Hi buddies, I have T1000 and Solaris 10 installed on it. After a power failure system shut down improperly. Error Message is WARNING - Unable to repair the / filesystem. Run fsck manually (fsck -F ufs /dev/rdsk/c0t0d0s0). Jul 18 10:16:09 svc.startd:... (6 Replies)
Discussion started by: ahsen
6 Replies

8. AIX

(URGENT) Mounting JFS2 FileSystem on AIX 4.3

Hi Every body, I created Volume Group & FileSystem of type JFS2 with size 1.3 TB on AIX 5.2. I want to import this VG on another system AIX 4.3. It is imported successfully & I can varyon the VG but unfourtantly I couldn't mount the FileSystem. Is it possible to mount a JFS2 FileSystem on AIX... (3 Replies)
Discussion started by: aldowsary
3 Replies

9. AIX

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... (10 Replies)
Discussion started by: heprox
10 Replies

10. Filesystems, Disks and Memory

SCIO Unix Filesystem type - Urgent

I'm installing SCO Unix Open Server 5.05 on an IBM 300PL Desktop with a 60Gig HDD (IDE) and 32 MB physical RAM. When the install goes to the phase where the hard disk needs to be partitioned, I can only see 8 Gig out of the 60Gig that I have on the mahine. I have tried the option of display... (2 Replies)
Discussion started by: budrito
2 Replies
Login or Register to Ask a Question