Detecting Symlinks
fchirigati
nano.seabra@gmail.com
Thu Sep 13 20:24:00 GMT 2012
Hi,
I have a program that gets all the files that were read by a running
process, using SystemTap. In order to get this information, I'm using the
probe 'kernel.function("do_filp_open")', since 'syscall.open' may not give
the absolute path.
When one of these files is a symlink, I need to get both symlink and target
file. With kernel.function("do_filp_open"), I get the target file; with
syscall.open, I get the symlink. The problem is that I need the absolute
path of the symlink, and as I said before, syscall.open may not give me the
absolute path.
Does anyone know a better way to detect symbolic links using SystemTap (that
would give me the absolute path)?
By the way, I tried to use syscall.readlink, but nothing happened. I think
this system call is not used by the OS to get the target file, as target
paths are stored in inodes.
I'm on Ubuntu 12.04.
Best,
Fernando.
--
View this message in context: http://old.nabble.com/Detecting-Symlinks-tp34429155p34429155.html
Sent from the Sourceware - systemtap mailing list archive at Nabble.com.
More information about the Systemtap
mailing list