Does anyone have idea of how to trace the funtion "gethostbyname"?
Dongtao Liu
l.dongtao@gmail.com
Sat Nov 1 20:14:00 GMT 2008
Is it "/lib/libc-2.7.so" in my system?
probe process("/lib/libc-2.7.so").function("gethostbyname").call {
log(user_string($name)) }
Then how long will SystemTap support to trace this function? Thans a lot!
This is the information about libc in my system.
dliu@dliu-desktop:/lib$ ls -all libc.so.6
lrwxrwxrwx 1 root root 11 2008-10-23 22:02 libc.so.6 -> libc-2.7.so
dliu@dliu-desktop:/lib$ ls -all libc-2.7.so
-rwxr-xr-x 1 root root 1274092 2008-09-12 10:32 libc-2.7.so
dliu@dliu-desktop:/lib$ ls -all libc*.so*
-rwxr-xr-x 1 root root 1274092 2008-09-12 10:32 libc-2.7.so
lrwxrwxrwx 1 root root 11 2008-10-23 22:02 libcap.so -> libcap.so.1
lrwxrwxrwx 1 root root 14 2008-10-23 17:30 libcap.so.1 -> libcap.so.1.10
-rw-r--r-- 1 root root 10316 2007-07-31 15:20 libcap.so.1.10
lrwxrwxrwx 1 root root 17 2008-10-23 17:30 libcfont.so.0 ->
libcfont.so.0.0.0
-rw-r--r-- 1 root root 11512 2008-02-06 17:49 libcfont.so.0.0.0
-rw-r--r-- 1 root root 181724 2008-09-12 10:32 libcidn-2.7.so
lrwxrwxrwx 1 root root 14 2008-10-23 22:02 libcidn.so.1 -> libcidn-2.7.so
lrwxrwxrwx 1 root root 17 2008-10-23 17:30 libcom_err.so.2 ->
libcom_err.so.2.1
-rw-r--r-- 1 root root 7444 2008-03-27 13:25 libcom_err.so.2.1
lrwxrwxrwx 1 root root 19 2008-10-23 17:30 libconsole.so.0 ->
libconsole.so.0.0.0
-rw-r--r-- 1 root root 73312 2008-02-06 17:49 libconsole.so.0.0.0
-rw-r--r-- 1 root root 38300 2008-09-12 10:32 libcrypt-2.7.so
lrwxrwxrwx 1 root root 15 2008-10-23 22:02 libcrypt.so.1 -> libcrypt-2.7.so
lrwxrwxrwx 1 root root 11 2008-10-23 22:02 libc.so.6 -> libc-2.7.so
lrwxrwxrwx 1 root root 19 2008-10-23 17:30 libctutils.so.0 ->
libctutils.so.0.0.0
-rw-r--r-- 1 root root 17424 2008-02-06 17:49 libctutils.so.0.0.0
2008/10/31 Frank Ch. Eigler <fche@redhat.com>:
> Breno Leitao <leitao@linux.vnet.ibm.com> writes:
>
>>> Could anyone tell me how to trace the function of gethostbyname using
>>> SystemTap?
>> Since this is not a kernel function, you might want to probe userspace
>> functions.
>
> This should work, before long:
>
> probe process("/libMMM/libc-NNN.so").function("gethostbyname").call { log(user_string($name)) }
>
> In some testing on RHEL5 however, our prologue-searching heuristics
> can't outwit gcc's poor debuginfo quality, so that parameter is hidden
> at the moment. There's a systemtap PR about improving the heuristics.
>
> - FChE
>
More information about the Systemtap
mailing list