Problem reading sys_write arguments
Akshay Shah
aksh24@gmail.com
Sat Sep 15 01:08:00 GMT 2007
Hi Mike,
The systemtap version is systemtap-0.5.14-1 on kernel 2.6.9-34.0.1.0.11.EL.
Since you asked about architecture, it is possible that this might be
a hosted VM.
I guess it wouldn't work on VM's, would it?
The script with the sample output is pasted below.
Thanks,
Akshay
********************SCRIPT****************************
probe kernel.function("vfs_write") {
printf("write size is = %d\n", $count);
exit()
}
probe kernel.function("sys_write") {
printf("write size is = %d\n", $count);
}
************************OUTPUT***********************
Pass 1: parsed user script and 54 library script(s) in 100usr/380sys/498real ms.
Pass 2: analyzed script: 2 probe(s), 3 function(s), 0 embed(s), 0
global(s) in 80usr/330sys/407real ms.
Pass 3: translated to C into
"/tmp/stapqdE3Vs/stap_37033f56c261a739dd23bd247f347569_1168.c" in
0usr/0sys/0real ms.
Pass 4: compiled C into
"stap_37033f56c261a739dd23bd247f347569_1168.ko" in
950usr/1330sys/2364real ms.
Pass 5: starting run.
write size is = 4
write size is = 204
Pass 5: run completed in 20usr/1360sys/1533real ms.
On 9/14/07, Mike Mason <mmlnx@us.ibm.com> wrote:
> I don't see this problem when I run a script that probes sys_write and vfs_write. What systemtap version, kernel version and architecture are you using? Also, please post your script.
>
> Thanks,
> Mike
>
> Akshay Shah wrote:
> > I could not read the correct value for certain syscall arguments.
> >
> > When I tried to print the count field for a "sys_write" call, the
> > value returned is always 4. However, it prints the correct value of
> > count for a probe on "vfs_write".
> >
> > I am not sure whether I am doing something wrong in the script. It
> > just probes both functions and prints the $count value to stdout.
> >
> > Am I missing something which could result in the incorrect value? Has
> > someone seen something similar?
> >
> > Thanks,
> > Akshay
>
>
More information about the Systemtap
mailing list