Red Hat Kernel - /proc/[number] special process entries

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Kernel > October 2004 > /proc/[number] special process entries





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author /proc/[number] special process entries
Minderbinder

2004-10-10, 5:53 pm

I was wondering if anybody could help me with a hint or two...

I'm trying to add a sub-directory to each /proc/[number] directory (where
[number] is a process id). I think that I need to get a proc_dir_entry* so
that I can call:

proc_mkdir("mysubdir", struct proc_dir_entry *parent);

However, I can't work out how to get a reference to the proc_dir_entry* I
need. I can find the other entries in the proc directory (such as bus,
cpuinfo. misc, net...) by doing something like this:

struct proc_dir_entry * dp;
dp = &proc_root;
dp = dp->subdir;
while (dp != NULL) {
printk("er... found: %s\n",dp->name); dp = dp->next;
}

However, the only entries that don't show up are the [number] entries.
Assistance please!

Cheers,
Minderbinder.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com