netcurmudgeon (netcurmudgeon) wrote,

  • Mood:
  • Music:

Minding the store

In the past month Mark-my-unidicted-co-conspriator has been bitten a couple of times by servers under his team's care running short of disk space. I was thinking about this a couple of days ago — something along the lines of "what Mark needs to do is write a little VB [Microsoft Visual Basic] app that uses WMI [the Windows Management Interface] to connect to the servers and pull disk stats". Then I realized that if Mark had the time to write said little VB app he would have done it already.

Well, I don't know next to nothing about VB or WMI programming. But I do know Perl and I have Samba (the package that lets Unix/Linux boxes act like Windows file servers). A quick search on cpan turned up a module that lets me drive the Samba client from within a Perl scrip. Retreiving disk space statistics is one of the basic functions the Samba client can perform.

A couple of hours of hacking later and SpaceCadet was born. It's running once a day through cron on my NMS box. It pleases my sense of guerilla justice that I'm now minding the health of a herd of Windows 2000 servers from my little Linux box.

Mark gets back tomorrow from a couple of days off ; hopefully he'll find this a welcome surprise.

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.