Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Guida di Installazione Pagina 37

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 282
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 36
Chapter 2. The /proc File System 37
2.2.29. /proc/uptime
This file contains information about how long the system has on since its last restart. The output of
/proc/uptime is quite minimal:
350735.47 234388.90
The first number tells you the total number of seconds the system has been up. The second number
tells you how much of that time, also in seconds, the machine has spent idle.
2.2.30. /proc/version
This files tells you the versions of the Linux kernel and gcc, as well as the version of Red Hat Linux
installed on the system:
Linux version 2.4.18-0.4 ([email protected]) (gcc version 2.96 20000731
(Red Hat Linux 7.2 2.96-106)) #1 Wed Mar 13 10:47:08 EST 2002
This information is used for a variety of purposes, including the version data presented when a user
logs in.
2.3. Directories in /proc
Common groups of information concerning the kernel are grouped into directories and subdirectories
within the /proc directory.
2.3.1. Process Directories
Every /proc directory contains a number of directories numerical names. A listing of them starts off
like this:
dr-xr-xr-x 3 root root 0 Feb 13 01:28 1
dr-xr-xr-x 3 root root 0 Feb 13 01:28 1010
dr-xr-xr-x 3 xfs xfs 0 Feb 13 01:28 1087
dr-xr-xr-x 3 daemon daemon 0 Feb 13 01:28 1123
dr-xr-xr-x 3 root root 0 Feb 13 01:28 11307
dr-xr-xr-x 3 apache apache 0 Feb 13 01:28 13660
dr-xr-xr-x 3 rpc rpc 0 Feb 13 01:28 637
dr-xr-xr-x 3 rpcuser rpcuser 0 Feb 13 01:28 666
These directories are called process directories, as they are named after a program’s process ID and
contain information specific to that process. The owner and group of each process directory is set to
the user running the process. When the process is terminated, its /proc process directory vanishes.
However, while the process is running, a great deal of information specific to that process is held
within its directory.
Each of the process directories contains the following files:
cmdline — Contains the command line arguments that started the process. The output of cmdline
file for the sshd process looks like this:
/usr/sbin/sshd
cpu — Provides specific information about the utilization of each of the system’s CPUs. A process
running on a dual CPU system produces output similar to this:
cpu 11 3
Vedere la pagina 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 281 282

Commenti su questo manuale

Nessun commento