Hi,
Have you ever written (or encountered) code that uses the procfs (the Linux /proc file system) in non-trivial ways?
I have a very nice idea for a kernel patch, and I want to conduct some research and see code examples before I shape my idea.
Udi
EDIT
I'm looking for interesting code examples that would demonstrate advanced usage ...
I would like to find all shared memory segments used by a given process. I am especially interested in figuring out the shmid so i can use it in calls to shmctl().
On Solaris i would just read /proc/$PID/map to figure out that information (field pr_shmid).
The contents of that file are defined by struct prmap_t in sys/procfs.
AIX also ...
I'm trying to determine the CPU utilization of specific LWPs in specific processes in Solaris 10 using data from the /proc filesystem. The problem I have is that sometimes a utilization counter decreases.
Here's the gist of it:
// we'll be reading from the file named /proc/<pid>/lwp/<lwpid>/lwpusage
std::stringstream filename;
filename...
The first few fields of 'cat /proc/bus/pci/devices' are understandable.
Field 1 - BusDevFunc
Field 2 - Vendor Id + Device Id
Field 3 - Interrupt Line
Field 4 - BAR 0
and the rest of the BAR registers (0 - 5) after that.
After the BAR registers are printed out, what are the other fields? Specifically, what PCI configuration space r...
Hi I'm trying to build a debugger-like program
under ubuntu linux and I've run into some problems...
From what I've heard, the /proc vfs provides mechanisms to
create watchpoints, but I can't seem to find out how.
Some man pages pointed me to 'control file's, supposedly located
at /proc//ctl, but I can't find this file anywhere.
(Perh...