To check the total memory/swap usage on Linux you can use 'free -m'
root@vps:~# free -m
total used free shared buffers cached
Mem: 1002 809 193 0 47 234
-/+ buffers/cache: 526 476
Swap: 1023 69 954
To check the total memory usage as well as the percentage of memory per process on Linux and FreeBSD, use 'top'
root@vps:~# top
top - 17:21:38 up 47 days, 1:00, 2 users, load average: 0.00, 0.01, 0.05
Tasks: 107 total, 1 running, 106 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.5 us, 0.2 sy, 0.0 ni, 98.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 1026928 total, 825204 used, 201724 free, 49108 buffers
KiB Swap: 1048568 total, 71356 used, 977212 free, 240696 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31221 www-data 20 0 198m 20m 5888 S 2.7 2.0 10:37.84 php5-fpm
2989 mysql 20 0 424m 30m 4464 S 0.3 3.0 47:18.36 mysqld
17089 root 20 0 71260 3716 2900 S 0.3 0.4 0:00.03 sshd
17152 root 20 0 16856 1460 1064 R 0.3 0.1 0:00.03 top
1 root 20 0 10648 672 656 S 0.0 0.1 0:46.38 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
On Windows, use the Task Manager (Ctrl+Shift+Esc) to watch per-process usage (Processes tab) or total memory usage (Performance tab)
0 Opmerkingen