2004-04-10 22:18:33

by Dave Gilbert (Home)

[permalink] [raw]
Subject: [PATCH] /proc/<pid>/statfd

The attached patch creates a /proc/<pid>/statfd file
that contains one line per file descriptor and gives the current
offset, the mode, flags and an error indicator (from struct file*).

I wrote it as an answer to age old questions such as
'how far into the tape is that tar?' and 'how far has the 30GB
gzip got?'.

It is against 2.6.5 and has been tested on x86 and SPARC.

Comments, suggestions and constructive criticisms welcome.

Dave

-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/


Attachments:
(No filename) (727.00 B)
dagdiff (7.42 kB)
Download all attachments