{"action":"closed","issue":{"url":"https://api.github.com/repos/firehol/netdata/issues/4123","repository_url":"https://api.github.com/repos/firehol/netdata","labels_url":"https://api.github.com/repos/firehol/netdata/issues/4123/labels{/name}","comments_url":"https://api.github.com/repos/firehol/netdata/issues/4123/comments","events_url":"https://api.github.com/repos/firehol/netdata/issues/4123/events","html_url":"https://github.com/firehol/netdata/issues/4123","id":357710279,"node_id":"MDU6SXNzdWUzNTc3MTAyNzk=","number":4123,"title":"Swap analysis - enhancement request","user":{"login":"74cmonty","id":12523591,"node_id":"MDQ6VXNlcjEyNTIzNTkx","avatar_url":"https://avatars0.githubusercontent.com/u/12523591?v=4","gravatar_id":"","url":"https://api.github.com/users/74cmonty","html_url":"https://github.com/74cmonty","followers_url":"https://api.github.com/users/74cmonty/followers","following_url":"https://api.github.com/users/74cmonty/following{/other_user}","gists_url":"https://api.github.com/users/74cmonty/gists{/gist_id}","starred_url":"https://api.github.com/users/74cmonty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/74cmonty/subscriptions","organizations_url":"https://api.github.com/users/74cmonty/orgs","repos_url":"https://api.github.com/users/74cmonty/repos","events_url":"https://api.github.com/users/74cmonty/events{/privacy}","received_events_url":"https://api.github.com/users/74cmonty/received_events","type":"User","site_admin":false},"labels":[{"id":43793264,"node_id":"MDU6TGFiZWw0Mzc5MzI2NA==","url":"https://api.github.com/repos/firehol/netdata/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-06T15:29:26Z","updated_at":"2018-09-07T08:02:10Z","closed_at":"2018-09-07T08:02:10Z","author_association":"NONE","body":"Hi,\r\nI have sometimes issues with swapping.\r\nMy understanding is that most critical with regards to swapping is which process is reading in/out of swap.\r\nThe total allocated swap size is of less importance.\r\n\r\nIn order to see which process is allocating memory in swap I use this query (as root) on a server that shows 100% swap allocation:\r\n```\r\nroot@ld4257:~# free -h\r\n              total        used        free      shared  buff/cache   available\r\nMem:            62G         10G        400M        145M         51G         51G\r\nSwap:          8,0G        8,0G          0B\r\n\r\nroot@ld4257:~# (echo \"COMM PID SWAP\"; for file in /proc/*/status ; do awk '/^Pid|VmSwap|Name/{printf $2 \" \" $3}END{ print \"\"}' $file; done | grep kB | grep -wv \"0 kB\" | sort -k 3 -n -r) | column -t | head -20\r\nCOMM             PID           SWAP\r\nkvm              2764201       1451548  kB\r\nkvm              3825563       529548   kB\r\nkvm              3436825       443928   kB\r\npvedaemon        2040775       93332    kB\r\npvedaemon        worke588021   78192    kB\r\npvedaemon        worke601705   77936    kB\r\npvedaemon        worke594032   76580    kB\r\npve-ha-crm       2986637       67708    kB\r\npve-ha-lrm       2986565       56468    kB\r\nceph-osd         1900720       41084    kB\r\nceph-osd         1900723       40508    kB\r\npvestatd         3118          38248    kB\r\npve-firewall     3119          36948    kB\r\nceph-mgr         1902937       22496    kB\r\nceph-mon         1900649       6580     kB\r\npmxcfs           2040721       3000     kB\r\ninfluxd          3166611       1008     kB\r\nfail2ban-server  2695          992      kB\r\nsssd_ssh         1878          836      kB\r\n\r\n```\r\n\r\nCan you consider to enhance the monitoring functionality with something similar?\r\n\r\nTHX"}}
{"actor":{"display_login":"74cmonty"}}