Kaseya Community

Monitor Directory & File Size

  • Hello,


    Our company wants to monitor the directory size and File Size on Servers of customers ( arround 300 servers )

    Can we do this within Kaseya ? 


    Any help is welcome

  • With lots of scripts, it's not easy

  • I think most are using TreeSize for this. You can't (at this point and time) get folder size from the standard Kaseya Procedure commands only File size

    You could also use a command line tool called DIRUSE.EXE. Just watch out I found that with the new NTFS from Vista and up the Folder sizes are not 100% accurate and appears to be smaller then the real size, I suspect it is a compatibility issue. The tool will still give you a good idea of what folders are the largest and you can also filter by folders larger then for example 100MB or 1000MB etc...



    I think what it is going to come down to is creating a set of VB and PowerShell scripts that get the File/Folder sizes and pass it on to a Kaseya Audit Procedure that is run every X min/hours/days and Alerts if it gets beyond a Y amount in size.

  • Thanks for your reply,

    How do I monitor file size then?  

    I need it to monitor file size of a machine for about a month and at the end of the month get a graphic drawing from the file size progress. How to do this within Kaseya?

  • Use VBS or Powershell.  Have the script write results to a Text file that can be read from a Kaseya procedure.  Here is a VBS I found by using google: check size of file vbs


    Option Explicit
    Dim FSO, File, strSize, strFile, alarmSize, WshShell
    ' As scheduled scripts dont like arguments tell the script which file to check
    ' The size to check against in Megabytes

    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set File = FSO.GetFile("c:\pagefile.sys")
    strSize = File.Size\1024\1024
    'Wscript.Echo "Filesize : " & File.Name & " is " & strSize &"Mb. Alarmsize set to" & alarmSize & " Mb."
    If strSize > alarmSize Then
    'Wscript.Echo "Filesize Varning: " & File.Name & " is larger then " & alarmSize &" Mb"
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.LogEvent 4, "Filesize Varning: " & File.Name& " is larger then " & alarmSize &" Mb"
    Set WshShell = nothing
    End If
    Set File = Nothing
    Set FSO = Nothing
  • I am doing something similar. I am having a hard time configuring a graphed output, but checking and monitoring the file size is REALLY easy in Agent Procedures. Use the Get Variable tool and get the variable File Size. You could then measure that result and send alerts to the user or admin, or just about whatever you wanted to do. I was trying to work in similar PowerShell as above, but decided I could do what I wanted with the Get Variable. I will probably just run a regular report now and then manually roll that into a graph...

    Good luck.

  • How about this: community.kaseya.com/.../16592.aspx

    I've created a Powershell script which is intended to be a clone of the TreeSize tool. It generates a size report of files and folders in a filesystem, presented as an interactive HTML file.

    I've also created an Agent procedure which can be used to schedule this report and upload to the Agent's file store. This is handy for historical comparison to see where disk usage has changed on a per-folder basis.

  • Easy Directory & File Monitoring with Kaseya Network Monitor