Mount Point Increase script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mount Point Increase script
# 1  
Old 10-02-2012
Data Mount Point Increase script

Hello all.

My aim is to monitor the size of my mount points. The algo that I want to follow is like this:

1) Use df -h to print all mount points.
2)Extract only Capacity and Mounted On columns and save them in Array1.
3)After 10 minutes , do the above same and save in Array 2 the 2 very same columns.
4)Compare the Capacity columns of Array2 to that of Array1.
5) If Array 2 value of any particular File system is greater than Aarray1, Only then Echo " File system of <Particular-file-system> has increased....

How do I make the array . I want a dynamic array Array1[i] like this . Using df -h how do I sagrigate values and compare them ????

Regards,
Junaid
# 2  
Old 10-02-2012
Try:
Code:
df -Pk | awk 'NR==FNR{s[$6]=$3;next}$3>s[$6]{print $6" has increased."}' - <(sleep 600;df -Pk)

Note that the command will appear to be hung for 10 minutes.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to create a new mount point with 600GB and add 350 GBexisting mount point? IN AIX

How to create a new mount point with 600GB and add 350 GBexisting mount point Best if there step that i can follow or execute before i mount or add diskspace IN AIX Thanks (2 Replies)
Discussion started by: Thilagarajan
2 Replies

2. Shell Programming and Scripting

Script for NFS mount point

Hi , i have create the bash script for nfs but in this script asking for mount point only once it is it prompting for second time. example: do you wants to create any other mount point ? note(if i give yes it should ask me to add the mount point else it should proceed with next step) it... (5 Replies)
Discussion started by: Rahulne25
5 Replies

3. Shell Programming and Scripting

Script to find a mount point on multiple server

Hi, I have to find a mount point called... /opt/recall on multiple servers.. .Could someone give me a suggestion on how I could do this? (2 Replies)
Discussion started by: gartie
2 Replies

4. UNIX for Advanced & Expert Users

Checking the space for /archlog mount point 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. #!/usr/bin/ksh export MAIL_LIST="tlr.voora@zamn.com" export ARCH_STATUS=`df -k... (1 Reply)
Discussion started by: dreams5617
1 Replies

5. Shell Programming and Scripting

Checking the space for /archlog mount point 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

6. 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

7. Red Hat

Increase mount point size after linux installation !

Dear Friends , I have to install Redhat Ent Linux 5.0 (RHEL 5) in my machine . My HDD space is total 40 GB . During installation , I give three partitions , '/' = 30GB, 'swap'=2GB, 'home' =1GB. Now my HDD remaining space is 7 GB . After installation , I need to increase the home... (4 Replies)
Discussion started by: shipon_97
4 Replies

8. Solaris

Increase the mount point of solaris2.6

Hi I have a UNIX system with Sun solaris 2.6 OS. It has a filesystem which is mounted on /osmf/mgmt/condir df -k 2077491 1537111 506637 76% /osmf/mgmt/condir I want to increase the size of this mount point.Is it required to reboot the machine for incresing the mount point space. ... (1 Reply)
Discussion started by: sridharnr
1 Replies

9. AIX

NFS mount point monitoring script

Hi, I'm looking to create a NFS mount point monitoring shell script not sure if im going the right way about it so could do with some help. What i was thinking of doing was using the below command but am unsure how to handle the output. So if the filesyetem is active it will return "1" but if... (4 Replies)
Discussion started by: elmesy
4 Replies

10. AIX

Increase in space in mount point.

I am working in AIX 4.3.3 , here when we are doing one activity we ran out of space in one mount point, we need to increase the space in that mout point by reducing it in another mount point, can anybody help me out in carrying this activity. Vipin (3 Replies)
Discussion started by: vipin77
3 Replies
Login or Register to Ask a Question