Normal
0
7.8 磅
0
2
false
false
false
EN-US
ZH-CN
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}
The proc file system
Linux内核有两个主要功能:控制访问计算机上的物理设备和安排何时以及如何处理与这些设备进行交互。在/ proc /目录(也称为proc文件系统)包含了一系列代表了内核的当前状态,允许应用程序和用户同行到内核的系统视图特殊文件的层次结构。
在/ proc /目录中包含丰富的系统硬件和所有正在运行的进程的详细信息。此外,在/proc中,某些文件可以被用户和应用程序操纵进行通信配置更改内核。
/proc/interrupts,
/proc/meminfo, /proc/mounts, and /proc/partitions包含了up-to-the-moment
glimpse的系统硬件信息。/proc/filesystems文件和/proc/sys目录提供了系统配置信息和接口。
修改一个虚拟文件的配置,可以使用下面的命令:
echo NewValue
> /proc/file
例如修改系统的hostname,可以使用下面的命令:
echo
>
/proc/sys/kernel/hostname
例如开启系统ipv4的数据包转发,可以使用下面的命令:
echo
1 > /proc/sys/net/ipv4/ip_forward
另外。/sbin/sysctl命令可以修改/proc/sys目录下文件的配置。
1、/proc/buddyinfo
这个文件主要用于诊断内存碎片问题。
2、/proc/cmdline
这个文件显示在启动时向内核传递的参数。例如:
ro root=/dev/VolGroup00/LogVol00 rhgb
quiet 3
这告诉我们以只读方式挂载kernel,位于第一个逻辑卷组的第一个逻辑卷。Rhgb表示将以图形界面方式启动,前提是rhgb包已经安装,并且启动级别为5。Quiet将屏蔽启动时内核输出的详细信息。
3、/proc/cpuinfo
这个虚拟文件标示系统使用的cpu类型以及相关的参数。
4、/proc/crypto
该文件列出了所有已安装被Linux内核使用加密的密码,包括每个细节。
5、/proc/devices
这个文件显示了所有已经配置的字符设备和块设备。显示内容包括了设备的主设备号和名称。
字符设备不需要缓冲。块设备都提供一个可以的缓冲,让他们为了解决这些之前请求问题。
字符设备发送没有预先设定的大小的数据。块设备可以发送和接收设备上配置的每一个块大小的信息。
6、/proc/dma
该文件包含了注册使用ISA DMA通道列表。
7、/proc/execdomains
该文件列出了目前的Linux内核支持的执行域,随着个性,他们支持的范围。
8、/proc/fb
该文件包含了帧缓冲设备的列表,与帧缓冲设备的数量和控制它的驱动程序。
9、/proc/filesystems
该文件显示了目前由内核支持的文件系统类型列表。以nodev为行首的标示没有该类型的设备被mount。
10、/proc/interrupts
这个文件记录了在x86架构中每个IRQ中断数量。
第一列是指IRQ号。系统中的每个CPU都有自己的列及其每个IRQ中断号码。下一列报告的中断类型,最后一列包含的是位于该IRQ的设备名称。
11、/proc/iomem
此文件显示您每个物理设备的系统内存的当前映射。
12、/proc/ioports
在/ proc/ ioports的输出内容中提供了当前注册的设备为输入或输出与通信的端口区域的名单。
13、/proc/kcore
该文件代表了系统的物理内存,并在核心文件格式存储。与大多数的/ proc/文件不同,kcore显示大小。这个值是给定的字节并且大小等于使用的物理内存加上4 KB。
14、/proc/kmsg
这个文件是用来存放由内核产生的消息。这些消息然后被其他程序获取,比如/
sbin/ klogd或/ bin/dmesg。
15、/proc/loadavg
此文件提供的关于随着时间的推移CPU和IO的负载,以及由uptime和其他命令使用其他数据平均负载的样子。
前三列度量最后一,五,15分钟时期CPU和IO的使用。第四列显示了当前正在运行的进程和进程的总数量。最后一栏显示的最后一个进程ID的。
16、/proc/locks
该文件显示当前由内核锁定的文件。这个文件的内容包含内部内核调试数据,根据系统的使用情况,这个内容可以千差万别。
17、/proc/mdstat
这个文件包含当前系统中的多磁盘和RAID配置信息。
18、/proc/meminfo
系统RAM使用的信息。
- l MemTotal — Total amount of physical RAM, in kilobytes.
-
-
l MemFree — The amount of physical RAM, in kilobytes, left unused by the system.
-
-
l Buffers — The amount of physical RAM, in kilobytes, used for file buffers.
-
-
l Cached — The amount of physical RAM, in kilobytes, used as cache memory.
-
-
l SwapCached — The amount of swap, in kilobytes, used as cache memory.
-
-
l Active — The total amount of buffer or page cache memory, in kilobytes, that is in active use. This is memory that has been recently used and is usually not reclaimed for other purposes.
-
-
l Inactive — The total amount of buffer or page cache memory, in kilobytes, that are free and available. This is memory that has not been recently used and can be reclaimed for other purposes.
-
-
l HighTotal and HighFree — The total and free amount of memory, in kilobytes, that is not directly mapped into kernel space. The HighTotal value can vary based on the type of kernel used.
-
-
l LowTotal and LowFree — The total and free amount of memory, in kilobytes, that is directly mapped into kernel space. The LowTotal value can vary based on the type of kernel used.
-
-
l SwapTotal — The total amount of swap available, in kilobytes.
-
-
l SwapFree — The total amount of swap free, in kilobytes.
-
-
l Dirty — The total amount of memory, in kilobytes, waiting to be written back to the disk.
-
-
l Writeback — The total amount of memory, in kilobytes, actively being written back to the disk.
-
-
l Mapped — The total amount of memory, in kilobytes, which have been used to map devices, files, or libraries using the mmap command.
-
-
l Slab — The total amount of memory, in kilobytes, used by the kernel to cache data structures for its own use.
-
-
l Committed_AS — The total amount of memory, in kilobytes, estimated to complete the workload.
-
-
l This value represents the worst case scenario value, and also includes swap memory.
-
-
l PageTables — The total amount of memory, in kilobytes, dedicated to the lowest page table level.
-
-
l VMallocTotal — The total amount of memory, in kilobytes, of total allocated virtual address space.
-
-
l VMallocUsed — The total amount of memory, in kilobytes, of used virtual address space.
-
-
l VMallocChunk — The largest contiguous block of memory, in kilobytes, of available virtual address space.
-
-
l HugePages_Total — The total number of hugepages for the system. The number is derived by
-
-
l dividing Hugepagesize by the megabytes set aside for hugepages specified in /proc/sys/vm/
-
-
l hugetlb_pool. This statistic only appears on the x86, Itanium, and AMD64 architectures.
-
-
l HugePages_Free — The total number of hugepages available for the system. This statistic only
-
-
l appears on the x86, Itanium, and AMD64 architectures.
-
-
l Hugepagesize — The size for each hugepages unit in kilobytes. By default, the value is 4096KB on uniprocessor kernels for 32 bit architectures. For SMP, hugemem kernels, and AMD64, the default is 2048 KB. For Itanium architectures, the default is 262144 KB. This statistic only appears on the x86, Itanium, and AMD64 architectures.
19、/proc/modules
该文件显示了加载到内核的所有模块的列表。
20、/proc/mounts
此文件提供了系统所有挂载设备的列表。
21、/proc/mtrr
该文件指的是当前系统的使用MTRR。
22、/proc/partitions
该文件包含分区块分配信息。内容包括主设备号、次设备号、块、设备名称。
23、/proc/slabinfo
在slab层下的内存使用的所有信息。
24、/proc/stat
这个文件记录了大量有关系统的各种不同的统计跟踪自上次重新启动。
25、/proc/swaps
这个文件显示当前swap分区的使用情况。
26、/proc/uptime
这个文件包含自上次重启系统逝去了多少时间。
27、/proc/version
这个文件保存系统的相关版本信息。
阅读(889) | 评论(0) | 转发(0) |