Capturing data on a remote system

To capture data on a remote system, run blktrace with different options on both the system that stores the data and the system to be traced.

Procedure

  1. On the system where the captured data should be stored start blktrace in server mode. This system should have a good network connectivity to the system being traced:
    # blktrace -l 
  2. On the system that is being traced run blktrace in client mode.
    For example to trace the SCSI disk on device /dev/sda and send the trace data to the system t6345030. . . run:
    # blktrace -h t6345030.mysystem.com -d /dev/sda
    blktrace: connecting to t6345030.mysystem.com
    blktrace: connected!
    blktrace on the server side now shows that there is a connection from the system being traced:
    server: connection from 9.152.37.153
  3. Now run the I/O load that should be traced.

    Afterward, stop the blktrace client and then the blktrace server with Ctrl+C. Both acknowledge this by printing a summary of the data that was traced:

    Device: sda
    CPU 0:         0 events,              66471 KiB data
    CPU 1:         0 events,              53906 KiB data
    Total:         0 events (dropped 0), 120377 KiB data

Results

The trace data is now available on the system where the server side of blktrace was running:

# ls -l 9.152.37.153-2007-10-31-11\:38\:40/
total 120512
-rw-rw-r-- 1 schmichr schmichr 68065624 Oct 31 12:40 sda.blktrace.0
-rw-rw-r-- 1 schmichr schmichr 55199600 Oct 31 12:40 sda.blktrace.1