Does anyone have a script that I can run from within Windows NT that will provide an e-mail notification when a users home directory is above a certain (75%) threshold of available space remaining.
I know the script would not be dynamic though running it once a day would be sufficient.
I running 6.1R1 on a F740
Regards,
Michael Grey Supervisor - Operations Support Information Technology Services Toronto Transit Commission 416-393-6791 michael.grey@ttc.ca
The simple script below doesn't integrate the automatic email, but does give a list of users you would want to notify. Diruse.exe is a utility from the Windows NT resource kit. As written below, it gives a list of all directories with more than 300 Meg. The diruse.txt file lists the home directory name, so if the name matches an email address, you could use blat.exe (www.cmdtools.com) to send email.
My personal preference would be to use unix tools for a script like this because the scripting is much cleaner, but this could be done from an NT environment also. If nobody else has a script like this, I'll try to find some time to put one together.
------------------- quota.cmd ------------------------ :: This file checks the size of home directories on the filer. :: The file diruse.log is created in the directory you run it from. :: by Andy Flores diruse \filer\home /m /* /q:300 /d /l -------------------------------------------------------
----- Original Message ----- From: "Grey, Michael" Michael.Grey@ttc.ca To: toasters@mathworks.com Sent: Tuesday, September 18, 2001 4:09 AM Subject: E-mail warning to CIFS users about quota limit remaining
Does anyone have a script that I can run from within Windows NT that will provide an e-mail notification when a users home directory is above a certain (75%) threshold of available space remaining.
I know the script would not be dynamic though running it once a day would
be
sufficient.
I running 6.1R1 on a F740
Regards,
Michael Grey Supervisor - Operations Support Information Technology Services Toronto Transit Commission 416-393-6791 michael.grey@ttc.ca
There is a script available on now, that does what you ask.
http://now.netapp.com/NOW/download/tools/disk_usage/
It is however a perl script, but you might be able to run it under perl for windows. Assuming there is a working implementation of the rsh command for windows, and if you could substitute something for the unix mail command. Lots of people use perl for windows, so it should be relatively easy to find a mail workaround. Not really sure about the rsh though.
The script also assumes that you are using user quotas. I got that impression from your message.
It would of course be easier to implement on a *NIX box if you have any.
Matt
Actually, after looking at it, it shouldn't be a problem to convert it to Windoze. Mail scripts such as Blat work fine with Perl. ----- Original Message ----- From: "Matt Graham" mgraham@resgen.com To: "Grey, Michael" Michael.Grey@ttc.ca; "toasters" toasters@mathworks.com; "Israel, Meital" meital.israel@intel.com Sent: Thursday, September 20, 2001 3:29 PM Subject: Re: E-mail warning to CIFS users about quota limit remaining
: There is a script available on now, that does what you ask. : : http://now.netapp.com/NOW/download/tools/disk_usage/ : : It is however a perl script, but you might be able to run it under perl for : windows. Assuming there is a working implementation of the rsh command for : windows, and if you could substitute something for the unix mail command. Lots : of people use perl for windows, so it should be relatively easy to find a mail : workaround. Not really sure about the rsh though. : : The script also assumes that you are using user quotas. I got that impression : from your message. : : It would of course be easier to implement on a *NIX box if you have any. : : : Matt : -- : __________________________________________________________ : If you can remain calm, you just don't have all the facts¿ : : : "Grey, Michael" wrote: : > : > Does anyone have a script that I can run from within Windows NT that will : > provide an e-mail notification when a users home directory is above a : > certain (75%) threshold of available space remaining. : > : > I know the script would not be dynamic though running it once a day would be : > sufficient. : > : > I running 6.1R1 on a F740 : > : > Regards, : > : > Michael Grey : > Supervisor - Operations Support : > Information Technology Services : > Toronto Transit Commission : > 416-393-6791 : > michael.grey@ttc.ca :