Linux proc file system details

Source: Internet
Author: User
Tags snmp
The system information provided by multiple files in the/proc file system is not for a specific process, but can be used in the context of the entire system. Files that can be used vary with system configurations. The command procinfo can display multiple system information based on some of the files. The files under/proc are described in detail below. --------------------------------------------------------------------------------
/Proc/cmdline File
This file provides the command line for Kernel startup. It is very similar to the cmdline entry used for processes.
--------------------------------------------------------------------------------
/Proc/cpuinfo File
This file provides a variety of information about the system CPU. This information is obtained from the CPU test code in the kernel. The file lists the general CPU model (386,486,586,686, etc.) and more specific information (manufacturer, model, and version ). The file also contains the processor speed represented by bogomips. If multiple features or bugs of the CPU are detected, the file also contains the corresponding identifier. The format of this file is: The file consists of multiple lines, each line includes a domain name, a colon and a value.
--------------------------------------------------------------------------------
/Proc/devices File
This file lists the characters and main device numbers of Block devices, and the names of devices allocated to these device numbers. Http://www.armforum.cn
--------------------------------------------------------------------------------
/Proc/DMA File
This file lists the DMA channels retained by the driver and the names of the drivers that keep them. Casade is used to separate the sub-DMA controller from the master controller for the DMA row; this row cannot be used for other purposes.
--------------------------------------------------------------------------------
/Proc/filesystems File
This file lists available file system types, one type and one row. Although they are usually file system types compiled into the kernel, the file can also contain other file system types that can be attached to the loaded kernel module.
--------------------------------------------------------------------------------
/Proc/interrupts File
Each row of this file has a reserved interrupt. The fields in each row include the interrupt number, the number of times the thread is interrupted, the domain with a plus sign (sa_interrupt flag setting), and the name of the driver that registers the interrupt. You can run the cat command to manually view the current file, just like View/proc/DMA and/proc/ioports, before installing the new hardware. These files list the resources currently in use (but do not include the resources used by the hardware that does not load the driver ).
-------------------------------------------------------------------------------- String 8
/Proc/ioports File
This file lists the many I/O port ranges registered by drivers of multiple devices, such as disk drives, Ethernet cards, and sound card devices.
--------------------------------------------------------------------------------
/Proc/kcore File
This file is the file stored in the system's physical memory in the core file format. For example, GDB can use it to check the data structure of the kernel. It is not a plain text, but one of the few binary format items in the/proc directory.
-------------------------------------------------------------------------------
/Proc/kmsg File
This file is used to retrieve kernel messages generated by printk. At any time, only one Super User-authorized process can read the file. You can also use the system to call syslog To retrieve these messages. You can use the dmesg tool or the klogd daemon to retrieve these messages.
--------------------------------------------------------------------------------
/Proc/ksyms File
This file lists the registered kernel symbols that give the addresses of variables or functions. Each line provides the address, name, and module for registering the symbol. The program ksyms, insmod and kmod use this file. It also lists the number of running tasks, the total number of tasks, and the last assigned PID.
-------------------------------------------------------------------------------- String 4
/Proc/loadavg File
This file provides the average system load calculated at several different time intervals, as shown in the uptime command. The first three figures show average load. This is calculated by calculating the average number of tasks in the queue in the past 1 minute, 5 minutes, and 15 minutes. Then there is the number of running tasks and total number of tasks. The last process ID used.
--------------------------------------------------------------------------------
/Proc/locks File
This file contains the lock information on the opened file. Each row in the file describes the lock information on a specific file and document and the type of lock applied to the file. The kernel can also apply a mandatory lock to the file as needed.
--------------------------------------------------------------------------------
/Proc/mdstat File
This file contains the RAID device information controlled by the MD device driver.
--------------------------------------------------------------------------------
/Proc/meminfo File
This file provides information about the memory status. It shows the total amount of idle memory, used physical memory and swap memory in the system. It also shows the total amount of shared memory and buffer used by the kernel. The format of the information is similar to that displayed by the free command.
-------------------------------------------------------------------------------- Http://www.armforum.cn
/Proc/MISC File
This file reports the device driver registered with the kernel function misc_register.
--------------------------------------------------------------------------------
/Proc/modules File
This file provides information about the kernel modules that can be loaded. The lsmod program displays information about the module name, size, and quantity.
--------------------------------------------------------------------------------
/Proc/mounts File
This file provides information about the file system installed on the current system in the format of/etc/mtab. This file also reflects any file systems that are manually installed and not included in the/etc/mtab file.
--------------------------------------------------------------------------------
/Proc/PCI File
This file provides information about the PCI device. It can be used to easily diagnose PCI problems. The information you can retrieve from this file includes devices such as IDE interfaces or USB controllers, bus, device and function numbers, device latencies, and IRQ numbers.
--------------------------------------------------------------------------------
/Proc/STAT File
This file contains information such as CPU utilization, disk, Memory Page, memory swap, all interruptions, contact switches, and the time for the rewards and giving (seconds since January 1, January 1, 1970 ). Http://www.armforum.cn
--------------------------------------------------------------------------------
/Proc/uptime File
This file shows the number of seconds since the last system was started, and the number of seconds in the file are idle. This is mainly used by the uptime program. Comparing these two numbers will tell you the proportion of CPU Cycle Waste in the long term.
--------------------------------------------------------------------------------
/Proc/version File
This file contains only one line of content, indicating the running kernel version. You can use standard programming methods to analyze the required system information.
--------------------------------------------------------------------------------
/Proc/NET subdirectory
The file in this directory describes or modifies the online code behavior. You can use ARP, netstat, route, and ipfwadm commands to set or query many files in these special files.
--------------------------------------------------------------------------------
The following abstract describes the functions of files in this directory:
ARP
Dump the dev package statistics in the ARP table of each network interface Dev
Statistics from network devices dev_mcast
List two-layer (data link layer) multicast group IGMP

