Whole document tree
    

Whole document tree

Filesystem Hierarchy Standard - 5.10 /var/run : Run-time variable data

Filesystem Hierarchy Standard

5.10 /var/run : Run-time variable data

This directory contains system information data describing the system since it was booted. Files under this directory should be cleared (removed or truncated as appropriate) at the beginning of the boot process. Programs may have a subdirectory of /var/run; this is encouraged for programs that use more than one run-time file.

Note: programs that run as non-root users may be unable to create files under /var/run and therefore need a subdirectory owned by the appropriate user.

Process identifier (PID) files, which were originally placed in /etc, should be placed in /var/run. The naming convention for PID files is <program-name>.pid. For example, the crond PID file is named /var/run/crond.pid.

The internal format of PID files remains unchanged. The file should consist of the process identifier in ASCII-encoded decimal, followed by a newline character. For example, if crond was process number 25, /var/run/crond.pid would contain three characters: two, five, and newline.

Programs that read PID files should be somewhat flexible in what they accept; i.e., they should ignore extra whitespace, leading zeroes, absence of the trailing newline, or additional lines in the PID file. Programs that create PID files should use the simple specification located in the above paragraph.

The utmp file, which stores information about who is currently using the system, is located in this directory.

Programs that maintain transient UNIX-domain sockets should place them in this directory.


Previous:
/var/opt : Variable data for /opt
Next: /var/spool : Application spool data
Up: Table of Contents

Translated by troff2html v1.4 on 13 January 2001 by Daniel Quinlan