1847108 Members
5283 Online
110263 Solutions
New Discussion

Re: Scripts

 
DK Raviraja
Occasional Advisor

Scripts

Hi

Wehere can I get some Space Management Scripts. I would like to monitor space usgae on our servers

DKR Bhat
Mera Bharath Mahan
9 REPLIES 9
Carlos Fernandez Riera
Honored Contributor

Re: Scripts

federico_3
Honored Contributor

Re: Scripts

use this script i got from Andreas Voss



federico
Andreas Voss
Honored Contributor

Re: Scripts

Thanks frederico for distributing my script.
It's nice isn't it ?

Regards
Carlo Henrico_1
Regular Advisor

Re: Scripts

Thanks Federico and Andreas, yes it is nice.
Live fast, die young - enjoy a good looking corpse!
DK Raviraja
Occasional Advisor

Re: Scripts

Hi All

Thanks,

I would like to have some scripts for..

1. Which userid has crossed nnMb of space in his home folder
2. Files which are not tuched fr last 'nnn' days
3. User, File list with different permission
4. Which Mount point has reached a threshhold limit of say 90%

List are many more. Is there any software to generate thes kinds of reports.

Thanks again for those scripts

DKR
Mera Bharath Mahan
Rainer_1
Honored Contributor

Re: Scripts

1. du -sk /home/ # gives total size in KB
2. find -mtime +7 # lists files not touched for 7 days
4. bdf # shows at %used the amount of used space
Dan Hetzel
Honored Contributor

Re: Scripts

Hi,

You could automate the first of your requests (on a filesystem base) by turning quotas on.

Your second wish is a typical use of 'find'. Rainer gave you an example, here above.

I'm not sure to understand your "3. User, File list with different permission". Could you please explain ?

# bdf | sort -nk5
will list all your mounted filesystems, sorting them by %used.

Best regards,

Dan






Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
James R. Ferguson
Acclaimed Contributor

Re: Scripts

Hi:

The 'find' command is also useful for finding files with various permissions that meet your criteria.

# find /tmp -perm -g=x

finds all files in /tmp where the Group has eXecute permission.

# find /tmp -perm -o=r -a -perm -o=x

find all files in /tmp where Read and eXecute (search) are allowed for Others.

# find /tmp -perm 777

find all files in /tmp with 'rwx' permissions for the owner, the group, and others.

See the man pages for 'find' and 'chmod'.

...JRF...
Madhu Sudhan_1
Respected Contributor

Re: Scripts

Here is another one. The beauty of this script is to format the bdf ouput of all the servers in your network in excel format and e-mails it to you. With little modifications in this script you can make it work for your environment.Try this.

Enjoy !

PS: Assign points. From your profile it shows, you have assigned 5 for 36 responses. Not a very good track record isn't it ??
Think Positive