This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ask for help


Payphone LIOU wrote:
> Hi, All.
>  
> i am a newcomer to systemtap. i have a question about installing and running systemtap to ask . thanks everyone. :-)
>  
> (1) something about my machine 
> 2.6.17-1.2142_FC4
> x86-64
> gcc 4.0.2
> glibc-2.3.6-3
> glib2-2.6.4-1
> glib-1.2.10-16
> glibc-devel-2.3.6-3
> glibc-common-2.3.6-3
> glibc-2.3.6-3
> glibc-profile-2.3.6-3
> glib2-devel-2.6.4-1
> glibc-kernheaders-2.4-9.1.94
> glibc-devel-2.3.6-3
> glibc-utils-2.3.6-3
> glibc-headers-2.3.6-3
> kernel-debuginfo-2.6.17-1.2142_FC4 
> kernel-devel-2.6.17-1.2142_FC4 
> sqlite-3.1.2-3 
> sqlite-devel-3.1.2-3 
> elfutils-0.108-1 
> stap-0.3-1
>  
> (2) when i try to run an example from http://sourceware.org/systemtap/examples/top.stp
>  
> it failed and some error messages listed:
>  
>  
> [root@paul systemtap]# 
> [root@paul systemtap]# cat top.stp 
> #!/usr/bin/env stap 
> #
> # This script continuously lists the top 20 systemcalls on the system
> #
> global syscalls
> function print_top () {
>         cnt=0
>         log ("SYSCALL\t\t\t\tCOUNT")
>         foreach ([name] in syscalls-) {
>                 printf("%-20s\t\t%5d\n",name, syscalls[name])
>                 if (cnt++ == 20)
>                         break
>         }
>         printf("--------------------------------------\n")
>         delete syscalls
> }
> probe kernel.function("sys_*") {
>         syscalls[probefunc()]++
> }
> # print top syscalls every 5 seconds
> probe timer.ms(5000) {
>         print_top ()
> }
> [root@paul systemtap]# stap -v top.stp 
> Created temporary directory "/tmp/stapD19eih"
> parse error: expected ')'
>         saw: operator '-' at top.stp:11:29
> 1 parse error(s).

Seems stap is too old and couldn't support order.
If you don't care the order,  you can erase the '-' after syscalls

Try higher systemtap to get more features.

Best regards,
Wenji


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]