Skip to main content
InSource Solutions

TN AppSvr106 Capturing hard drive space in Archestra script

insource logo large.jpg

                           Tech Note                    



When a computer has a platform deployed to it you can usually monitor the available disk space by simply looking at the DiskSpaceFree field for the platform in question.  An alternative approach would be to use the System.IO .Net library to get a view into the available free disk space.  The script below is an example of how this can be done:


  • Author: Joe Hefner
  • Published: 10/14/2014
  • Applies to: Application Server 3.1 and higher





The sample script above can be copied from below if desired:


dim d as System.IO.DriveInfo;
dim alldrives[16] as System.IO.DriveInfo;

alldrives[] = System.IO.DriveInfo.GetDrives();

for each d in alldrives[]
         LogMessage("Drive " + d.Name);
        LogMessage(" File type: " + d.DriveType);
        if d.IsReady == true then    
            LOGMESSAGE(" is READY");
            logmessage(" Volume label:" + d.VolumeLabel);
            logmessage(" File System:" + d.DriveFormat);
            logmessage(" Available Space:" + d.AvaIlableFreeSpace);
            logmessage(" Total Available Space:" + d.TotalFreeSpace);
            logmessage(" Total size of drive:" + d.TotalSize);

Confirmation of Success

see message log in system management console