Author Topic: Monitoring Disk Utilisation on Terastation  (Read 4262 times)

salty

  • Calf
  • *
  • Posts: 3
Monitoring Disk Utilisation on Terastation
« on: July 01, 2009, 08:48:57 AM »
   

Is there a simple way of monitoring free disk space on Terastations? I know NAS Navigator displays the info, but not on multiple subnets, and I'd rather not log into the web interfaces on multiple NAS boxes to find out. A script would be great (that could run on a windows box), or a NAS Navigator would do if it could be pointed at several IPs over different subnets.

 

Thanks

Mark


kevin

  • El Toro
  • ****
  • Posts: 430
Re: Monitoring Disk Utilisation on Terastation
« Reply #1 on: July 02, 2009, 02:28:40 AM »
Unfortunately the only accurate way of finding that out is the GUI or the Navigator

salty

  • Calf
  • *
  • Posts: 3
Re: Monitoring Disk Utilisation on Terastation
« Reply #2 on: July 08, 2009, 06:42:41 AM »
   Am working on a Windows Powershell script that will sort it out for me. Will post it when complete in case somebody finds it useful.

kevin

  • El Toro
  • ****
  • Posts: 430
Re: Monitoring Disk Utilisation on Terastation
« Reply #3 on: July 09, 2009, 12:01:33 AM »

That sounds interesting!

 

I should  have noted this in my first response (sorry!)... Often it is over looked why, the GUI is the most reliable way to find drive specs. 1) Windows! It can have a hard time reading network drives 2) It is formatted to XFS, which Windows cannot read, and that only makes it harder to get accurate info through SMB. Which is why Buffalo does not recommend using any other way.


salty

  • Calf
  • *
  • Posts: 3
Re: Monitoring Disk Utilisation on Terastation
« Reply #4 on: July 09, 2009, 03:46:53 AM »
   

This Powershell script is working for my requirements now. Hope its of some value to somebody.

 

$excel = new-object -comobject excel.application
$excel.visible = $true
$wb = $excel.workbooks.add()
$ws = $wb.worksheets.item(1)

# Create Associated array of site names and associated share paths
$NasDrv = @{
 'Site1' = '\\NAS1\Share';
 'Site2' = '\\NAS2\Share';
 'Site3' = '\\NAS3\Share';
 'Site4' = '\\NAS4\Share';
 'Site5' = '\\NAS5\Share';
 'Site6' = '\\NAS6\Share';
 'Site7' = '\\NAS7\Share'
 }

# Build arrays from Associated Array above
$site = @($nasdrv.keys)
$path = @($nasdrv.get_values())

# Create array of titles to be used in Excel
$titles = ('Site','Path','Free Space (GB)','Total Space (GB)')

# Add titles to excel
for ($x=0; $x -le 3; $x++)
 {
 $ws.cells.item(1,$x+1) = $titles[$x]
 }

# Add Data to Excel
for ($i=1; $i -le 7; $i++)
 {
 $ws.cells.item($i+1,1) = $site[$i-1]
 ,
 $ws.cells.item($i+1,2) = $path[$i-1]
 ,
 $ws.cells.item($i+1,3) = [math]::round((new-object -com scripting.filesystemobject).getdrive($path[$i-1]).availablespace / 1024 / 1024 / 1024, 2)
 ,
 $ws.cells.item($i+1,4) = [math]::round((new-object -com scripting.filesystemobject).getdrive($path[$i-1]).totalsize / 1024 / 1024 / 1024, 2)
 }
 


daoswald

  • Buffalo
  • ***
  • Posts: 100
Re: Monitoring Disk Utilisation on Terastation
« Reply #5 on: July 09, 2009, 02:12:04 PM »
   If it were me, I would compose a simple Perl script to run on my Windows machine.  The script could use WWW::Mechanize to automate the process of logging into and scraping info from the TeraStation's web interface.  You could set the script to execute at the click of an icon, for example.  It would be fairly trivial to write if I actually had a TS to experiment on.  ...when I get around to it maybe I'll cobble something together for my Linkstation, but my motivation is low because I don't seem to be having any trouble getting the free space information on that unit.