All of lore.kernel.org
 help / color / mirror / Atom feed
* Converting open filehandles to pathnames
@ 2004-05-08 23:33 Erik Walthinsen
  2004-05-09  7:24 ` Greg Banks
  0 siblings, 1 reply; 8+ messages in thread
From: Erik Walthinsen @ 2004-05-08 23:33 UTC (permalink / raw)
  To: nfs

I've got an NFS server with client machines running User-mode Linux. 
These UML instances open several large files on the NFS server at boot
time (root, /home, etc), and perform varying amounts of IO over the next
several months, or however long the UML instances are running.

The problem is, I really have no concrete way of determining IO load on
these files.  Nothing distinguishes the packets for one file from
packets for another file coming from the same physical host machine. 
Except the filehandle that is.

A while ago I wrote a script that caught every NFS packet and used
periodic getattr RPC calls to complete a mapping between the filehandles
and inodes (and thus pathnames), and it mostly worked.  However,
something has changed and these getattr calls have ceased.  Thus, the
script happily gathers read and write calls but has no means of
translating them.

My question: is there some means of divining the device/inode of a
filehandle?  I looked around the NFS and VFS code and found nothing that
looked promising, but I don't really understand the VFS subsystem.

(aside: some net sources indicate that Solaris has a /var/nfs/fhtable
that it keeps up to date, but that's related to nfslogd and various
other Sun-isms)

Would it be possible to write a program to walk through kmem from some
known global kernel symbol to find the relevant structures necessary to
perform this translation?  (Ideally, on an existing production system,
passively)  If so, what symbol would be the base of such a trip?  If
someone can explain roughly what the relevant structure tree looks like,
I can figure out how to write the necessary code, but until I have a
clue about the relevant VFS/NFS code, I'm lost.

TIA,
   Omega
   aka Erik Walthinsen
   omega@pdxcolo.net



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

end of thread, other threads:[~2004-05-10 21:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-08 23:33 Converting open filehandles to pathnames Erik Walthinsen
2004-05-09  7:24 ` Greg Banks
2004-05-09  0:43   ` Erik Walthinsen
2004-05-10  0:26     ` seth vidal
2004-05-10  3:00       ` Garrick Staples
2004-05-09 21:11         ` Erik Walthinsen
2004-05-10  8:02           ` Bogdan Costescu
2004-05-10 14:20             ` Erik Walthinsen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.