Skip to main content
Welcome guest. | Register | Login | Post

proc

5 replies [Last post]
Offline
Joined: 2008-06-21

What is the use of proc structure?

libervisco's picture
Offline
Joined: 2006-05-04
I moved this to the "System

I moved this to the "System tools, drivers and hardware" forum.

I assume by proc you mean the stuff in /proc on UNIX like systems? I haven't entertained the question a lot myself, but from my experience the content of the /proc directory exists only while the system is on and contains various processes and currently applied settings in the memory, but displaying them on the actual file system (hence being a directory).

It can be useful to read those files for some information about a running system, although I think there usually is a command line tool that reads it in a user friendly way for you.

But that's a rough description and I'm sure someone might be able to explain it a little better.

a thing's picture
Offline
Joined: 2005-12-20
sysctl

Yeah, /proc is basically the kernel's interface via a (pseudo)filesystem. It contains various information about its activities (including running processes and the hardware it detects) and settings (such as swappiness). Wikipedia article on procfs.

libervisco wrote:

I think there usually is a command line tool that reads it in a user friendly way for you.

sysctl

Offline
Joined: 2006-03-28
There actually are

There actually are different tools working with /proc.
I think top, ps and probably also tools like lspci fall into this category.
I don't think there is "one ring to rule them all", the ultimate tool that manages /proc.

Btw, an effort of moving information from /proc to /sys is being made, but as this may break older stuff it's progressing quite slowly.

/sys provides a lot of information too, and often in a more readable and structured way than /proc.

a thing's picture
Offline
Joined: 2005-12-20
procfs tools

I forgot one that I just needed today: lsof, which tells you what process(es) is/are using what files. This is useful when you get "cannot unmount FILESYSTEM: device or resource busy" when trying to unmount a filesystem but do not know why.

A little recap list:
sysctl
lsof
top, htop, KSysGuard...
ps

libervisco's picture
Offline
Joined: 2006-05-04
Oh didn't know that. Useful

Oh didn't know that. Useful stuff, thanks.

Comment viewing options

Select your preferred way to d