{"action":"created","comment":{"url":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/comments/130872327","pull_request_review_id":53791693,"id":130872327,"diff_hunk":"@@ -217,6 +217,36 @@ def get_partitions(disk_name):\n     else:\n         return l, None\n \n+def get_os_partition_stats():\n+    ret_list = []\n+    try:\n+        lines, err = command.get_command_output('df -HT --exclude-type=devtmpfs --exclude-type=tmpfs --exclude-type=zfs')\n+        if err:\n+            raise Exception(err)\n+        #print lines, err\n+        num=0\n+        ret_list = []\n+        for line in lines:\n+            if num == 0:\n+                num += 1\n+                continue\n+            components = line.split()\n+            tmp_dict = {}\n+            #print components\n+            percentage_str = components[5]\n+            percentage_pos = percentage_str.find('%')\n+            percentage = int(percentage_str[:percentage_pos])\n+            tmp_dict['percentage_free_str'] = percentage\n+            tmp_dict['percentage_free'] = percentage","path":"site-packages/integralstor_utils/disks.py","position":24,"original_position":24,"commit_id":"43c3eb2660700559ae390344560318284c92b9c3","original_commit_id":"43c3eb2660700559ae390344560318284c92b9c3","user":{"login":"six-k","id":21103199,"avatar_url":"https://avatars3.githubusercontent.com/u/21103199?v=4","gravatar_id":"","url":"https://api.github.com/users/six-k","html_url":"https://github.com/six-k","followers_url":"https://api.github.com/users/six-k/followers","following_url":"https://api.github.com/users/six-k/following{/other_user}","gists_url":"https://api.github.com/users/six-k/gists{/gist_id}","starred_url":"https://api.github.com/users/six-k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/six-k/subscriptions","organizations_url":"https://api.github.com/users/six-k/orgs","repos_url":"https://api.github.com/users/six-k/repos","events_url":"https://api.github.com/users/six-k/events{/privacy}","received_events_url":"https://api.github.com/users/six-k/received_events","type":"User","site_admin":false},"body":"`df` returns the **used** percentage. So, we will have to either subtract from 100 or retain it as 'used' instead of 'percentage_free'.","created_at":"2017-08-02T13:16:29Z","updated_at":"2017-08-02T13:20:12Z","html_url":"https://github.com/integralstor/integralstor_utils/pull/55#discussion_r130872327","pull_request_url":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/comments/130872327"},"html":{"href":"https://github.com/integralstor/integralstor_utils/pull/55#discussion_r130872327"},"pull_request":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/55","id":133677662,"html_url":"https://github.com/integralstor/integralstor_utils/pull/55","diff_url":"https://github.com/integralstor/integralstor_utils/pull/55.diff","patch_url":"https://github.com/integralstor/integralstor_utils/pull/55.patch","issue_url":"https://api.github.com/repos/integralstor/integralstor_utils/issues/55","number":55,"state":"open","locked":false,"title":"Function to get OS disk filesystem usage stats","user":{"login":"fractalram","id":8971167,"avatar_url":"https://avatars2.githubusercontent.com/u/8971167?v=4","gravatar_id":"","url":"https://api.github.com/users/fractalram","html_url":"https://github.com/fractalram","followers_url":"https://api.github.com/users/fractalram/followers","following_url":"https://api.github.com/users/fractalram/following{/other_user}","gists_url":"https://api.github.com/users/fractalram/gists{/gist_id}","starred_url":"https://api.github.com/users/fractalram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fractalram/subscriptions","organizations_url":"https://api.github.com/users/fractalram/orgs","repos_url":"https://api.github.com/users/fractalram/repos","events_url":"https://api.github.com/users/fractalram/events{/privacy}","received_events_url":"https://api.github.com/users/fractalram/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-02T10:51:41Z","updated_at":"2017-08-02T13:20:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9131ec2566a524c4f49af9922f805f01dc7abb65","assignee":{"login":"fractalram","id":8971167,"avatar_url":"https://avatars2.githubusercontent.com/u/8971167?v=4","gravatar_id":"","url":"https://api.github.com/users/fractalram","html_url":"https://github.com/fractalram","followers_url":"https://api.github.com/users/fractalram/followers","following_url":"https://api.github.com/users/fractalram/following{/other_user}","gists_url":"https://api.github.com/users/fractalram/gists{/gist_id}","starred_url":"https://api.github.com/users/fractalram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fractalram/subscriptions","organizations_url":"https://api.github.com/users/fractalram/orgs","repos_url":"https://api.github.com/users/fractalram/repos","events_url":"https://api.github.com/users/fractalram/events{/privacy}","received_events_url":"https://api.github.com/users/fractalram/received_events","type":"User","site_admin":false},"assignees":[{"login":"fractalram","id":8971167,"avatar_url":"https://avatars2.githubusercontent.com/u/8971167?v=4","gravatar_id":"","url":"https://api.github.com/users/fractalram","html_url":"https://github.com/fractalram","followers_url":"https://api.github.com/users/fractalram/followers","following_url":"https://api.github.com/users/fractalram/following{/other_user}","gists_url":"https://api.github.com/users/fractalram/gists{/gist_id}","starred_url":"https://api.github.com/users/fractalram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fractalram/subscriptions","organizations_url":"https://api.github.com/users/fractalram/orgs","repos_url":"https://api.github.com/users/fractalram/repos","events_url":"https://api.github.com/users/fractalram/events{/privacy}","received_events_url":"https://api.github.com/users/fractalram/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/55/commits","review_comments_url":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/55/comments","review_comment_url":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/integralstor/integralstor_utils/issues/55/comments","statuses_url":"https://api.github.com/repos/integralstor/integralstor_utils/statuses/43c3eb2660700559ae390344560318284c92b9c3","head":{"label":"fractalram:master","ref":"master","sha":"43c3eb2660700559ae390344560318284c92b9c3","user":{"login":"fractalram","id":8971167,"avatar_url":"https://avatars2.githubusercontent.com/u/8971167?v=4","gravatar_id":"","url":"https://api.github.com/users/fractalram","html_url":"https://github.com/fractalram","followers_url":"https://api.github.com/users/fractalram/followers","following_url":"https://api.github.com/users/fractalram/following{/other_user}","gists_url":"https://api.github.com/users/fractalram/gists{/gist_id}","starred_url":"https://api.github.com/users/fractalram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fractalram/subscriptions","organizations_url":"https://api.github.com/users/fractalram/orgs","repos_url":"https://api.github.com/users/fractalram/repos","events_url":"https://api.github.com/users/fractalram/events{/privacy}","received_events_url":"https://api.github.com/users/fractalram/received_events","type":"User","site_admin":false},"repo":{"id":88827547,"name":"integralstor_utils","full_name":"fractalram/integralstor_utils","owner":{"login":"fractalram","id":8971167,"avatar_url":"https://avatars2.githubusercontent.com/u/8971167?v=4","gravatar_id":"","url":"https://api.github.com/users/fractalram","html_url":"https://github.com/fractalram","followers_url":"https://api.github.com/users/fractalram/followers","following_url":"https://api.github.com/users/fractalram/following{/other_user}","gists_url":"https://api.github.com/users/fractalram/gists{/gist_id}","starred_url":"https://api.github.com/users/fractalram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fractalram/subscriptions","organizations_url":"https://api.github.com/users/fractalram/orgs","repos_url":"https://api.github.com/users/fractalram/repos","events_url":"https://api.github.com/users/fractalram/events{/privacy}","received_events_url":"https://api.github.com/users/fractalram/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fractalram/integralstor_utils","description":"Modules that will be common across the single node and multi node versions of integralstor","fork":true,"url":"https://api.github.com/repos/fractalram/integralstor_utils","forks_url":"https://api.github.com/repos/fractalram/integralstor_utils/forks","keys_url":"https://api.github.com/repos/fractalram/integralstor_utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fractalram/integralstor_utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fractalram/integralstor_utils/teams","hooks_url":"https://api.github.com/repos/fractalram/integralstor_utils/hooks","issue_events_url":"https://api.github.com/repos/fractalram/integralstor_utils/issues/events{/number}","events_url":"https://api.github.com/repos/fractalram/integralstor_utils/events","assignees_url":"https://api.github.com/repos/fractalram/integralstor_utils/assignees{/user}","branches_url":"https://api.github.com/repos/fractalram/integralstor_utils/branches{/branch}","tags_url":"https://api.github.com/repos/fractalram/integralstor_utils/tags","blobs_url":"https://api.github.com/repos/fractalram/integralstor_utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fractalram/integralstor_utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fractalram/integralstor_utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/fractalram/integralstor_utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fractalram/integralstor_utils/statuses/{sha}","languages_url":"https://api.github.com/repos/fractalram/integralstor_utils/languages","stargazers_url":"https://api.github.com/repos/fractalram/integralstor_utils/stargazers","contributors_url":"https://api.github.com/repos/fractalram/integralstor_utils/contributors","subscribers_url":"https://api.github.com/repos/fractalram/integralstor_utils/subscribers","subscription_url":"https://api.github.com/repos/fractalram/integralstor_utils/subscription","commits_url":"https://api.github.com/repos/fractalram/integralstor_utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/fractalram/integralstor_utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/fractalram/integralstor_utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/fractalram/integralstor_utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/fractalram/integralstor_utils/contents/{+path}","compare_url":"https://api.github.com/repos/fractalram/integralstor_utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fractalram/integralstor_utils/merges","archive_url":"https://api.github.com/repos/fractalram/integralstor_utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fractalram/integralstor_utils/downloads","issues_url":"https://api.github.com/repos/fractalram/integralstor_utils/issues{/number}","pulls_url":"https://api.github.com/repos/fractalram/integralstor_utils/pulls{/number}","milestones_url":"https://api.github.com/repos/fractalram/integralstor_utils/milestones{/number}","notifications_url":"https://api.github.com/repos/fractalram/integralstor_utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fractalram/integralstor_utils/labels{/name}","releases_url":"https://api.github.com/repos/fractalram/integralstor_utils/releases{/id}","deployments_url":"https://api.github.com/repos/fractalram/integralstor_utils/deployments","created_at":"2017-04-20T06:10:22Z","updated_at":"2017-04-20T06:10:23Z","pushed_at":"2017-08-02T10:50:38Z","git_url":"git://github.com/fractalram/integralstor_utils.git","ssh_url":"git@github.com:fractalram/integralstor_utils.git","clone_url":"https://github.com/fractalram/integralstor_utils.git","svn_url":"https://github.com/fractalram/integralstor_utils","homepage":null,"size":486,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"integralstor:master","ref":"master","sha":"c39083636ce0b3810ef058a72b8a617a522f88f8","user":{"login":"integralstor","id":21096471,"avatar_url":"https://avatars0.githubusercontent.com/u/21096471?v=4","gravatar_id":"","url":"https://api.github.com/users/integralstor","html_url":"https://github.com/integralstor","followers_url":"https://api.github.com/users/integralstor/followers","following_url":"https://api.github.com/users/integralstor/following{/other_user}","gists_url":"https://api.github.com/users/integralstor/gists{/gist_id}","starred_url":"https://api.github.com/users/integralstor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/integralstor/subscriptions","organizations_url":"https://api.github.com/users/integralstor/orgs","repos_url":"https://api.github.com/users/integralstor/repos","events_url":"https://api.github.com/users/integralstor/events{/privacy}","received_events_url":"https://api.github.com/users/integralstor/received_events","type":"Organization","site_admin":false},"repo":{"id":35656064,"name":"integralstor_utils","full_name":"integralstor/integralstor_utils","owner":{"login":"integralstor","id":21096471,"avatar_url":"https://avatars0.githubusercontent.com/u/21096471?v=4","gravatar_id":"","url":"https://api.github.com/users/integralstor","html_url":"https://github.com/integralstor","followers_url":"https://api.github.com/users/integralstor/followers","following_url":"https://api.github.com/users/integralstor/following{/other_user}","gists_url":"https://api.github.com/users/integralstor/gists{/gist_id}","starred_url":"https://api.github.com/users/integralstor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/integralstor/subscriptions","organizations_url":"https://api.github.com/users/integralstor/orgs","repos_url":"https://api.github.com/users/integralstor/repos","events_url":"https://api.github.com/users/integralstor/events{/privacy}","received_events_url":"https://api.github.com/users/integralstor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/integralstor/integralstor_utils","description":"Modules that will be common across the single node and multi node versions of integralstor","fork":false,"url":"https://api.github.com/repos/integralstor/integralstor_utils","forks_url":"https://api.github.com/repos/integralstor/integralstor_utils/forks","keys_url":"https://api.github.com/repos/integralstor/integralstor_utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/integralstor/integralstor_utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/integralstor/integralstor_utils/teams","hooks_url":"https://api.github.com/repos/integralstor/integralstor_utils/hooks","issue_events_url":"https://api.github.com/repos/integralstor/integralstor_utils/issues/events{/number}","events_url":"https://api.github.com/repos/integralstor/integralstor_utils/events","assignees_url":"https://api.github.com/repos/integralstor/integralstor_utils/assignees{/user}","branches_url":"https://api.github.com/repos/integralstor/integralstor_utils/branches{/branch}","tags_url":"https://api.github.com/repos/integralstor/integralstor_utils/tags","blobs_url":"https://api.github.com/repos/integralstor/integralstor_utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/integralstor/integralstor_utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/integralstor/integralstor_utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/integralstor/integralstor_utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/integralstor/integralstor_utils/statuses/{sha}","languages_url":"https://api.github.com/repos/integralstor/integralstor_utils/languages","stargazers_url":"https://api.github.com/repos/integralstor/integralstor_utils/stargazers","contributors_url":"https://api.github.com/repos/integralstor/integralstor_utils/contributors","subscribers_url":"https://api.github.com/repos/integralstor/integralstor_utils/subscribers","subscription_url":"https://api.github.com/repos/integralstor/integralstor_utils/subscription","commits_url":"https://api.github.com/repos/integralstor/integralstor_utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/integralstor/integralstor_utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/integralstor/integralstor_utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/integralstor/integralstor_utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/integralstor/integralstor_utils/contents/{+path}","compare_url":"https://api.github.com/repos/integralstor/integralstor_utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/integralstor/integralstor_utils/merges","archive_url":"https://api.github.com/repos/integralstor/integralstor_utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/integralstor/integralstor_utils/downloads","issues_url":"https://api.github.com/repos/integralstor/integralstor_utils/issues{/number}","pulls_url":"https://api.github.com/repos/integralstor/integralstor_utils/pulls{/number}","milestones_url":"https://api.github.com/repos/integralstor/integralstor_utils/milestones{/number}","notifications_url":"https://api.github.com/repos/integralstor/integralstor_utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/integralstor/integralstor_utils/labels{/name}","releases_url":"https://api.github.com/repos/integralstor/integralstor_utils/releases{/id}","deployments_url":"https://api.github.com/repos/integralstor/integralstor_utils/deployments","created_at":"2015-05-15T05:48:51Z","updated_at":"2017-03-27T05:27:19Z","pushed_at":"2017-08-02T10:51:42Z","git_url":"git://github.com/integralstor/integralstor_utils.git","ssh_url":"git@github.com:integralstor/integralstor_utils.git","clone_url":"https://github.com/integralstor/integralstor_utils.git","svn_url":"https://github.com/integralstor/integralstor_utils","homepage":null,"size":487,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/55"},"html":{"href":"https://github.com/integralstor/integralstor_utils/pull/55"},"issue":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/issues/55"},"comments":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/integralstor/integralstor_utils/statuses/43c3eb2660700559ae390344560318284c92b9c3"}}}}
{"actor":{"display_login":"six-k"}}