String 5


Added to the IGMP multicast group Netlink
Netstat
Multiple statistics on network traffic. The first line is the information header with the name of each variable. The value raw of the corresponding variable is saved in the next row.
Route
Static route table RPC
Rt_cache directory containing RPC Information
Route buffer SNMP
Statistics on the IP/ICMP/TCP/UDP protocol of the SNMP agent; Field Names and values of each row are displayed alternately.
Lists the number of TCP/UDP/raw/PAC/syc_cookies used.
TCP connection set interface UDP
UDP connection socket table Unix
Socket table of Unix domain Interface
--------------------------------------------------------------------------------
Example:
[Root @ localhost/] # Cat/proc/NET/route
Iface destination gateway flags refcnt use metric mask MTU window irtt

String 8


Eth0 0035c2da 00000000 0001 0 0 0 80fffff0
Eth0 running fea9 00000000 0001 0 0 0 running fff0
Eth0 00000000 0135c2da 0003 0 0 0 00000000
--------------------------------------------------------------------------------
[Root @ localhost/] # Cat/proc/NET/tcp
SL local_address rem_address st tx_queue rx_queue tr TM-> when retrnsmt uid timeout inode
0: 00000000: 8000 0a
1: 00000000: 006f 0a 000 0 0 00000000 1 0dde79e0 9484 0 0 2-1
2: 0100007f: 0277 then 0a then 000 0 0 00000000 1 0a8e3a00 10049 0 0 2-1
3: 0100007f: 14d7 0a 00 00000000 1 0dde7020 9847 0 0 2-1
4: 0100007f: 0019 then 0a then 000 0 0 00000000 1 0a8e3520 10286 0 0 2-1
--------------------------------------------------------------------------------
[Root @ localhost/] # Cat/proc/NET/ARP

String 5


IP address HW type flags HW Address Mask Device
218.194.53.1 0x1 0x2 00: 0d: BC: 78: 07: 3f * eth0
--------------------------------------------------------------------------------
[Root @ localhost/] # Cat/proc/NET/udp
SL local_address rem_address st tx_queue rx_queue tr TM-> when retrnsmt uid timeout inode
0: 00000000: 8000
105: 00000000: 14e9 07 00000000 99 0 10284 2 0b4ef040
111: 00000000: 006f 07 00000000 0 9483 2 0b4efcc0
116: 00000000: 02f4 07 00000000 0 9511 2 0b4efa40
119: 00000000: 0277 --------------------------------------------------------------------------------
/Proc/SCSI subdirectory
This directory contains a file listing all detected SCSI devices and provides a directory for each controller driver, in this directory, a sub-directory is provided for each instance of the Controller that has been installed.

