can robo taaask do...
Posted: Mon Apr 06, 2009 10:20 am
Check disk space for multiple machinesGenerate disk usage reportsCan be scheduledCan be triggered when usage hits a certain thresholdCan email reports
Yes. Maybe we need to add such system variables. But now you can do this with basic script.Check disk space for multiple machines
Generate disk usage reports
Code: Select all
Public Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTotalNumberOfClusters As Long) As Long
Sub Main
Dim sec As Long
Dim bps As Long
Dim fc As Long
Dim tc As Long
Dim res As Double
GetDiskFreeSpace("c:\", sec, bps, fc, tc)
res = CDbl(sec)*CDbl(bps)*CDbl(fc)
MsgBox("Free bytes " + CStr(res) +" bytes")
res = CDbl(sec)*CDbl(bps)*CDbl(tc)
MsgBox("Total bytes " + CStr(res) +" bytes")
res = (fc/tc)*100
MsgBox("Disk load " + CStr(res) +" %")
End Sub
Yes. You may attach to task scheduler triggering event.Can be scheduled
Attach the cyclic event to the task.Can be triggered when usage hits a certain threshold
Yes. See "Send email" actionCan email reports