4.4. Using SysInternal’s Debug Viewer, Process Monitor and Process Explorer Tools

An alternatve option to the use of "fs trace -dump" to capture internal OpenAFS Client Service events is to use a tool such as Sysinternal's Debug Viewer to capture real-time debugging output.  When the OpenAFS Client Service starts and Bit 2 of the TraceOption value in the registry is set, all trace log events are output using the Windows Debug Monitor interface (OutputDebugString). 

  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]

REG_DWORD   TraceOption = 0x04

Use "fs trace –on" and "fs trace –off" to toggle the generation of log messages.

Sysinternal’s Process Monitor can be use to monitor the file operations requested by applications and their success or failure.  

In Process Monitor, set a filter to include only events on file paths that refer to the AFS name space. Be sure to include both the UNC path as well as any drive letters mapped to AFS.

Turn on the Clock Time and Show Milliseconds options in both tools to make it easier to synchronize the application requests and the resulting OpenAFS Client Service operations.   The captured data can be stored to files for inclusion in bug reports.

Sysinternal's Process Explorer is a replacement for the Windows Task Manager and so much more.  Process Explorer can be configured to use the DbgHelp.dll from " Microsoft Debugging Tools for Windows" as well as the debug symbols shipped as an optional component of the OpenAFS for Windows installer.  (Options->Configure Symbols)   Once configured the "Threads" tab of the process properties dialog will permit the viewing of a fully documented stack for each displayed thread.  Hint: If there is a deadlock in the cache manager, two or more of the threads will be stuck in a call to osi_TWait().