From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15691 invoked by alias); 3 Feb 2015 18:25:53 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 15648 invoked by uid 48); 3 Feb 2015 18:25:49 -0000 From: "brendan.d.gregg at gmail dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/17920] New: File descriptor to pathname function Date: Tue, 03 Feb 2015 18:25:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: brendan.d.gregg at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00102.txt.bz2 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.