Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server app that crushes when the HDD free space it's a multiple of 4Gb (on a Windows Server 2003). In general i keep track myself o that weekly since i use the machine from time to time.

Can you point out an app or script (i don't wanna install powershell, is this doable???) that copies some larger files from one folder to another to get the free space out of the multiple of 4Gb range.

Best regards, Mike

share|improve this question
    
Hold on.... if I'm understanding you correctly you have an app that crashes if the free space on a certain volume (which?) is a multiple of 4GB, so if the volume has 13GB free the app is fine, but if it drops to 12GB (multiple of 4), then the app crashes? Is that right? –  ThatGraemeGuy Apr 30 '10 at 7:23
    
I'm amazed that instead of fixing or replacing what is obviously a very defective script you are intending to move files as a workaround. I'd dread seeing how the rest of your system is cobbled together. –  John Gardeniers May 31 '10 at 1:35
    
yea... it's a crazy app that crashes then free space is a multiple of 4GB!! it's nuts but this is what is happens –  s.mihai Jun 8 '10 at 15:54

2 Answers 2

Not sure why you tagged it as bash-scripting, but still.

here is how to set up the monitoring part. this will help you set up the script to move the files

I hope this helps.

Out of curiosity: how big is your serverfarm? Or is this a single server in a test/dev environment? If you have a proper serverfarm you might want to consider implementing actual monitoring in the form of Nagios for example?

EDIT: this and this link might, depending on the situation, prove to be even better for you as it allows you to monitor using nothing but the windows events. Didn't know about it myself but I'm trying this solution as I happen to have a problem that might also be solved by this.

share|improve this answer
    
not a big serverfarm. 1 app server 1 backup (same software-hardware setup like the server) 1 data storage and some 4 virtual hosts setup onto it nagios is overkill i think. –  s.mihai Jun 8 '10 at 15:57

You can use/modify this Nagios script. It is should be in VBScript.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.