DX Unified Infrastructure Management

  • 1.  Deleting log files with UIM?

    Posted Sep 20, 2016 08:39 AM

    In UIM 8.4.1 , Which probe would you use to delete a log file? And if the log file is being written to how do you get around it being active? This is on Windows

     

    -TIA-



  • 2.  Re: Deleting log files with UIM?

    Broadcom Employee
    Posted Sep 22, 2016 03:25 PM

    Generally you can not delete a file that is open and being written to.

    This is an operating system function.

     

    You could use dirscan to monitor the size of logs and send an alarm when something needs to be done.

    But if the process never closes the file and always has it open you will need to stop the process and then delete the file some how.



  • 3.  Re: Deleting log files with UIM?
    Best Answer

    Broadcom Employee
    Posted Sep 22, 2016 03:32 PM

    You might want to look at something like a Windows equivalent to logrotate ( LogRotateWin / Wiki / LogRotate  ).  As Gene points out, the process needs to close the file before you can delete/move the file.  That's why utilities like logrotate do things like stop the service/process or send a signal/message to the process to close the file, move the file, and then restart it.