Відмінності між версіями «Отримання інформації про систему»
(Створена сторінка: Каталог / proc в операційних системах linux - це справжнє джерело інформації про систему! Так я...) |
|||
Рядок 6: | Рядок 6: | ||
processor : 0 | processor : 0 | ||
+ | |||
vendor_id : GenuineIntel | vendor_id : GenuineIntel | ||
+ | |||
cpu family : 6 | cpu family : 6 | ||
+ | |||
model : 23 | model : 23 | ||
+ | |||
model name : Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz | model name : Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz | ||
+ | |||
stepping : 10 | stepping : 10 | ||
+ | |||
cpu MHz : 800.000 | cpu MHz : 800.000 | ||
+ | |||
cache size : 3072 KB | cache size : 3072 KB | ||
+ | |||
physical id : 0 | physical id : 0 | ||
+ | |||
siblings : 2 | siblings : 2 | ||
+ | |||
core id : 0 | core id : 0 | ||
+ | |||
cpu cores : 2 | cpu cores : 2 | ||
+ | |||
apicid : 0 | apicid : 0 | ||
+ | |||
initial apicid : 0 | initial apicid : 0 | ||
+ | |||
fpu : yes | fpu : yes | ||
+ | |||
fpu_exception : yes | fpu_exception : yes | ||
+ | |||
cpuid level : 13 | cpuid level : 13 | ||
+ | |||
wp : yes | wp : yes | ||
+ | |||
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm ida dts tpr_shadow vnmi flexpriority | flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm ida dts tpr_shadow vnmi flexpriority | ||
+ | |||
bogomips : 5055.04 | bogomips : 5055.04 | ||
+ | |||
clflush size : 64 | clflush size : 64 | ||
+ | |||
cache_alignment : 64 | cache_alignment : 64 | ||
+ | |||
address sizes : 36 bits physical, 48 bits virtual | address sizes : 36 bits physical, 48 bits virtual | ||
+ | |||
power management: | power management: | ||
processor : 1 | processor : 1 | ||
+ | |||
vendor_id : GenuineIntel | vendor_id : GenuineIntel | ||
+ | |||
cpu family : 6 | cpu family : 6 | ||
+ | |||
model : 23 | model : 23 | ||
+ | |||
model name : Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz | model name : Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz | ||
+ | |||
stepping : 10 | stepping : 10 | ||
+ | |||
cpu MHz : 800.000 | cpu MHz : 800.000 | ||
+ | |||
cache size : 3072 KB | cache size : 3072 KB | ||
+ | |||
physical id : 0 | physical id : 0 | ||
+ | |||
siblings : 2 | siblings : 2 | ||
+ | |||
core id : 1 | core id : 1 | ||
+ | |||
cpu cores : 2 | cpu cores : 2 | ||
+ | |||
apicid : 1 | apicid : 1 | ||
+ | |||
initial apicid : 1 | initial apicid : 1 | ||
+ | |||
fpu : yes | fpu : yes | ||
+ | |||
fpu_exception : yes | fpu_exception : yes | ||
+ | |||
cpuid level : 13 | cpuid level : 13 | ||
+ | |||
wp : yes | wp : yes | ||
+ | |||
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm ida dts tpr_shadow vnmi flexpriority | flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm ida dts tpr_shadow vnmi flexpriority | ||
+ | |||
bogomips : 5054.32 | bogomips : 5054.32 | ||
+ | |||
clflush size : 64 | clflush size : 64 | ||
+ | |||
cache_alignment : 64 | cache_alignment : 64 | ||
+ | |||
address sizes : 36 bits physical, 48 bits virtual | address sizes : 36 bits physical, 48 bits virtual | ||
+ | |||
power management: | power management: | ||
Рядок 59: | Рядок 105: | ||
MemTotal: 4018004 kB | MemTotal: 4018004 kB | ||
+ | |||
MemFree: 2871104 kB | MemFree: 2871104 kB | ||
+ | |||
Buffers: 27872 kB | Buffers: 27872 kB | ||
+ | |||
Cached: 530544 kB | Cached: 530544 kB | ||
+ | |||
SwapCached: 0 kB | SwapCached: 0 kB | ||
+ | |||
Active: 573556 kB | Active: 573556 kB | ||
+ | |||
Inactive: 363236 kB | Inactive: 363236 kB | ||
+ | |||
Active(anon): 384352 kB | Active(anon): 384352 kB | ||
+ | |||
Inactive(anon): 55420 kB | Inactive(anon): 55420 kB | ||
+ | |||
Active(file): 189204 kB | Active(file): 189204 kB | ||
+ | |||
Inactive(file): 307816 kB | Inactive(file): 307816 kB | ||
+ | |||
Unevictable: 0 kB | Unevictable: 0 kB | ||
+ | |||
Mlocked: 0 kB | Mlocked: 0 kB | ||
+ | |||
SwapTotal: 3998716 kB | SwapTotal: 3998716 kB | ||
+ | |||
SwapFree: 3998716 kB | SwapFree: 3998716 kB | ||
+ | |||
Dirty: 4 kB | Dirty: 4 kB | ||
+ | |||
Writeback: 0 kB | Writeback: 0 kB | ||
+ | |||
AnonPages: 378368 kB | AnonPages: 378368 kB | ||
+ | |||
Mapped: 132884 kB | Mapped: 132884 kB | ||
+ | |||
Shmem: 61404 kB | Shmem: 61404 kB | ||
+ | |||
Slab: 63804 kB | Slab: 63804 kB | ||
+ | |||
SReclaimable: 28516 kB | SReclaimable: 28516 kB | ||
+ | |||
SUnreclaim: 35288 kB | SUnreclaim: 35288 kB | ||
+ | |||
KernelStack: 2128 kB | KernelStack: 2128 kB | ||
+ | |||
PageTables: 39376 kB | PageTables: 39376 kB | ||
+ | |||
NFS_Unstable: 0 kB | NFS_Unstable: 0 kB | ||
+ | |||
Bounce: 0 kB | Bounce: 0 kB | ||
+ | |||
WritebackTmp: 0 kB | WritebackTmp: 0 kB | ||
+ | |||
CommitLimit: 6007716 kB | CommitLimit: 6007716 kB | ||
+ | |||
Committed_AS: 1055852 kB | Committed_AS: 1055852 kB | ||
+ | |||
VmallocTotal: 34359738367 kB | VmallocTotal: 34359738367 kB | ||
+ | |||
VmallocUsed: 147856 kB | VmallocUsed: 147856 kB | ||
+ | |||
VmallocChunk: 34359581720 kB | VmallocChunk: 34359581720 kB | ||
+ | |||
HardwareCorrupted: 0 kB | HardwareCorrupted: 0 kB | ||
+ | |||
AnonHugePages: 120832 kB | AnonHugePages: 120832 kB | ||
+ | |||
HugePages_Total: 0 | HugePages_Total: 0 | ||
+ | |||
HugePages_Free: 0 | HugePages_Free: 0 | ||
+ | |||
HugePages_Rsvd: 0 | HugePages_Rsvd: 0 | ||
+ | |||
HugePages_Surp: 0 | HugePages_Surp: 0 | ||
+ | |||
Hugepagesize: 2048 kB | Hugepagesize: 2048 kB | ||
+ | |||
DirectMap4k: 10240 kB | DirectMap4k: 10240 kB | ||
+ | |||
DirectMap2M: 4151296 kB | DirectMap2M: 4151296 kB | ||
+ | |||
/ proc / mounts - містить список змонтованих в даний момент пристроїв: | / proc / mounts - містить список змонтованих в даний момент пристроїв: | ||
− | mounts | + | mounts |
+ | 2009/2009 100% | ||
rootfs / rootfs rw 0 0 | rootfs / rootfs rw 0 0 | ||
+ | |||
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 | proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 | ||
+ | |||
sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0 | sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0 | ||
+ | |||
devtmpfs /dev devtmpfs rw,seclabel,nosuid,relatime,size=1998948k,nr_inodes=499737,mode=755 0 0 | devtmpfs /dev devtmpfs rw,seclabel,nosuid,relatime,size=1998948k,nr_inodes=499737,mode=755 0 0 | ||
+ | |||
devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 | devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 | ||
+ | |||
tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev,relatime 0 0 | tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev,relatime 0 0 | ||
+ | |||
tmpfs /run tmpfs rw,seclabel,nosuid,nodev,relatime,mode=755 0 0 | tmpfs /run tmpfs rw,seclabel,nosuid,nodev,relatime,mode=755 0 0 | ||
+ | |||
/dev/sda2 / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered 0 0 | /dev/sda2 / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered 0 0 | ||
+ | |||
tmpfs /run tmpfs rw,seclabel,nosuid,nodev,relatime,mode=755 0 0 | tmpfs /run tmpfs rw,seclabel,nosuid,nodev,relatime,mode=755 0 0 | ||
+ | |||
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 | selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 | ||
+ | |||
tmpfs /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,mode=755 0 0 | tmpfs /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,mode=755 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroup | cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroup | ||
s-agent,name=systemd 0 0 | s-agent,name=systemd 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0 | cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0 | cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0 | cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0 | cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0 | cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0 | cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0 | cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0 | ||
+ | |||
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0 | cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0 | ||
+ | |||
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=20,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 | systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=20,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 | ||
0 | 0 | ||
+ | |||
mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0 | mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0 | ||
+ | |||
debugfs /sys/kernel/debug debugfs rw,relatime 0 0 | debugfs /sys/kernel/debug debugfs rw,relatime 0 0 | ||
+ | |||
hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime 0 0 | hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime 0 0 | ||
+ | |||
securityfs /sys/kernel/security securityfs rw,relatime 0 0 | securityfs /sys/kernel/security securityfs rw,relatime 0 0 | ||
+ | |||
tmpfs /media tmpfs rw,rootcontext=system_u:object_r:mnt_t:s0,seclabel,nosuid,nodev,noexec,relatime,mode=755 0 | tmpfs /media tmpfs rw,rootcontext=system_u:object_r:mnt_t:s0,seclabel,nosuid,nodev,noexec,relatime,mode=755 0 | ||
0 | 0 | ||
+ | |||
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0 | sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0 | ||
Версія за 14:41, 6 грудня 2011
Каталог / proc в операційних системах linux - це справжнє джерело інформації про систему! Так як основний філософією UNIX подібних систем є вираз "Всі - файл", розробники спростили нам завдання отримання інформації про систему (власне залишилося тільки прочитати потрібний файл в каталозі / proc).
/ proc / cpuinfo
Цей файл містить детальну інформацію про процесори системи:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz
stepping : 10
cpu MHz : 800.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm ida dts tpr_shadow vnmi flexpriority
bogomips : 5055.04
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz
stepping : 10
cpu MHz : 800.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm ida dts tpr_shadow vnmi flexpriority
bogomips : 5054.32
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
Не менш відомий файл / proc / meminfo. Він містить вичерпні дані про використання пам'яті системи:
MemTotal: 4018004 kB
MemFree: 2871104 kB
Buffers: 27872 kB
Cached: 530544 kB
SwapCached: 0 kB
Active: 573556 kB
Inactive: 363236 kB
Active(anon): 384352 kB
Inactive(anon): 55420 kB
Active(file): 189204 kB
Inactive(file): 307816 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 3998716 kB
SwapFree: 3998716 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 378368 kB
Mapped: 132884 kB
Shmem: 61404 kB
Slab: 63804 kB
SReclaimable: 28516 kB
SUnreclaim: 35288 kB
KernelStack: 2128 kB
PageTables: 39376 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 6007716 kB
Committed_AS: 1055852 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 147856 kB
VmallocChunk: 34359581720 kB
HardwareCorrupted: 0 kB
AnonHugePages: 120832 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 10240 kB
DirectMap2M: 4151296 kB
/ proc / mounts - містить список змонтованих в даний момент пристроїв:
mounts
2009/2009 100%
rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,seclabel,nosuid,relatime,size=1998948k,nr_inodes=499737,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev,relatime 0 0
tmpfs /run tmpfs rw,seclabel,nosuid,nodev,relatime,mode=755 0 0
/dev/sda2 / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered 0 0
tmpfs /run tmpfs rw,seclabel,nosuid,nodev,relatime,mode=755 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroup s-agent,name=systemd 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=20,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime 0 0
securityfs /sys/kernel/security securityfs rw,relatime 0 0
tmpfs /media tmpfs rw,rootcontext=system_u:object_r:mnt_t:s0,seclabel,nosuid,nodev,noexec,relatime,mode=755 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
/ proc / PID - каталог містить інформацію про кожному процесі системи. Тут PID - ідентифікаційний номер процесу
Дізнатися PID можна запустивши в терміналі команду:
top