Детальная информация об оперативной памяти
cat /proc/meminfo
Результат:
MemTotal: 8189496 kB
MemFree: 5032056 kB
Buffers: 163628 kB
Cached: 1634124 kB
SwapCached: 0 kB
Active: 1981312 kB
Inactive: 1024508 kB
Active(anon): 1210676 kB
Inactive(anon): 11488 kB
Active(file): 770636 kB
Inactive(file): 1013020 kB
Unevictable: 2388 kB
Mlocked: 2388 kB
HighTotal: 7400016 kB
HighFree: 4520172 kB
LowTotal: 789480 kB
LowFree: 511884 kB
SwapTotal: 15998968 kB
SwapFree: 15998968 kB
Dirty: 236 kB
Writeback: 0 kB
AnonPages: 1210488 kB
Mapped: 170524 kB
Shmem: 12424 kB
Slab: 65648 kB
SReclaimable: 46280 kB
SUnreclaim: 19368 kB
KernelStack: 3960 kB
PageTables: 10276 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 20093716 kB
Committed_AS: 2906208 kB
VmallocTotal: 122880 kB
VmallocUsed: 72700 kB
VmallocChunk: 23036 kB
HardwareCorrupted: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 59384 kB
DirectMap2M: 851968 kB
Отображение объема свободной и занятой памяти:
free -m
free -g
free -k
Результат:
total used free shared buffers cached
Mem: 8189496 3163044 5026452 0 163856 1637368
-/+ buffers/cache: 1361820 6827676
Swap: 15998968 0 15998968
Команда для отображения общей и занятой памяти:
top
Результат:
top - 14:35:50 up 1 day, 10:58, 1 user, load average: 0.40, 0.88, 0.90
Tasks: 112 total, 1 running, 111 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.3%us, 0.6%sy, 0.0%ni, 96.7%id, 0.1%wa, 0.1%hi, 0.2%si, 0.0%st
Mem: 4044472k total, 4009232k used, 35240k free, 211580k buffers
Swap: 6094840k total, 8k used, 6094832k free, 3242912k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7159 asterisk 15 0 3452m 99m 8964 S 10.3 2.5 570:23.84 asterisk
7215 asterisk 15 0 113m 29m 1940 S 0.7 0.7 98:05.74 op_server.pl
1761 root 15 0 12740 1076 808 R 0.3 0.0 0:00.55 top
1 root 15 0 10348 632 540 S 0.0 0.0 0:00.69 init
2 root RT -5 0 0 0 S 0.0 0.0 0:00.37 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.34 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
6 root RT -5 0 0 0 S 0.0 0.0 0:00.21 migration/2
7 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/2
8 root RT -5 0 0 0 S 0.0 0.0 0:00.25 migration/3
9 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/3
10 root 10 -5 0 0 0 S 0.0 0.0 1:21.01 events/0
11 root 10 -5 0 0 0 S 0.0 0.0 0:02.79 events/1
12 root 10 -5 0 0 0 S 0.0 0.0 0:02.96 events/2
13 root 10 -5 0 0 0 S 0.0 0.0 0:02.88 events/3
14 root 12 -5 0 0 0 S 0.0 0.0 0:00.01 khelper
Отображение статистики использования памяти, включая дополнительную информацию о процессах, пейджинговая связь, блок ввода/вывода, ловушки:
vmstat
vmstat -s
Команда для вывода информации об установленной оперативной памяти и ее скорости, храняющуюся в BIOS'е:
dmidecode --type memory
# dmidecode 2.10
SMBIOS 2.5 present.
Handle 0x0016, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 64 GB
Error Information Handle: Not Provided
Number Of Devices: 8
Handle 0x0017, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0016
Error Information Handle: No Error
Total Width: 72 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: 1
Locator: DIMM1A
Bank Locator: Bank1
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: 0000
Serial Number: 00000000
Asset Tag: Not Specified
Part Number:
Handle 0x0018, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0016
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: 1
Locator: DIMM1B
Bank Locator: Bank1
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer:
Serial Number:
Asset Tag: Not Specified
Part Number:
Handle 0x0019, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0016
Error Information Handle: No Error
Total Width: 72 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: 1
Locator: DIMM2A
Bank Locator: Bank2
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: 0000
Serial Number: 00000000
Asset Tag: Not Specified
Part Number:
Handle 0x001A, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0016
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: 1
Locator: DIMM2B
Bank Locator: Bank2
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer:
Serial Number:
Asset Tag: Not Specified
Part Number:
Handle 0x001B, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0016
Error Information Handle: No Error
Total Width: 72 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: 1
Locator: DIMM3A
Bank Locator: Bank3
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: 0000
Serial Number: 00000000
Asset Tag: Not Specified
Part Number:
Handle 0x001C, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0016
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: 1
Locator: DIMM3B
Bank Locator: Bank3
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer:
Serial Number:
Asset Tag: Not Specified
Part Number:
Handle 0x001D, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0016
Error Information Handle: No Error
Total Width: 72 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: 1
Locator: DIMM4A
Bank Locator: Bank4
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: 0000
Serial Number: 00000000
Asset Tag: Not Specified
Part Number:
Handle 0x001E, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0016
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: 1
Locator: DIMM4B
Bank Locator: Bank4
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer:
Serial Number:
Asset Tag: Not Specified
Part Number:
Все коды для ключа --type:
# Type Short Description
0 BIOS
1 System
2 Base Board
3 Chassis
4 Processor
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9 System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply
Просмотр общей памяти:
grep MemTotal /proc/meminfo
MemTotal: 515340 kB
Просмотр swap памяти:
grep SwapTotal /proc/meminfo
SwapTotal: 1048568 kB
Просмотр модели процессора:
grep "model name" /proc/cpuinfo
model name : Intel(R) Core(TM)2 Quad CPU Q8300 @ 2.50GHz
Просмотр дистрибутива и версии Linux:
cat /etc/issue
CentOS release 5.4 (Final)
Kernel on an m
Просмотр версии ядра Linux:
uname -r
2.6.18-164.el5
Просмотр наличия установки необходимого пакета :
rpm -q make
make-3.81-3.el5
Просмотр имени хоста:
hostname
alfa.alldba.ru
Лимит ресурсов:
ulimit -a
Лимиты для VPS:
cat /proc/user_beancounters
Проверка производительности и нагрузка сайта 100 запросов 5тью потоками
ab -n 100 -c 5 http://localhost/test.html |