public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/17920] New: File descriptor to pathname function
@ 2015-02-03 18:25 brendan.d.gregg at gmail dot com
  2015-09-28 20:33 ` [Bug tapsets/17920] " dsmith at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: brendan.d.gregg at gmail dot com @ 2015-02-03 18:25 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=17920

            Bug ID: 17920
           Summary: File descriptor to pathname function
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: brendan.d.gregg at gmail dot com

FD to pathname translations are handy. Eg:

# ls -l /proc/1130/fd/1
l-wx------ 1 root root 64 Feb  3 18:21 /proc/1130/fd/1 ->
/mnt/logs/system/auth.log

I'd like a function in SystemTap that converts an integer file descriptor, for
the current process/task, to the pathname as seen by /proc/PID/fd. Without
needing kernel debuginfo (/proc/PID/fd doesn't need it).

The use case is identifying which file system files are being opened, read, and
written to. Other file descriptor types, like pipes and sockets, are less
important. I'd be fine with them returning just "[socket]" for now, or, better
still, just match what /proc already uses. Eg:

# ls -l /proc/18959/fd/3
lr-x------ 1 root root 64 Feb  3 18:20 /proc/18959/fd/3 -> socket:[181107359]

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-02 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 18:25 [Bug tapsets/17920] New: File descriptor to pathname function brendan.d.gregg at gmail dot com
2015-09-28 20:33 ` [Bug tapsets/17920] " dsmith at redhat dot com
2015-09-29 14:45 ` dsmith at redhat dot com
2015-10-02 17:06 ` dsmith at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).