/proc - how to find and access the file table of a process?

/proc - how to find and access the file table of a process?

Post by Henri Henneber » Tue, 05 Mar 2002 20:44:07

Hello everybody,

Here is my problem:
I would like to display the number of characters of a spooled print file
already sent to the remote destination (context: tarantella 3.20 - not
the lpd spool).

A high level solution:

1) Given the file path, find the inode # and the mounted filesystem.

2) Search the inode table to find the corresponding entry (via the /proc ?)

3) Search for the process using this inode entry (normally only one)

4) Search the process fd table to find the current position in file

I have no idea where to start my exploration (yes ls -i is a good start).

Any help or pointer is really welcome.



1. Proc table and file table

    I would like to know how can I check the current number of process
and open files i have running on my system.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. 43 P error

3. where are process-table, region-table, inode-table?

4. iscda help

5. How to access proc table with c on Solaris2.5?

6. More than 10 IDE interfaces

7. Accessing proc table

8. SuperUser's Account

9. How to access U area from proc table

10. Accessing /proc or another process' esp

11. /proc file table overflow

12. Accessing process internals with "/proc"

13. /proc file table overflow