M Development Forum


--------------------------------------------------------------------------------
/Proc/sys subdirectory
There are many subdirectories in this directory. Many items in this directory can be used to adjust the system performance. This directory contains too much information and cannot be fully described. Only some files in the directory are displayed in the example.
--------------------------------------------------------------------------------
[Root @ localhost ~] # Ls/proc/sys/fs
AIO-max-Nr dentry-state file-Nr lease-break-time overflowgid
AIO-Nr Dir-policy-enable inode-Nr leases-enable overflowuid
Binfmt_misc file-Max inode-state mqueue quota
--------------------------------------------------------------------------------
[Root @ localhost ~] # Ls/proc/sys/kernel
Acct hotplug panic SEM
Cad_pid modprobe panic_on_oops Shmall
Cap-bound msgmax pid_max shmmax
Core_pattern msgmnb print-fatal-signals shmmni
Core_uses_pid msgmni printk sysrq
CTRL-alt-del ngroups_max printk_ratelimit tainted
Domainname osrelease printk_ratelimit_burst threads-max
Exec-shield ostype Pty vdso string 5
Exec-shield-randomize overflowgid random version
Hostname overflowuid real-root-Dev
--------------------------------------------------------------------------------
[Root @ localhost ~] # Ls/proc/sys/Net
Core Ethernet IPv4 IPv6 Unix
------------------------------------------------------------------------------ [Root @ localhost sys] # ls/proc/sys/Vm
Block_dump laptop_mode nr_pdflush_threads
Dirty_background_ratio legacy_va_layout overcommit_memory
Dirty_expire_centisecs lower_zone_protection overcommit_ratio
Dirty_ratio max_map_count page-Cluster
Dirty_writeback_centisecs min_free_kbytes swappiness
Hugetlb_shm_group nr_hugepages vfs_cache_pressure
------------------------------------------------------------------------------ [Root @ localhost sys] # ls/proc/sys/NET/IPv4
Conf tcp_fack
Icmp_echo_ignore_all tcp_fin_timeout
Icmp_echo_ignore_broadcasts tcp_frto
Icmp_ignore_bogus_error_responses tcp_keepalive_intvl http://www.armforum.cn
Icmp_ratelimit tcp_keepalive_probes
Icmp_ratemask tcp_keepalive_time
Igmp_max_memberships tcp_low_latency
Igmp_max_msf tcp_max_orphans
Inet_peer_gc_maxtime tcp_max_syn_backlog
Inet_peer_gc_mintime tcp_max_tw_buckets
Inet_peer_maxttl tcp_mem
Inet_peer_minttl tcp_moderate_rcvbuf
Inet_peer_threshold tcp_no_metrics_save
Ip_autoconfig tcp_orphan_retries
Ip_conntrack_max tcp_reordering
Ip_default_ttl tcp_retrans_collapse
Ip_dynaddr tcp_retries1
Ip_forward tcp_retries2
Ipfrag_high_thresh tcp_rfc1337
Ipfrag_low_thresh tcp_rmem
Ipfrag_secret_interval tcp_sack
Ipfrag_time tcp_stdurg
Ip_local_port_range tcp_synack_retries
Ip_nonlocal_bind tcp_syncookies
Ip_no_pmtu_disc tcp_syn_retries
Neigh tcp_timestamps
Netfilter tcp_tso_win_divisor
Route tcp_tw_recycle
Tcp_abort_on_overflow tcp_tw_reuse
Tcp_adv_win_scale tcp_vegas_alpha
Tcp_app_win tcp_vegas_beta
Tcp_bic tcp_vegas_cong_avoid
Tcp_bic_fast_convergence tcp_vegas_gamma string 8
Tcp_bic_low_window tcp_westwood
Tcp_dsack tcp_window_scaling
Tcp_ecn tcp_wmem
------------------------------------------------------------------------------ [Root @ localhost sys] # Cat/proc/sys/kernel/Shmall
2097152
--------------------------------------------------------------------------------
[Root @ localhost sys] # Cat/proc/sys/kernel/osrelease
2.6.9 to 1.667
--------------------------------------------------------------------------------
Summary:
The/proc file system contains a large amount of information about the current system status. The proc manual page also contains explanatory documents for these files. Compare the output generated by the file and the tool for analyzing these files to better understand these files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.