From bbf8d0c864ab85224a6cc7e1c0597fc1cef1ab07 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Tue, 4 Nov 2008 10:35:04 +1000 Subject: further edits as per traceio2 --- .../en-US/Useful_Scripts-traceio2.xml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'doc/SystemTap_Beginners_Guide') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml index ef8843b5..1c3bb7c7 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml @@ -25,12 +25,12 @@ traceio2-simple.stp - + -in new SystemTap, returned a warning, but ran ok. + + + 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. - takes 2 arguments: the major and minor numbers of the device you wish to monitor. Its output includes the name and ID of any process performing a read/write, the function it is performing (i.e. vfs_read or vfs_write), and the device number (in hex format). +The output of includes the name and ID of any process performing a read/write, the function it is performing (i.e. vfs_read or vfs_write), and the device number (in hex format). please verify if "0x800005" is "device number (in hex format)", and why it needs to be stated buy -The following example is an excerpt from the full output of stap traceio2.stp 8 5, where 8 5 is the MAJOR:MINOR device number of /dev/sda5 (which we determined through cat /sys/block/sda/sda5/dev). +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. <xref linkend="traceio2"/> Sample Output -- cgit