본문 바로가기
운영체제/리눅스

Linux / FreeBSD 실 메모리 용량 체크

by 반화넬 2017. 12. 26.
반응형

<리눅스>
[root@localhost ~]# free
             total       used       free     shared    buffers     cached
Mem:       2071868    1997328      74540          0     159112     929580
-/+ buffers/cache:     908636    1163232
Swap:      1052216          0    1052216

[root@localhost ~]# grep 'MemTotal:' /proc/meminfo
MemTotal:      2071868 kB

[root@localhost ~]# top
top - 11:27:49 up 1 day,  3:26,  5 users,  load average: 0.33, 0.29, 0.16
Tasks: 166 total,   1 running, 164 sleeping,   0 stopped,   1 zombie
Cpu(s):  4.5%us,  1.6%sy,  0.0%ni, 93.7%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2071868k total,  2007772k used,    64096k free,   159608k buffers
Swap:  1052216k total,        0k used,  1052216k free,   929824k cached



<FreeBSD>

# sysctl hw.physmem
hw.physmem = 536473600

# vmstat
 procs     memory      page                          faults      cpu
 r  b w    avm    fre  flt  re  pi  po  fr  sr  w0   in   sy  cs us sy  id
 2  3 0 261960 336540 2133 273 558   0   0   0 219 1357 1367 414 20 79   1

# cpu 정보
sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'

# 메모리
sysctl hw.realmem


반응형