A system provides mechanisms and techniques to retrieve trace data from a
trace buffer residing in a data storage system. The software program
operating on a processor within the data storage system operates in trace
mode to produce trace data in the trace buffer upon occurrence of trace
events. An event trace routine operates in response to a system call to
access the trace buffer and return either a current value of a trace
buffer pointer or the current trace buffer pointer as well as trace data
read from the trace buffer beginning at a location and in an amount as
specified in the system call to the event trace routine. The trace
capture process can operate either within the data storage system or
preferably on a remote host computer system to access trace data in the
trace buffer in the data storage system by using the event trace routine.
The trace capture process can periodically query the event trace routine
with a frequency determined by an adaptive timing algorithm in order to
detect the addition of trace data to the trace buffer. Upon detecting
such a condition, the trace capture process can use the event trace
routine to retrieve the trace data from the trace buffer. The trace
capture process can also detect if trace data is written beyond the end
of the trace buffer and can perform the proper sequence of trace data
access operations using the event trace routine in order to provide
continuous remote access to all trace data produced in the trace buffer.