proc file system


A file system representation of data structures in the kernel.

Usage Guide

The files in the proc file system are not files on disk. They are representations of kernel data structures. As result all files have a size of 0 bytes. The data structures can be viewed by the cat command.

A directory exists under the /proc directory for each process running on the system. This directory is named by the process's PID. All the process's data structures reside inside its' directory. There are other directories under the /proc directory for system data structures.

As an example, each process has a maps file which lists all the mappings a process has in virtual memory. The contents of this file look like this:
08048000-0807c000      r-xp      00000000      03:41      331228      /usr/sbin/rsyslogd
0807c000-0807e000      rw-p      00034000      03:41      331228      /usr/sbin/rsyslogd
0807e000-08080000      rw-p      0807e000      00:00     vnbsp;0
09f88000-09fca000      rw-p      09f88000      00:00 0       [heap]
b6400000-b6421000      rw-p      b6400000      00:00       0
b6421000-b6500000      ---p      b6421000      00:00      0
b65ac000-b65b8000      r-xp      00000000      03:41      32832      /lib/
The first column in this output represents address space in the process's virtual memory committed to this entry. The second column is the permissions, that is read, write, executable or private. Next comes an offset into the entrie's image file; notice how the first two lines both refer to the rsyslogd image, but at different offsets. The fourth column refers to the device (major:minor), and the fifth is the inode. The final column references the image pathname.

You can change the data in /proc files and this immediately updates the kernel's data, making it a useful tool for testing changes to data structures or modifying a data structure to rescue a system.

Tool Data

Operating Platform:Linux
Diagnostic Target:OS - Threads and Processes
Tool Executable:Not applicable
Obtain From:Included in all distributions

Results for Tools search

You entered the search string "".
No results were returned for this string.

Copyright © 1997 - 2016 Mission Pacific Pty Ltd. All rights reserved. ezcom, the ez logo and hard tech cafe are registered trademarks of Mission Pacific Pty Ltd. Designed for firefox and safari. Sitemap