Hi i'm in trouble
On my LXC containter
free, give me
free
total used free shared buff/cache available
Mem: 8388608 219568 7360020 456368 809020 8169040
Swap: 12582912 1271816 11311096
That mean 1.2Go Swap..
But smem give me
smem
PID User Command Swap USS PSS RSS
160 root /sbin/agetty --noclear --ke 92 8 23 516
163 root /sbin/agetty --noclear --ke 88 8 24 536
121 root /usr/sbin/cron -f 196 116 145 832
655 root /usr/lib/postfix/sbin/maste 656 132 176 872
2926 centreon (sd-pam) 1576 4 204 1384
192 redis /usr/bin/redis-server 127.0 900 228 270 836
657 postfix qmgr -l -t unix -u 616 220 385 1272
154 root /usr/sbin/sshd -D 620 184 500 2316
2920 centreon /lib/systemd/systemd --user 712 84 523 2856
26214 root tail -f -n0 /var/log/auth.l 0 404 629 2052
26215 root /bin/bash /opt/open-dsi/aut 0 152 638 2552
26210 root /bin/bash /opt/open-dsi/aut 0 136 716 2980
274 root /usr/sbin/apache2 -k start 1556 60 765 3264
21352 postfix tlsmgr -l -t unix -u -c 572 624 831 1796
128 messagebus /usr/bin/dbus-daemon --syst 1040 824 945 2076
26209 root SCREEN -S authprotect -d -m 0 908 1051 2160
3463 root (sd-pam) 1272 1008 1216 2412
109 root /usr/sbin/nscd 988 1092 1249 2316
3451 root /lib/systemd/systemd --user 0 784 1255 3604
11584 root /bin/bash 0 664 1290 3728
114 root /usr/sbin/rsyslogd -n 280 1476 1526 2264
293 www-data /usr/sbin/apache2 -k start 2096 2888 3826 6744
294 www-data /usr/sbin/apache2 -k start 2100 2896 3832 6748
9567 postfix pickup -l -t unix -u -c 0 3484 4428 6948
124 root /lib/systemd/systemd-logind 404 8112 8455 10540
13056 root /usr/bin/python /usr/bin/sm 0 8864 9169 11056
1 root /sbin/init 324 8512 9174 11952
155 Debian-snmp /usr/sbin/snmpd -Lsd -Lf /d 28100 11260 11392 12480
19367 www-data php-fpm: pool www 616 5724 12462 23988
19366 www-data php-fpm: pool www 616 6280 12900 24308
19365 root php-fpm: master process (/e 616 23064 27671 38560
503 mysql /usr/sbin/mysqld 229792 66732 66906 68016
43 root /lib/systemd/systemd-journa 308 28000 124559 226036
and
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done
nscd 996 kB
rsyslogd 340 kB
bash 0 kB
cron 196 kB
systemd-logind 476 kB
dbus-daemon 1040 kB
sshd 620 kB
snmpd 28100 kB
agetty 92 kB
agetty 88 kB
redis-server 900 kB
php-fpm7.0 0 kB
php-fpm7.0 0 kB
php-fpm7.0 0 kB
systemd 324 kB
tlsmgr 572 kB
screen 0 kB
authprotect.sh 0 kB
tail 0 kB
authprotect.sh 0 kB
apache2 1296 kB
systemd 712 kB
(sd-pam) 1576 kB
apache2 1916 kB
apache2 1904 kB
systemd 0 kB
(sd-pam) 1272 kB
systemd-journal 304 kB
mysqld 230392 kB
master 656 kB
qmgr 616 kB
pickup 0 kB
awk 0 kB
awk 0 kB
And a script give me :
PID=1 swapped 324 KB (systemd)
PID=43 swapped 304 KB (systemd-journal)
PID=109 swapped 996 KB (nscd)
PID=114 swapped 340 KB (rsyslogd)
PID=121 swapped 196 KB (cron)
PID=124 swapped 476 KB (systemd-logind)
PID=128 swapped 1040 KB (dbus-daemon)
PID=154 swapped 620 KB (sshd)
PID=155 swapped 28100 KB (snmpd)
PID=160 swapped 92 KB (agetty)
PID=163 swapped 88 KB (agetty)
PID=192 swapped 900 KB (redis-server)
PID=274 swapped 1296 KB (apache2)
PID=293 swapped 1916 KB (apache2)
PID=294 swapped 1904 KB (apache2)
PID=503 swapped 230392 KB (mysqld)
PID=655 swapped 656 KB (master)
PID=657 swapped 616 KB (qmgr)
PID=2920 swapped 712 KB (systemd)
PID=2926 swapped 1576 KB ((sd-pam))
PID=3463 swapped 1272 KB ((sd-pam))
PID=21352 swapped 572 KB (tlsmgr)
Overall swap used: 274388 KB
Where is the 1.2Go of swap ?
I have a lot of containers...
My Proxmox said 20go of swap but smem and other script said 5go swap.
On my LXC containter
free, give me
free
total used free shared buff/cache available
Mem: 8388608 219568 7360020 456368 809020 8169040
Swap: 12582912 1271816 11311096
That mean 1.2Go Swap..
But smem give me
smem
PID User Command Swap USS PSS RSS
160 root /sbin/agetty --noclear --ke 92 8 23 516
163 root /sbin/agetty --noclear --ke 88 8 24 536
121 root /usr/sbin/cron -f 196 116 145 832
655 root /usr/lib/postfix/sbin/maste 656 132 176 872
2926 centreon (sd-pam) 1576 4 204 1384
192 redis /usr/bin/redis-server 127.0 900 228 270 836
657 postfix qmgr -l -t unix -u 616 220 385 1272
154 root /usr/sbin/sshd -D 620 184 500 2316
2920 centreon /lib/systemd/systemd --user 712 84 523 2856
26214 root tail -f -n0 /var/log/auth.l 0 404 629 2052
26215 root /bin/bash /opt/open-dsi/aut 0 152 638 2552
26210 root /bin/bash /opt/open-dsi/aut 0 136 716 2980
274 root /usr/sbin/apache2 -k start 1556 60 765 3264
21352 postfix tlsmgr -l -t unix -u -c 572 624 831 1796
128 messagebus /usr/bin/dbus-daemon --syst 1040 824 945 2076
26209 root SCREEN -S authprotect -d -m 0 908 1051 2160
3463 root (sd-pam) 1272 1008 1216 2412
109 root /usr/sbin/nscd 988 1092 1249 2316
3451 root /lib/systemd/systemd --user 0 784 1255 3604
11584 root /bin/bash 0 664 1290 3728
114 root /usr/sbin/rsyslogd -n 280 1476 1526 2264
293 www-data /usr/sbin/apache2 -k start 2096 2888 3826 6744
294 www-data /usr/sbin/apache2 -k start 2100 2896 3832 6748
9567 postfix pickup -l -t unix -u -c 0 3484 4428 6948
124 root /lib/systemd/systemd-logind 404 8112 8455 10540
13056 root /usr/bin/python /usr/bin/sm 0 8864 9169 11056
1 root /sbin/init 324 8512 9174 11952
155 Debian-snmp /usr/sbin/snmpd -Lsd -Lf /d 28100 11260 11392 12480
19367 www-data php-fpm: pool www 616 5724 12462 23988
19366 www-data php-fpm: pool www 616 6280 12900 24308
19365 root php-fpm: master process (/e 616 23064 27671 38560
503 mysql /usr/sbin/mysqld 229792 66732 66906 68016
43 root /lib/systemd/systemd-journa 308 28000 124559 226036
and
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done
nscd 996 kB
rsyslogd 340 kB
bash 0 kB
cron 196 kB
systemd-logind 476 kB
dbus-daemon 1040 kB
sshd 620 kB
snmpd 28100 kB
agetty 92 kB
agetty 88 kB
redis-server 900 kB
php-fpm7.0 0 kB
php-fpm7.0 0 kB
php-fpm7.0 0 kB
systemd 324 kB
tlsmgr 572 kB
screen 0 kB
authprotect.sh 0 kB
tail 0 kB
authprotect.sh 0 kB
apache2 1296 kB
systemd 712 kB
(sd-pam) 1576 kB
apache2 1916 kB
apache2 1904 kB
systemd 0 kB
(sd-pam) 1272 kB
systemd-journal 304 kB
mysqld 230392 kB
master 656 kB
qmgr 616 kB
pickup 0 kB
awk 0 kB
awk 0 kB
And a script give me :
PID=1 swapped 324 KB (systemd)
PID=43 swapped 304 KB (systemd-journal)
PID=109 swapped 996 KB (nscd)
PID=114 swapped 340 KB (rsyslogd)
PID=121 swapped 196 KB (cron)
PID=124 swapped 476 KB (systemd-logind)
PID=128 swapped 1040 KB (dbus-daemon)
PID=154 swapped 620 KB (sshd)
PID=155 swapped 28100 KB (snmpd)
PID=160 swapped 92 KB (agetty)
PID=163 swapped 88 KB (agetty)
PID=192 swapped 900 KB (redis-server)
PID=274 swapped 1296 KB (apache2)
PID=293 swapped 1916 KB (apache2)
PID=294 swapped 1904 KB (apache2)
PID=503 swapped 230392 KB (mysqld)
PID=655 swapped 656 KB (master)
PID=657 swapped 616 KB (qmgr)
PID=2920 swapped 712 KB (systemd)
PID=2926 swapped 1576 KB ((sd-pam))
PID=3463 swapped 1272 KB ((sd-pam))
PID=21352 swapped 572 KB (tlsmgr)
Overall swap used: 274388 KB
Where is the 1.2Go of swap ?
I have a lot of containers...
My Proxmox said 20go of swap but smem and other script said 5go swap.