The Proc; A Virtual File System; File System; Proc File System - Red Hat ENTERPRISE LINUX 3 Reference Manual

Hide thumbs Also See for ENTERPRISE LINUX 3:
Table of Contents

Advertisement

The Linux kernel has two primary functions: to control access to physical devices on the computer
and to schedule when and how processes interact with these devices. The
called the
file system — contains a hierarchy of special files which represent the current state of
proc
the kernel — allowing applications and users to peer into the kernel's view of the system.
Within the
/proc/
any processes currently running. In addition, some of the files within the
be manipulated by users and applications to communicate configuration changes to the kernel.

5.1. A Virtual File System

Under Linux, all data are stored as files. Most users are familiar with the two primary types of files:
text and binary. But the
this reason that
/proc/
These virtual files have unique qualities. Most of them are listed as zero bytes in size and yet when one
is viewed, it can contain a large amount of information. In addition, most of the time and date settings
on virtual files reflect the current time and date, indicative of the fact they are constantly updated.
Virtual
files
such
/proc/partitions
like the
/proc/filesystems
information and interfaces.
For organizational purposes, files containing information on a similar topic are grouped into virtual
directories and sub-directories. For instance,
devices. Likewise, process directories contain information about each running process on the system.
5.1.1. Viewing Virtual Files
By using the
,
cat
more
ately access enormous amounts of information about the system. For example, to display the type of
CPU a computer has, type
processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model
: 9
model name : AMD-K6(tm) 3D+ Processor
stepping : 1
cpu MHz
: 400.919
cache size : 256 KB
fdiv_bug : no
hlt_bug
: no
f00f_bug : no
coma_bug : no
fpu
: yes
fpu_exception : yes
cpuid level : 1
wp
: yes
flags
: fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr
bogomips : 799.53
directory, one can find a wealth of information detailing the system hardware and
directory contains another type of file called a virtual file. It is for
/proc/
is often referred to as a virtual file system.
as
/proc/interrupts
provide an up-to-the-moment glimpse of the system's hardware. Others,
file and the
, or
commands on files within the
less
cat /proc/cpuinfo
The
,
/proc/meminfo
directory provide system configuration
/proc/sys/
contains information for all physical IDE
/proc/ide/
/proc/
to receive output similar to the following:
Chapter 5.

File System

proc
directory — also
/proc/
directory tree can
/proc/
,
/proc/mounts
directory, users can immedi-
,
and

Advertisement

Table of Contents
loading

Table of Contents