Ce contenu n'est pas disponible dans la langue sélectionnée.
4.2.4. I/O Monitoring (By Device)
This section describes how to monitor I/O activity on a specific device.
traceio2.stp
traceio2.stp takes 1 argument: the whole device number. To get this number, use
stat -c "0x%D" directory
, where directory
is located in the device you wish to monitor.
The
usrdev2kerndev()
function converts the whole device number into the format understood by the kernel. The output produced by usrdev2kerndev()
is used in conjunction with the MKDEV()
, MINOR()
, and MAJOR()
functions to determine the major and minor numbers of a specific device.
The output of traceio2.stp includes the name and ID of any process performing a read/write, the function it is performing (that is
vfs_read
or vfs_write
), and the kernel device number.
The following example is an excerpt from the full output of
stap traceio2.stp 0x805
, where 0x805
is the whole device number of /home
. /home
resides in /dev/sda5
, which is the device we wish to monitor.
Example 4.8. traceio2.stp Sample Output