/proc/scsi/[drivername]
[drivername] can currently be NCR53c7xx, aha152x, aha1542, aha1740,
aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
scsi_debug, seagate, t128, u15-24f, ultrastore, or wd7000.
These directories show up for all drivers that registered at least one
SCSI
HBA.
Every directory contains one file per registered host.
Every
host-file is named after the number the host was assigned during
initialization.
Reading these files will usually show driver and host configuration,
statistics etc.
Writing to these files allows different things on different hosts.
For example, with the latency and nolatency commands,
root can switch on and off command latency measurement code in the
eata_dma driver.
With the lockup and unlock commands,
root can control bus lockups simulated by the scsi_debug driver.
/proc/stat
kernel/system statistics.
Varies with architecture.
Common
entries include:
cpu 3357 0 4313 1362393
The amount of time, measured in units of
USER_HZ (1/100ths of a second on most architectures),
that the system spent in user mode,
user mode with low priority (nice), system mode, and the
idle task, respectively.
The last value should be USER_HZ times the
second entry in the uptime pseudo-file.
In Linux 2.6 this line includes three additional columns:
iowait
- time waiting for I/O to complete (since 2.5.41);
irq
- time servicing interrupts (since 2.6.0-test4);
softirq
- time servicing softirqs (since 2.6.0-test4).
page 5741 1808
The number of pages the system paged in and the number that were paged
out (from disk).
swap 1 0
The number of swap pages that have been brought in and out.
intr 1462898
This line shows counts of interrupts serviced since boot time,
for each of the possible system interrupts.
The first column is the total of all interrupts serviced;
each subsequent column is the total for a particular interrupt.
disk_io: (2,0):(31,30,5764,1,2) (3,0):...
(major,minor):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
(Linux 2.4 only)
ctxt 115315
The number of context switches that the system underwent.
btime 769041601
boot time, in seconds since the epoch (January 1, 1970).
processes 86031
Number of forks since boot.
procs_running 6
Number of processes in runnable state.
(Linux 2.5.45 onwards.)
procs_blocked 2
Number of processes blocked waiting for I/O to complete.
(Linux 2.5.45 onwards.)
/proc/swaps
Swap areas in use.
See also
swapon(8).
/proc/sys
This directory (present since 1.3.57) contains a number of files
and subdirectories corresponding to kernel variables.
These variables can be read and sometimes modified using
the
proc file system, and the
sysctl(2)
system call.
Presently, there are subdirectories
R abi , debug , dev , fs , kernel , net , proc ,
R rxrpc , sunrpc and vm
that each contain more files and subdirectories.
/proc/sys/abi
This directory may contain files with application binary information.
On some systems, it is not present.
/proc/sys/debug
This directory may be empty.
/proc/sys/dev
This directory contains device specific information (eg dev/cdrom/info).
On
some systems, it may be empty.
/proc/sys/fs
This contains the subdirectories
R binfmt_misc , inotify , and mqueue ,
and files
R dentry-state , dir-notify-enable , dquot-nr , file-max ,
R file-nr , inode-max , inode-nr , inode-state ,
R lease-break-time , leases-enable ,
R overflowgid , overflowuid ,
R suid_dumpable ,
R super-max , and super-nr .
/proc/sys/fs/binfmt_misc
Documentation for files in this directory can be found
in the kernel sources in
R Documentation/binfmt_misc.txt .
/proc/sys/fs/dentry-state
This file contains six numbers,
R nr_dentry , nr_unused , age_limit (age in seconds),
want_pages
(pages requested by system) and two dummy values.
nr_dentry seems to be 0 all the time.
nr_unused seems to be the number of unused dentries.
age_limit is the age in seconds after which dcache entries
can be reclaimed when memory is short and want_pages is
non-zero when the kernel has called shrink_dcache_pages() and the
dcache isn't pruned yet.
/proc/sys/fs/dir-notify-enable
This file can be used to disable or enable the
dnotify
interface described in
fcntl(2)
on a system-wide basis.
A value of 0 in this file disables the interface,
and a value of 1 enables it.
/proc/sys/fs/dquot-max
This file shows the maximum number of cached disk quota entries.
On some (2.4) systems, it is not present.
If the number of free cached disk quota entries is very low and
you have some awesome number of simultaneous system users,
you might want to raise the limit.
/proc/sys/fs/dquot-nr
This file shows the number of allocated disk quota
entries and the number of free disk quota entries.
/proc/sys/fs/file-max
This file defines
a system-wide limit on the number of open files for all processes.
(See also
setrlimit(2),
which can be used by a process to set the per-process limit,
R RLIMIT_NOFILE ,
on the number of files it may open.)
If you get lots
of error messages about running out of file handles,
try increasing this value:
echo 100000 > /proc/sys/fs/file-max
The kernel constant
NR_OPEN
imposes an upper limit on the value that may be placed in
R file-max .
If you increase
R /proc/sys/fs/file-max ,
be sure to increase
/proc/sys/fs/inode-max
to 3-4 times the new
value of
R /proc/sys/fs/file-max ,
or you will run out of inodes.
/proc/sys/fs/file-nr
This (read-only) file
gives the number of files presently opened.
It contains three numbers: The number of allocated
file handles, the number of free file handles and the maximum
number of file handles.
The kernel allocates file handles dynamically, but it
doesn't free them again.
If the number of allocated files is close to the
maximum, you should consider increasing the maximum.
When the number of free file handles is
large, you've encountered a peak in your usage of file
handles and you probably don't need to increase the maximum.
/proc/sys/fs/inode-max
This file contains the maximum number of in-memory inodes.
On some (2.4) systems, it may not be
present.
This value should be 3-4 times larger
than the value in file-max, since stdin, stdout
and network sockets also
need an inode to handle them.
When you regularly run
out of inodes, you need to increase this value.
/proc/sys/fs/inode-nr
This file contains the first two values from inode-state.
/proc/sys/fs/inode-state
This file
contains seven numbers: nr_inodes, nr_free_inodes, preshrink and four
dummy values.
nr_inodes is the number of inodes the system has allocated.
This can be slightly more than inode-max because
Linux allocates them one page full at a time.
nr_free_inodes represents the number of free inodes.
preshrink is non-zero when the nr_inodes > inode-max and the
system needs to prune the inode list instead of allocating
more.
R /proc/sys/fs/inotify (since Linux 2.6.13)
This directory contains files
R max_queued_events , max_user_instances , and max_user_watches ,
that can be used to limit the amount of kernel memory consumed by the
inotify
interface.
For further details, see
inotify(7).
/proc/sys/fs/lease-break-time
This file
specifies the grace period that the kernel grants to a process
holding a file lease
(fcntl(2))
after it has sent a signal to that process notifying it
that another process is waiting to open the file.
If the lease holder does not remove or downgrade the lease within
this grace period, the kernel forcibly breaks the lease.
/proc/sys/fs/leases-enable
This file can be used to enable or disable file leases
(fcntl(2))
on a system-wide basis.
If this file contains the value 0, leases are disabled.
A non-zero value enables leases.
R /proc/sys/fs/mqueue (since Linux 2.6.6)
This directory contains files
R msg_max , msgsize_max , and queues_max ,
controlling the resources used by POSIX message queues.
See
mq_overview(7)
for details.
R /proc/sys/fs/overflowgid and /proc/sys/fs/overflowuid
These files
allow you to change the value of the fixed UID and GID.
The default is 65534.
Some filesystems only support 16-bit UIDs and GIDs, although in Linux
UIDs and GIDs are 32 bits.
When one of these filesystems is mounted
with writes enabled, any UID or GID that would exceed 65535 is translated
to the overflow value before being written to disk.
R /proc/sys/fs/suid_dumpable (since Linux 2.6.13)
The value in this file determines whether core dump files are
produced for set-user-ID or otherwise protected/tainted binaries.
Three different integer values can be specified:
0 (default)
This provides the traditional (pre-Linux 2.6.13) behavior.
A core dump will not be produced for a process which has
changed credentials (by calling
seteuid(2),
setgid(2),
or similar, or by executing a set-user-ID or set-group-ID program)
or whose binary does not have read permission enabled.
1 ("debug")
All processes dump core when possible.
The core dump is owned by the file system user ID of the dumping process
and no security is applied.
This is intended for system debugging situations only.
Ptrace is unchecked.
2 ("suidsafe")
Any binary which normally would not be dumped (see "0" above)
is dumped readable by root only.
This allows the user to remove the core dump file but not to read it.
For security reasons core dumps in this mode will not overwrite one
another or other files.
This mode is appropriate when administrators are
attempting to debug problems in a normal environment.
/proc/sys/fs/super-max
This file
controls the maximum number of superblocks, and
thus the maximum number of mounted filesystems the kernel
can have.
You only need to increase super-max if you need to
mount more filesystems than the current value in super-max
allows you to.
/proc/sys/fs/super-nr
This file
contains the number of filesystems currently mounted.
/proc/sys/kernel
This directory contains files
R acct , cad_pid , cap-bound ,
R core_pattern , core_uses_pid ,
R ctrl-alt-del , dentry-state , domainname ,
R hotplug , hostname ,
R htab-reclaim (PowerPC only),
R java-appletviewer (binfmt_java, obsolete),
R java-interpreter (binfmt_java, obsolete), l2cr (PowerPC only),
R modprobe , msgmax , msgmnb ,
R msgmni , osrelease , ostype , overflowgid , overflowuid ,
R panic , panic_on_oops , pid_max ,
R powersave-nap (PowerPC only), printk , pty , random ,
R real-root-dev , reboot-cmd (SPARC only), rtsig-max ,
R rtsig-nr , sem , sg-big-buff ,
R shmall , shmmax , shmmni , sysrq , tainted , threads-max ,
R version , and zero-paged (PowerPC only).
/proc/sys/kernel/acct
This file
contains three numbers: highwater, lowwater and frequency.
If BSD-style process accounting is enabled these values control
its behavior.
If free space on filesystem where the log lives
goes below lowwater percent accounting suspends.
If free space gets
above highwater percent accounting resumes.
Frequency determines
how often the kernel checks the amount of free space (value is in
seconds).
Default values are 4, 2 and 30.
That is, suspend accounting if <= 2% of space is free; resume it
if >= 4% of space is free; consider information about amount of free space
valid for 30 seconds.
/proc/sys/kernel/cap-bound
This file holds the value of the kernel
R capability bounding set
(expressed as a signed decimal number).
This set is ANDed against the capabilities permitted to a process
during
execve(2).
/proc/sys/kernel/core_pattern
See
core(5).
/proc/sys/kernel/core_uses_pid
See
core(5).
/proc/sys/kernel/ctrl-alt-del
This file
controls the handling of Ctrl-Alt-Del from the keyboard.
When the value in this file is 0, Ctrl-Alt-Del is trapped and
sent to the
init(1)
program to handle a graceful restart.
When the value is > 0, Linux's reaction to a Vulcan
Nerve Pinch (tm) will be an immediate reboot, without even
syncing its dirty buffers.
Note: when a program (like dosemu) has the keyboard in 'raw'
mode, the ctrl-alt-del is intercepted by the program before it
ever reaches the kernel tty layer, and it's up to the program
to decide what to do with it.
/proc/sys/kernel/hotplug
This file
contains the path for the hotplug policy agent.
The default value in this file "/sbin/hotplug".
R /proc/sys/kernel/domainname and /proc/sys/kernel/hostname
can be used to set the NIS/YP domainname and the
hostname of your box in exactly the same way as the commands
domainname(1)
and
hostname(1), that is:
# echo "darkstar" > /proc/sys/kernel/hostname
# echo "mydomain" > /proc/sys/kernel/domainname
has the same effect as
# hostname "darkstar"
# domainname "mydomain"
Note, however, that the classic darkstar.frop.org has the
hostname "darkstar" and DNS (Internet Domain Name Server)
domainname "frop.org", not to be confused with the NIS (Network
Information Service) or YP (Yellow Pages) domainname.
These two
domain names are in general different.
For a detailed discussion
see the
hostname(1)
man page.
/proc/sys/kernel/htab-reclaim
(PowerPC only) If this file is set to a non-zero value,
the PowerPC htab
(see kernel file Documentation/powerpc/ppc_htab.txt) is pruned
each time the system hits the idle loop.
/proc/sys/kernel/l2cr
(PowerPC only) This file
contains a flag that controls the L2 cache of G3 processor
boards.
If 0, the cache is disabled.
Enabled if non-zero.
/proc/sys/kernel/modprobe
This file
is described by the kernel source file Documentation/kmod.txt.
/proc/sys/kernel/msgmax
This file defines
a system-wide limit specifying the maximum number of bytes in
a single message written on a System V message queue.
/proc/sys/kernel/msgmni
This file defines the system-wide limit on the number of
message queue identifiers.
(This file is only present in Linux 2.4 onwards.)
/proc/sys/kernel/msgmnb
This file defines a system-wide parameter used to initialize the
msg_qbytes
setting for subsequently created message queues.
The
msg_qbytes
setting specifies the maximum number of bytes that may be written to the
message queue.
R /proc/sys/kernel/ostype and /proc/sys/kernel/osrelease
These files
give substrings of
R /proc/version .
R /proc/sys/kernel/overflowgid and /proc/sys/kernel/overflowuid
These files duplicate the files
/proc/sys/fs/overflowgid
and
R /proc/sys/fs/overflowuid .
/proc/sys/kernel/panic
gives read/write access to the kernel variable
R panic_timeout .
If this is zero, the kernel will loop on a panic; if non-zero
it indicates that the kernel should autoreboot after this number
of seconds.
When you use the
software watchdog device driver, the recommended setting is 60.
/proc/sys/kernel/panic_on_oops
This file (new in Linux 2.5) controls the kernel's behavior when an oops
or BUG is encountered.
If this file contains 0, then the system
tries to continue operation.
If it contains 1, then the system
delays a few seconds (to give klogd time to record the oops output)
and then panics.
If the
/proc/sys/kernel/panic
file is also non-zero then the machine will be rebooted.
/proc/sys/kernel/pid_max
This file
(new in Linux 2.5)
specifies the value at which PIDs wrap around
(i.e., the value in this file is one greater than the maximum PID).
The default value for this file, 32768,
results in the same range of PIDs as on earlier kernels.
On 32-bit platforms, 32768 is the maximum value for
R pid_max .
On 64-bit systems,
pid_max
can be set to any value up to 2^22
(PID_MAX_LIMIT, approximately 4 million).
R /proc/sys/kernel/powersave-nap (PowerPC only)
This file contains a flag.
If set, Linux-PPC will use the 'nap' mode of
powersaving,
otherwise the 'doze' mode will be used.
/proc/sys/kernel/printk
The four values in this file
are console_loglevel, default_message_loglevel, minimum_console_level and
default_console_loglevel.
These values influence printk() behavior when printing or
logging error messages.
See
syslog(2)
for more info on the different loglevels.
Messages with a higher priority than
console_loglevel will be printed to the console.
Messages without an explicit priority
will be printed with priority default_message_level.
minimum_console_loglevel is the minimum (highest) value to which
console_loglevel can be set.
default_console_loglevel is the default value for console_loglevel.
R /proc/sys/kernel/pty (since Linux 2.6.4)
This directory
contains two files relating to the number of Unix 98
pseudo-terminals (see
pts(4))
on the system.
/proc/sys/kernel/pty/max
This file defines the maximum number of pseudo-terminals.
/proc/sys/kernel/pty/nr
This read-only file
indicates how many pseudo-terminals are currently in use.
/proc/sys/kernel/random
This directory
contains various parameters controlling the operation of the file
R /dev/random .
See
random(4)
for further information.
/proc/sys/kernel/real-root-dev
This file
is documented in the kernel source file Documentation/initrd.txt.
R /proc/sys/kernel/reboot-cmd (Sparc only)
This file seems to be a way to give an argument to the SPARC
ROM/Flash boot loader.
Maybe to tell it what to do after
rebooting?
/proc/sys/kernel/rtsig-max
(Only in kernels up to and including 2.6.7; see
setrlimit(2))
This file can be used to tune the maximum number
of POSIX realtime (queued) signals that can be outstanding
in the system.
/proc/sys/kernel/rtsig-nr
(Only in kernels up to and including 2.6.7.)
This file shows the number POSIX realtime signals currently queued.
R /proc/sys/kernel/sem (since Linux 2.4)
This file contains 4 numbers defining limits for System V IPC semaphores.
These fields are, in order: