Linux pseudo-Files and proc files

Source: Internet
Author: User

The file types of the Linux/unix system can be broadly categorized into three categories: normal files, directory files, and pseudo-files. Common pseudo-Files are special files, named pipes, and proc files, respectively.

Pseudo-Files are not used to store data, so these files do not occupy disk space, although these files do exist in the directory tree, are part of the directory tree, and are also organized in the same way as license catalogs. The purpose of the pseudo-file is to provide a service through which the system can access the objects represented by these files like ordinary files. It is important that the pseudo file is a device file. such as keyboard, mouse, monitor and so on. For these device files there should be pseudo-files to represent them. In addition to the device, there is a named pipe, through which the user can connect the output of one command to the input of another command. The last pseudo-file is a proc file that allows access to information in the kernel.

Common proc pseudo-Files in the system:

APM Advanced Power Management Information cmdline kernel command line cpuinfo about CPU information devices available devices (block devices/character devices) DMA used DMA channel filesystems supported file systems interrupts Use of Ioports I/O ports for interrupts Kcore kernel core impression kmsg kernel message ksyms kernel symbol table loadavg load Balancer locks kernel lock meminfo Memory Information Misc Miscellaneous modules load Modules list mounts Load file system partitions system recognized partition table RTC Real-time Clock slabinfo slab Pool Information stat Comprehensive statistics status table swaps utilization of Swap version version kernel edition uptime System uptime pseudo-files can be viewed with cat commands, such as pseudo-file information that is frequently queried: (Linux version, memory, CPU)
[Email protected] bin]# cat/proc/Versionlinux version2.6. --8. EL5 ([email protected] -. build.redhat.com) (GCC version4.1.1 20070105(Red Hat4.1.1- the)) #1SMP Fri Jan -  -: the: +Est -[email protected] bin]# cat/proc/Cpuinfoprocessor:0VENDOR_ID:GENUINEINTELCPU Family:6Model: atmodel Name:intel (R) Core (TM)2Duo CPU T6500 @2. 10GHzstepping:TenCPU MHz:2098.866Cache Size:2048KBfdiv_bug:nohlt_bug:nof00f_bug:nocoma_bug:nofpu:yesfpu_exception : Yescpuid Level: -wp:yesflags:fpu vme de PSE TSC MSR PAE MCE cx8 APIC MTRR PGE MCA cmov Pat PSE36 Clflush DTS ACPI MMX FXSR SSE SSE2 SS NX CONSTANT_TSC up pnibogomips:4203.23[email protected] bin]# cat/proc/meminfomemtotal:1035400Kbmemfree:261848kbbuffers:53492kbcached:475956kbswapcached:0kbactive:384188kbinactive:350136kbhightotal:131008Kbhighfree: thekblowtotal:904392Kblowfree:261584kbswaptotal:2040212Kbswapfree:2040212Kbdirty:324Kbwriteback:0kbanonpages:204888kbmapped:202112Kbslab:27808Kbpagetables:4108kbnfs_unstable:0kbbounce:0Kbcommitlimit:2557912kbcommitted_as:604960kbvmalloctotal:114680kbvmallocused:4368Kbvmallocchunk:109804kbhugepages_total:0Hugepages_free:0HUGEPAGES_RSVD:0hugepagesize:4096Kb[[email protected] bin]# cat/proc/Cpuinfoprocessor:0VENDOR_ID:GENUINEINTELCPU Family:6Model: atmodel Name:intel (R) Core (TM)2Duo CPU T6500 @2. 10GHzstepping:TenCPU MHz:2098.866Cache Size:2048KBfdiv_bug:nohlt_bug:nof00f_bug:nocoma_bug:nofpu:yesfpu_exception : Yescpuid Level: -wp:yesflags:fpu vme de PSE TSC MSR PAE MCE cx8 APIC MTRR PGE MCA cmov Pat PSE36 Clflush DTS ACPI MMX FXSR SSE SSE2 SS NX CONSTANT_TSC up pnibogomips:4203.23

Related Article

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.