Results 1 to 3 of 3
Hi gurus,
could you please explain few questions about systemtap.
1st
===
seems gettimeofday_s() always returns 0
Code:
stap -ve 'probe timer.s(4){ printf("%d ", gettimeofday_s()) }'
returns 0 0 0 ...
- 03-26-2011 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 49
systemtap returntimeofday_s and some questions
Hi gurus,
could you please explain few questions about systemtap.
1st
===
seems gettimeofday_s() always returns 0
returns 0 0 0 ... also gettimeofday_ms gettimeofday_nsCode:stap -ve 'probe timer.s(4){ printf("%d ", gettimeofday_s()) }'
When I am trying to investigate what is going on issuing second commnat paraller to first one
it returns various PID and execs but neither belongs to stapCode:stap -ve 'probe kernel.function("*gettimeofday*") { printf("%d\t%s\n",pid(),execname()); }'
3rd command also issued paraller to 1st
seems it goes throught 5 phases (compiles and loaded into kernel) - but prints nothing just: WARNING: probe registration error (symbol not found)Code:stap -ve 'probe kprobe.function("*gettimeofday*") { printf("%d\t%s\n",pid(),execname()); }''
the date command runs normally
What is wrong with gettimeofday ???Code:[root@fedora ~]# date Sat Mar 26 10:30:10 CET 2011
2nd
===
I am trying to trace system calls per process with following code
can be process tracd according to execname() + PATH containing binary - the equivalent of /proc/$PID/exeCode:stap -ve 'probe syscall.open {if (execname()=="ping") { printf("execname(): %s, pid(): %d, argstr: %s, filename: %s, name: %s\n", execname(), pid(), argstr, filename, name) } }'
3rd
===
according man stap the -L option should be the used to get possible variables.
works as expectedCode:[root@fedora ~]# stap -L 'syscall.open' syscall.open name:string filename:string flags:long mode:long argstr:string $filename:char const* $flags:int $mode:int $ret:long int
Now, how to know which variables can be used in all library calls ?
did not returns anything whyCode:stap -vL 'kernel.function("*")' > kernel.functions
Also can somebody explain those variables with $ (target variables) They are those which can be used in source code of app ?
4nd
===
where are described functions that can be used with stap ? Those in man stapfuncs ?
and tapsets are those in tapset refference ?
Many thanks allLast edited by wakatana; 03-26-2011 at 01:02 PM.
- 03-26-2011 #2Just Joined!
- Join Date
- Mar 2011
- Posts
- 1
Need more information
Several of the things you describe seem to be bugs.
Please send a link to your posting, along with the output from /usr/bin/stap-report,
to the systemtap@sourceware.org mailing list.
- 03-26-2011 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 49
I am trying to but always gives me delivery error - email is in txt not html I am new to mailing list maybe womething doing wrong .here is stap-report
Code:[root@fedora tapset]# /usr/bin/stap-report == stap -V == SystemTap translator/driver (version 1.3/0.151 non-git sources) Copyright (C) 2005-2010 Red Hat, Inc. and others This is free software; see the source for copying conditions. enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR TR1_UNORDERED_MAP == which stap == /usr/bin/stap == locate --regex '/stap(run)?$' | xargs ls -ald == sh: locate: command not found drwxr-xr-x. 8 root root 4096 Mar 26 14:42 . == printenv | egrep '^PATH=|^LD_LIBRARY_PATH=|^SYSTEMTAP_.*=' == PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin == gcc -v == Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper Target: i686-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux Thread model: posix gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC) == uname -a == Linux fedora 2.6.35.11-83.fc14.i686 #1 SMP Mon Feb 7 07:04:18 UTC 2011 i686 i686 i386 GNU/Linux == dmesg | egrep 'stap|systemtap' | tail -n 10 == [ 464.661111] stap_749a6572d58e8ebfd98f7fb51fe1109a_28569: systemtap: 1.3/0.151, base: d1359000, memory: 186data/17text/1ctx/13net/8alloc kb, probes: 162 [ 582.756137] stap_d02f09da14f62c5fa37f29e8364eb8a4_582: systemtap: 1.3/0.151, base: d15d7000, memory: 7data/10text/0ctx/13net/8alloc kb, probes: 1 [ 603.061056] stap_360cedd9b8540cb503248f533ae7c200_622: systemtap: 1.3/0.151, base: d1825000, memory: 7data/10text/0ctx/13net/8alloc kb, probes: 1 [ 756.442074] stap_ddeb9b82cff724cccd91efe4c5e49b2f_1292: systemtap: 1.3/0.151, base: d1a7a000, memory: 12data/14text/1ctx/13net/8alloc kb, probes: 2 [ 1443.017059] stap_304dbdd26934fe7f8f9a9e081c4006a3_1098: systemtap: 1.3/0.151, base: d1cd1000, memory: 7data/11text/1ctx/13net/8alloc kb, probes: 1 [ 3929.576047] stap_abe13e06eb9cdfadfdc6d579f113cedb_17905: systemtap: 1.3/0.151, base: d1f2c000, memory: 14data/18text/4ctx/13net/8alloc kb, probes: 1 [14685.350910] stap_2dc6c01499ea6631cdbd6fd986e16223_1059: systemtap: 1.3/0.151, base: d2182000, memory: 7data/12text/0ctx/13net/8alloc kb, probes: 1 == cat /proc/cpuinfo | egrep 'processor|vendor_id|model name' == processor : 0 vendor_id : GenuineIntel model name : Intel(R) Pentium(R) M processor 1.70GHz == rpm -qa --qf '%{name}-%{version} %{release}.%{arch}\n' | egrep 'systemtap|elfutils|kernel|gcc' | sort == elfutils-libelf-0.151 1.fc14.i686 elfutils-libs-0.151 1.fc14.i686 gcc-4.5.1 4.fc14.i686 gcc-c++-4.5.1 4.fc14.i686 kernel-2.6.35.11 83.fc14.i686 kernel-2.6.35.6 45.fc14.i686 kernel-debuginfo-2.6.35.11 83.fc14.i686 kernel-debuginfo-common-i686-2.6.35.11 83.fc14.i686 kernel-devel-2.6.35.11 83.fc14.i686 kernel-headers-2.6.35.11 83.fc14.i686 libgcc-4.5.1 4.fc14.i686 systemtap-1.3 3.fc14.i686 systemtap-runtime-1.3 3.fc14.i686 == egrep 'PROBE|TRACE|MARKER|_DEBUG_' /lib/modules/2.6.35.11-83.fc14.i686/build/.config | grep -v not.set | sort | fmt -w 80 == CONFIG_AIC79XX_DEBUG_MASK=0 CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_ARCH_CPU_PROBE_RELEASE=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_BLK_DEV_IO_TRACE=y CONFIG_CAN_PM_TRACE=y CONFIG_CB710_DEBUG_ASSUMPTIONS=y CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_DEBUG_BOOT_PARAMS=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_DEVRES=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_LIST=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DEBUG_NMI_TIMEOUT=5 CONFIG_DEBUG_NX_TEST=m CONFIG_DEBUG_RODATA_TEST=y CONFIG_DEBUG_RODATA=y CONFIG_DEBUG_SHIRQ=y CONFIG_DEBUG_SPINLOCK_SLEEP=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DYNAMIC_FTRACE=y CONFIG_FTRACE_MCOUNT_RECORD=y CONFIG_FTRACE_NMI_ENTER=y CONFIG_FTRACE_SYSCALLS=y CONFIG_FTRACE=y CONFIG_FUNCTION_TRACER=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_TRACER=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_FTRACE_NMI_ENTER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_MMIOTRACE_SUPPORT=y CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_KMEMTRACE=y CONFIG_KPROBE_EVENT=y CONFIG_KPROBES=y CONFIG_KRETPROBES=y CONFIG_KSYM_TRACER=y CONFIG_MTD_GEN_PROBE=m CONFIG_MTD_JEDECPROBE=m CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 CONFIG_MTD_QINFO_PROBE=m CONFIG_NET_DCCPPROBE=m CONFIG_NETFILTER_XT_TARGET_TRACE=m CONFIG_NET_SCTPPROBE=m CONFIG_NOP_TRACER=y CONFIG_OPTPROBES=y CONFIG_PCMCIA_PROBE=y CONFIG_PM_TRACE_RTC=y CONFIG_PM_TRACE=y CONFIG_PROFILE_KSYM_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_STACK_TRACER=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_STACKTRACE=y CONFIG_SYSPROF_TRACER=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_TRACEPOINTS=y CONFIG_TRACER_MAX_TRACE=y CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_UTRACE=y CONFIG_WIMAX_DEBUG_LEVEL=8 CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 CONFIG_WORKQUEUE_TRACER=yLast edited by wakatana; 03-26-2011 at 09:31 PM.


Reply With Quote