SafeGuard Enterprise: How to create a time-limited trace file of manageable size

  • Article ID: 108779
  • Updated: 15 Oct 2014

Issue
If an issue occurs only sporadically but a SafeGuard Enterprise logfile (also known as tracefile) is required for troubleshooting, producing an effective tracefile can be difficult due to fact that the file can grow very quickly after activation.

Known to apply to the following Sophos product(s) and version(s)

SafeGuard Management Center / Local Policy Editor
SafeGuard File Encryption
SafeGuard Enterprise Server
SafeGuard Device Encryption
SafeGuard Data Exchange
SafeGuard Configuration Protection
SafeGuard Cloud Storage
SafeGuard BitLocker Client

What To Do

To prevent the tracefile from getting too big you can use one of the scripts described below. These create a cmd file which automatically renames the existing trace file after 10 minutes, deletes the old one, and writes a new one. When the issue occurs, the cmd can be closed and the last two trace files which show the issue can be saved.

The whole process can be setup in three steps (These examples can be saved as *.cmd files and executed on the client):

1. Activate tracing with level 0

REM set trace level
reg.exe add HKLM\SOFTWARE\Policies\Utimaco\SGMTrace /v MinimumTraceLevel /t REG_DWORD /d 0 /f

Please note: Changing the trace level will take full effect after a reboot of the SafeGuard Enterprise Client. On the SafeGuard Enterprise Server, restarting the IIS Server (click Start | click Run | type "IISReset" and click "OK") is sufficient.

2. Start the time limited tracing

echo Please do not close this Window

@echo off

GOTO start

:start

  • for Windows XP:

cd "C:\Documents and Settings\All Users\Application Data\Utimaco"

  • for Windows Vista, 7 and 8:

cd "C:\ProgramData\Utimaco\"

:Wait
ping localhost -n 601 >NUL

if exist "logfile_old.sgt" goto delete
:continue
if exist "logfile.sgt" goto rename

goto wait

:error1
@echo "Cannot perform requested action on file. Batch will be terminated"
Pause

:delete
del "logfile_old.sgt"
goto continue
if errorlevel 1 goto error1

:rename
ren "logfile.sgt" "logfile_old.sgt"
goto continue
if errorlevel 1 goto error1


3. Turn off the tracing

REM set trace level
reg.exe add HKLM\SOFTWARE\Policies\Utimaco\SGMTrace /v MinimumTraceLevel /t REG_DWORD /d 90 /f

 
If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent

Comments