DX Unified Infrastructure Management

 View Only
  • 1.  Dirscan capabilities

    Posted May 29, 2020 01:47 PM
    hi all,
    i am trying to set up the folder count in D:\SLAN\apache-tomcat-8.5.29\webapps\leasing\WEB-INF\auditlog
    apart from file there are folders created under auditlog dir.
    Is this possible to monitor folder counts via dirscan?

    ------------------------------
    HCL Technologies
    ------------------------------


  • 2.  RE: Dirscan capabilities

    Broadcom Employee
    Posted May 29, 2020 02:39 PM
    Hi Sid,

    Unfortunately dirscan cannot count the number of directories/folders but you should be able to use nexec probe or logmon with a script via a command like the following (in thi cas using Powershell on Windows):

    PS C:\> Get-ChildItem -Directory | Measure-Object | Select-Object -Property Count

    Steve


    ------------------------------
    Support Engineer
    Broadcom
    US
    ------------------------------



  • 3.  RE: Dirscan capabilities

    Posted May 29, 2020 03:11 PM
    Hi Steve,
    Thank you, But i am really not experienced with nexec, how do we run that? how Can i get notified when folder count increases a particular threshold?
    or via logmon?
    does this need to be used through command in logmon?

    ------------------------------
    HCL Technologies
    ------------------------------



  • 4.  RE: Dirscan capabilities

    Broadcom Employee
    Posted May 29, 2020 03:34 PM
    I would suggest running the command in logmon as it provides more functionality and you can use a regex to parse the results and generate alarms when necessary.

    Steve

    ------------------------------
    Support Engineer
    Broadcom
    US
    ------------------------------



  • 5.  RE: Dirscan capabilities
    Best Answer

    Broadcom Employee
    Posted May 29, 2020 05:06 PM

    Hi Sid,

    Here is a working solution using logmon and a Linux command. You can adjust to your particular needs to count folders in a specific directory, in this example, just /:













    For a command on Windows here is an example, something like this:

       cmd /C netstat -an|findstr "4800"

    Best Regards,
    Steve




    ------------------------------
    Support Engineer
    Broadcom
    US
    ------------------------------



  • 6.  RE: Dirscan capabilities

    Broadcom Employee
    Posted May 29, 2020 02:44 PM
    Edited by Stephen Danseglio May 29, 2020 05:07 PM
    If on Unix/Linux, something like this:

    find <path> -mindepth 1 -maxdepth 1 -type d | wc -l

    Steve

    ------------------------------
    Support Engineer
    Broadcom
    US
    ------------------------------