This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
New war story: What options were used to open a file?
- From: Eugene Teo <eteo at redhat dot com>
- To: systemtap at sources dot redhat dot com
- Date: Mon, 30 Apr 2007 22:27:55 +0800
- Subject: New war story: What options were used to open a file?
- Organization: Red Hat, Inc
A colleague asked me this: "It's easy to see what files a process is accessing by looking at
/proc/<pid>/fd/. However it doesn't seem to tell me about all options that were passed to
open(2). In particular I'm keen to see whether files were opened with O_DIRECT set. Is there
no way to make this inference after the file has been opened?"
So I wrote a systemtap script for him: http://sources.redhat.com/systemtap/wiki/WSListFlags
If you have any better suggestions/feedbacks, I would love to hear from you.
Eugene
--
Eugene Teo, RHCE Red Hat Global Support Services
Phone: +65 6490 4142 GPG ID: 58DF8823