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

  • Article ID: 108779
  • Updated: 17 Feb 2011

Issue
If an issue occurs only sporadically but a trace file is needed, producing an effective trace can be difficult because the trace-file can grow very quickly after activation.

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

SafeGuard Device Encryption
SafeGuard Data Exchange
SafeGuard Configuration Protection

Operating systems
All supported versions.

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

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:

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