0

Free Shows:

free -m
              total        used        free      shared  buff/cache   available
Mem:          32130       22377        9553          48         200        9368
Swap:          8191         465        7726

But ps aux shows in the RSS Column(I didn't include 0's). It only adds up to 6325. Does free know something PS doesn't?

0.0859375 MB        /sbin/iscsid
0.550781 MB     /usr/sbin/watchdog-mux
0.617188 MB     (sd-pam)
0.667969 MB     sleep
0.777344 MB     sort
0.910156 MB     awk
1.52734 MB      /usr/bin/lxcfs
1.5625 MB       /sbin/agetty
1.67188 MB      /sbin/lvmetad
1.87891 MB      /usr/sbin/pvefw-logger
2.39062 MB      /bin/bash
2.48828 MB      /usr/sbin/rsyslogd
2.55469 MB      /usr/sbin/cron
2.57031 MB      /usr/bin/rrdcached
2.76562 MB      /lib/systemd/systemd-udevd
2.875 MB        /usr/lib/x86_64-linux-gnu/lxc/lxc-monitord
2.98047 MB      /sbin/rpcbind
3.16016 MB      pvedaemon
3.21094 MB      /usr/lib/postfix/sbin/master
3.23047 MB      pveproxy
3.28516 MB      ps
3.32422 MB      /usr/bin/dbus-daemon
3.53125 MB      /lib/systemd/systemd-timesyncd
3.58203 MB      /usr/sbin/smartd
3.85547 MB      /usr/sbin/rpc.mountd
4.32422 MB      /lib/systemd/systemd-logind
4.82422 MB      /sbin/iscsid
5.33203 MB      /usr/sbin/sshd
5.59375 MB      qmgr
5.60547 MB      /lib/systemd/systemd
5.9375 MB       /lib/systemd/systemd-journald
6.41406 MB      pickup
6.6875 MB       /sbin/init
6.70703 MB      sshd:
9.11328 MB      pve-ha-crm
13.3555 MB      pve-ha-lrm
16.6328 MB      -bash
17.0898 MB      /sbin/dmeventd
23.6094 MB      pve-firewall
28.7695 MB      task
32.1758 MB      pvestatd
35.6953 MB      pvedaemon
36.2188 MB      pvedaemon
37.9297 MB      pvedaemon
41.3477 MB      pveproxy
42.7656 MB      pveproxy
46.2617 MB      pveproxy
56.0391 MB      /usr/bin/pmxcfs
66.5078 MB      spiceproxy
71.3086 MB      spiceproxy
83.8711 MB      /usr/bin/perl
5586.38 MB      /usr/bin/kvm

EDIT: I should note, not sure if it matters but the is Proxmox(A debian distro). You can see the largest memory user is a VM. Also this usage spiked after a large rsync over NFS. Could that have anything to do with it?

hemlock
  • 73
  • 1
    Taken from the man page for ps "The SIZE and RSS fields don't count some parts of a process including the page tables, kernel stack, struct thread_info, and struct task_struct.This is usually at least 20 KiB of memory that is always resident. SIZE is the virtual size of the process (code+data+stack)." This doesn't account for the difference though. Can you run the following and see what it returns? : ps aux | awk '{ cnt+=$6 } END { print cnt }' – Raman Sailopal Jul 29 '17 at 19:29
  • @Raman Sailopal - the result is 6364632 – hemlock Jul 29 '17 at 23:53

1 Answers1

0

the RSS is the Non Swapable amount of memory it doesn't count for free Memory.this is a part of used memory. And dont forget the VSZ column witch gives you the amount of memory occupied by the process.