{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/comments/56508389","id":56508389,"diff_hunk":"@@ -3026,11 +3031,16 @@ public VmStatsEntry getVmStat(final Connect conn, final String vmName) throws Li\n         try {\n             dm = getDomain(conn, vmName);\n             final DomainInfo info = dm.getInfo();\n+            final MemoryStatistic[] mems = dm.memoryStats(NUMMEMSTATS);      //number of memory statistics required.\n \n             final VmStatsEntry stats = new VmStatsEntry();\n+\n             stats.setNumCPUs(info.nrVirtCpu);\n             stats.setEntityType(\"vm\");\n \n+            stats.setMemoryKBs(info.maxMem);\n+            stats.setTargetMemoryKBs(info.memory);\n+            stats.setIntFreeMemoryKBs((double) mems[0].getValue());","path":"plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java","position":39,"original_position":39,"commit_id":"732a85295dc1dbf06ca784a7c4c2e288ad7cd0d6","original_commit_id":"732a85295dc1dbf06ca784a7c4c2e288ad7cd0d6","user":{"login":"rafaelweingartner","id":4129005,"avatar_url":"https://avatars.githubusercontent.com/u/4129005?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelweingartner","html_url":"https://github.com/rafaelweingartner","followers_url":"https://api.github.com/users/rafaelweingartner/followers","following_url":"https://api.github.com/users/rafaelweingartner/following{/other_user}","gists_url":"https://api.github.com/users/rafaelweingartner/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelweingartner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelweingartner/subscriptions","organizations_url":"https://api.github.com/users/rafaelweingartner/orgs","repos_url":"https://api.github.com/users/rafaelweingartner/repos","events_url":"https://api.github.com/users/rafaelweingartner/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelweingartner/received_events","type":"User","site_admin":false},"body":"the same problem pointed out by @swill at line 3128, may happen here.","created_at":"2016-03-17T14:05:23Z","updated_at":"2016-03-17T14:05:23Z","html_url":"https://github.com/apache/cloudstack/pull/780#discussion_r56508389","pull_request_url":"https://api.github.com/repos/apache/cloudstack/pulls/780","_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments/56508389"},"html":{"href":"https://github.com/apache/cloudstack/pull/780#discussion_r56508389"},"pull_request":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/780"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/780","id":44324293,"html_url":"https://github.com/apache/cloudstack/pull/780","diff_url":"https://github.com/apache/cloudstack/pull/780.diff","patch_url":"https://github.com/apache/cloudstack/pull/780.patch","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/780","number":780,"state":"closed","locked":false,"title":"CLOUDSTACK-8800 : Improved the listVirtualMachines API call to include memory utilization information for a VM","user":{"login":"maneesha-p","id":3909097,"avatar_url":"https://avatars.githubusercontent.com/u/3909097?v=3","gravatar_id":"","url":"https://api.github.com/users/maneesha-p","html_url":"https://github.com/maneesha-p","followers_url":"https://api.github.com/users/maneesha-p/followers","following_url":"https://api.github.com/users/maneesha-p/following{/other_user}","gists_url":"https://api.github.com/users/maneesha-p/gists{/gist_id}","starred_url":"https://api.github.com/users/maneesha-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maneesha-p/subscriptions","organizations_url":"https://api.github.com/users/maneesha-p/orgs","repos_url":"https://api.github.com/users/maneesha-p/repos","events_url":"https://api.github.com/users/maneesha-p/events{/privacy}","received_events_url":"https://api.github.com/users/maneesha-p/received_events","type":"User","site_admin":false},"body":"for xenserver,kvm and for vmware.","created_at":"2015-09-07T06:44:36Z","updated_at":"2016-03-17T14:05:23Z","closed_at":"2016-03-17T08:10:34Z","merged_at":"2016-03-17T08:10:34Z","merge_commit_sha":"c7755756e2dd6933b43c561c9ec04a4bad6cde4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/cloudstack/pulls/780/commits","review_comments_url":"https://api.github.com/repos/apache/cloudstack/pulls/780/comments","review_comment_url":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/780/comments","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/732a85295dc1dbf06ca784a7c4c2e288ad7cd0d6","head":{"label":"maneesha-p:pull-19","ref":"pull-19","sha":"732a85295dc1dbf06ca784a7c4c2e288ad7cd0d6","user":{"login":"maneesha-p","id":3909097,"avatar_url":"https://avatars.githubusercontent.com/u/3909097?v=3","gravatar_id":"","url":"https://api.github.com/users/maneesha-p","html_url":"https://github.com/maneesha-p","followers_url":"https://api.github.com/users/maneesha-p/followers","following_url":"https://api.github.com/users/maneesha-p/following{/other_user}","gists_url":"https://api.github.com/users/maneesha-p/gists{/gist_id}","starred_url":"https://api.github.com/users/maneesha-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maneesha-p/subscriptions","organizations_url":"https://api.github.com/users/maneesha-p/orgs","repos_url":"https://api.github.com/users/maneesha-p/repos","events_url":"https://api.github.com/users/maneesha-p/events{/privacy}","received_events_url":"https://api.github.com/users/maneesha-p/received_events","type":"User","site_admin":false},"repo":{"id":38873841,"name":"cloudstack","full_name":"maneesha-p/cloudstack","owner":{"login":"maneesha-p","id":3909097,"avatar_url":"https://avatars.githubusercontent.com/u/3909097?v=3","gravatar_id":"","url":"https://api.github.com/users/maneesha-p","html_url":"https://github.com/maneesha-p","followers_url":"https://api.github.com/users/maneesha-p/followers","following_url":"https://api.github.com/users/maneesha-p/following{/other_user}","gists_url":"https://api.github.com/users/maneesha-p/gists{/gist_id}","starred_url":"https://api.github.com/users/maneesha-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maneesha-p/subscriptions","organizations_url":"https://api.github.com/users/maneesha-p/orgs","repos_url":"https://api.github.com/users/maneesha-p/repos","events_url":"https://api.github.com/users/maneesha-p/events{/privacy}","received_events_url":"https://api.github.com/users/maneesha-p/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maneesha-p/cloudstack","description":"Mirror of Apache Cloudstack","fork":true,"url":"https://api.github.com/repos/maneesha-p/cloudstack","forks_url":"https://api.github.com/repos/maneesha-p/cloudstack/forks","keys_url":"https://api.github.com/repos/maneesha-p/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maneesha-p/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maneesha-p/cloudstack/teams","hooks_url":"https://api.github.com/repos/maneesha-p/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/maneesha-p/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/maneesha-p/cloudstack/events","assignees_url":"https://api.github.com/repos/maneesha-p/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/maneesha-p/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/maneesha-p/cloudstack/tags","blobs_url":"https://api.github.com/repos/maneesha-p/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maneesha-p/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maneesha-p/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/maneesha-p/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maneesha-p/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/maneesha-p/cloudstack/languages","stargazers_url":"https://api.github.com/repos/maneesha-p/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/maneesha-p/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/maneesha-p/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/maneesha-p/cloudstack/subscription","commits_url":"https://api.github.com/repos/maneesha-p/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/maneesha-p/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/maneesha-p/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/maneesha-p/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/maneesha-p/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/maneesha-p/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maneesha-p/cloudstack/merges","archive_url":"https://api.github.com/repos/maneesha-p/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maneesha-p/cloudstack/downloads","issues_url":"https://api.github.com/repos/maneesha-p/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/maneesha-p/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/maneesha-p/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/maneesha-p/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maneesha-p/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/maneesha-p/cloudstack/releases{/id}","deployments_url":"https://api.github.com/repos/maneesha-p/cloudstack/deployments","created_at":"2015-07-10T09:58:03Z","updated_at":"2015-07-10T09:58:26Z","pushed_at":"2016-03-16T10:51:31Z","git_url":"git://github.com/maneesha-p/cloudstack.git","ssh_url":"git@github.com:maneesha-p/cloudstack.git","clone_url":"https://github.com/maneesha-p/cloudstack.git","svn_url":"https://github.com/maneesha-p/cloudstack","homepage":null,"size":502479,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"63f58dd5785ff2515b087d907bdf686347c75727","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":9759448,"name":"cloudstack","full_name":"apache/cloudstack","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cloudstack","description":"Mirror of Apache Cloudstack","fork":false,"url":"https://api.github.com/repos/apache/cloudstack","forks_url":"https://api.github.com/repos/apache/cloudstack/forks","keys_url":"https://api.github.com/repos/apache/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cloudstack/teams","hooks_url":"https://api.github.com/repos/apache/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/apache/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cloudstack/events","assignees_url":"https://api.github.com/repos/apache/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cloudstack/tags","blobs_url":"https://api.github.com/repos/apache/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cloudstack/languages","stargazers_url":"https://api.github.com/repos/apache/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/apache/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/apache/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/apache/cloudstack/subscription","commits_url":"https://api.github.com/repos/apache/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cloudstack/merges","archive_url":"https://api.github.com/repos/apache/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cloudstack/downloads","issues_url":"https://api.github.com/repos/apache/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/apache/cloudstack/releases{/id}","deployments_url":"https://api.github.com/repos/apache/cloudstack/deployments","created_at":"2013-04-29T22:27:12Z","updated_at":"2016-03-14T12:47:33Z","pushed_at":"2016-03-17T10:38:00Z","git_url":"git://github.com/apache/cloudstack.git","ssh_url":"git@github.com:apache/cloudstack.git","clone_url":"https://github.com/apache/cloudstack.git","svn_url":"https://github.com/apache/cloudstack","homepage":null,"size":513062,"stargazers_count":350,"watchers_count":350,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":464,"mirror_url":"git://git.apache.org/cloudstack.git","open_issues_count":183,"forks":464,"open_issues":183,"watchers":350,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/780"},"html":{"href":"https://github.com/apache/cloudstack/pull/780"},"issue":{"href":"https://api.github.com/repos/apache/cloudstack/issues/780"},"comments":{"href":"https://api.github.com/repos/apache/cloudstack/issues/780/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/780/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/780/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cloudstack/statuses/732a85295dc1dbf06ca784a7c4c2e288ad7cd0d6"}}}}