{"action":"closed","issue":{"url":"https://api.github.com/repos/giampaolo/psutil/issues/685","repository_url":"https://api.github.com/repos/giampaolo/psutil","labels_url":"https://api.github.com/repos/giampaolo/psutil/issues/685/labels{/name}","comments_url":"https://api.github.com/repos/giampaolo/psutil/issues/685/comments","events_url":"https://api.github.com/repos/giampaolo/psutil/issues/685/events","html_url":"https://github.com/giampaolo/psutil/issues/685","id":107655340,"number":685,"title":"virtual_memory() gives highly inaccurate results","user":{"login":"coderforlife","id":1537688,"avatar_url":"https://avatars.githubusercontent.com/u/1537688?v=3","gravatar_id":"","url":"https://api.github.com/users/coderforlife","html_url":"https://github.com/coderforlife","followers_url":"https://api.github.com/users/coderforlife/followers","following_url":"https://api.github.com/users/coderforlife/following{/other_user}","gists_url":"https://api.github.com/users/coderforlife/gists{/gist_id}","starred_url":"https://api.github.com/users/coderforlife/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coderforlife/subscriptions","organizations_url":"https://api.github.com/users/coderforlife/orgs","repos_url":"https://api.github.com/users/coderforlife/repos","events_url":"https://api.github.com/users/coderforlife/events{/privacy}","received_events_url":"https://api.github.com/users/coderforlife/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/giampaolo/psutil/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/giampaolo/psutil/labels/OpSys-Linux","name":"OpSys-Linux","color":"FFFFFF"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-22T06:43:56Z","updated_at":"2016-02-29T12:11:11Z","closed_at":"2016-02-29T12:11:11Z","body":"These commands were done right after each other:\r\n\r\n    In [1]: import psutil\r\n\r\n    In [2]: psutil.virtual_memory()\r\n    Out[2]: svmem(total=50468696064L, available=4217393152L, percent=91.6, used=50133450752L, free=335245312L, active=2109054976, inactive=2236395520, buffers=372736L, cached=3881775104)\r\n\r\n    In [3]: !free\r\n                  total        used        free      shared  buff/cache   available\r\n    Mem:       49285836     1006960      327452       33552    47951424    47819748\r\n    Swap:      16777212       21152    16756060\r\n\r\nfree reports KiB and psutil gives bytes. After considering that, total is spot on and free is very close. The others are not though:\r\n * buff/cache is 8% of what it should be\r\n * used is 48x what is should be\r\n * available is 8% of what is should be\r\n\r\nOverall it makes it look like I have only 4 GiB free when I should have ~46GB free.\r\n\r\nMachine info:\r\n * Python v2.7.5\r\n * psutil v3.2.1 (latest on PIP)\r\n * CentOS Linux release 7.1.1503 (Core)\r\n * Linux Kernel 3.10.0-229.7.2.el7.x86_64 SMP\r\n * RAM: 47.00 GB\r\n * CPU(s): 24x Intel(R) Xeon(R) CPU           X5690  @ 3.47GHz\r\n\r\n\r\n"}}