{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/comments/40299061","id":40299061,"diff_hunk":"@@ -355,20 +383,30 @@ def __init__(self):\n         self.nicNames = []\n         self.readBytes = 0\n         self.writeBytes = 0\n+        self.networkReadBytes = {}\n+        self.networkWriteBytes = {}\n         for nicName, stat in self.nics.iteritems():\n             if nicName != 'lo':\n                 self.nicNames.append(nicName)\n                 self.readBytes = self.readBytes + stat[1] #bytes_recv\n                 self.writeBytes = self.writeBytes + stat[0] #bytes_sent\n+                self.networkReadBytes[nicName] = stat[1]\n+                self.networkWriteBytes[nicName] = stat[0]\n \n     def getAdapterIds(self):\n         return self.nicNames\n \n-    def getNetworkReadBytes(self):\n-        return self.readBytes\n+    def getNetworkReadBytes(self, adapterId):\n+\tif adapterId in self.networkReadBytes :","path":"AzureEnhancedMonitor/ext/aem.py","position":94,"original_position":94,"commit_id":"9c6a3071c77bf8b352733f9514419a4b4540aa09","original_commit_id":"9c6a3071c77bf8b352733f9514419a4b4540aa09","user":{"login":"yuezh","id":6800404,"avatar_url":"https://avatars.githubusercontent.com/u/6800404?v=3","gravatar_id":"","url":"https://api.github.com/users/yuezh","html_url":"https://github.com/yuezh","followers_url":"https://api.github.com/users/yuezh/followers","following_url":"https://api.github.com/users/yuezh/following{/other_user}","gists_url":"https://api.github.com/users/yuezh/gists{/gist_id}","starred_url":"https://api.github.com/users/yuezh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuezh/subscriptions","organizations_url":"https://api.github.com/users/yuezh/orgs","repos_url":"https://api.github.com/users/yuezh/repos","events_url":"https://api.github.com/users/yuezh/events{/privacy}","received_events_url":"https://api.github.com/users/yuezh/received_events","type":"User","site_admin":false},"body":"Indenting issue. Please expand tab into 4 spaces.","created_at":"2015-09-24T09:13:02Z","updated_at":"2015-09-24T09:13:02Z","html_url":"https://github.com/Azure/azure-linux-extensions/pull/40#discussion_r40299061","pull_request_url":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/comments/40299061"},"html":{"href":"https://github.com/Azure/azure-linux-extensions/pull/40#discussion_r40299061"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/40","id":45864958,"html_url":"https://github.com/Azure/azure-linux-extensions/pull/40","diff_url":"https://github.com/Azure/azure-linux-extensions/pull/40.diff","patch_url":"https://github.com/Azure/azure-linux-extensions/pull/40.patch","issue_url":"https://api.github.com/repos/Azure/azure-linux-extensions/issues/40","number":40,"state":"open","locked":false,"title":"AzureEnhancedMonitor V2","user":{"login":"v-zhongz","id":13326941,"avatar_url":"https://avatars.githubusercontent.com/u/13326941?v=3","gravatar_id":"","url":"https://api.github.com/users/v-zhongz","html_url":"https://github.com/v-zhongz","followers_url":"https://api.github.com/users/v-zhongz/followers","following_url":"https://api.github.com/users/v-zhongz/following{/other_user}","gists_url":"https://api.github.com/users/v-zhongz/gists{/gist_id}","starred_url":"https://api.github.com/users/v-zhongz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v-zhongz/subscriptions","organizations_url":"https://api.github.com/users/v-zhongz/orgs","repos_url":"https://api.github.com/users/v-zhongz/repos","events_url":"https://api.github.com/users/v-zhongz/events{/privacy}","received_events_url":"https://api.github.com/users/v-zhongz/received_events","type":"User","site_admin":false},"body":"1.\tSwitch to LinuxDiagnostic extension version 2.0\r\n-Switched.\r\n\r\n2.\tAdd support for table endpoint, pass table endpoint to LinuxDiagnostic extension as param.\r\n-Updated the node js script.\r\n\r\na.\tAdd/modify perf counters, for details, see the email thread bellow\r\n-Extension status has been displayed on Azure Portal. And It is checked by Handler, if just check it in PrefCounters, you can't judge whether it is dead status or not. So I don't think it should be write in PrefCounters.\r\n\r\nb.\tAdd an perf counter(\\config\\errors) for error code\r\n-Added. By record the latest error in disk.\r\n\r\nc.\t\\network({0})\\Network Read Bytes and \\network({0})\\Network Write Bytes are reported per NIC instance. Network adapter must be of Ethernet type, other NICs are filtered out.\r\nBefore the counters were cumulative values (sum) for all NICs.\r\n-For each AdapterId, Network Read/Write Bytes are given.\r\n\r\nd.\tNIC instance counters \\network({0})\\Minimum Network Bandwidth and \\network({0})\\Maximum Network Bandwidth are removed, and replaced by counters for VM bandwidth:\r\n\\network\\VM Minimum Network Bandwidth and \\network\\VM Maximum Network Bandwidth\r\n-Return hardcoded value is 1000 Mbit/s.\r\n","created_at":"2015-09-24T06:59:35Z","updated_at":"2015-09-24T09:13:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea2aea6ec78a8f7f18acc9e975103dedf5653b1f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/40/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/40/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-linux-extensions/issues/40/comments","statuses_url":"https://api.github.com/repos/Azure/azure-linux-extensions/statuses/9c6a3071c77bf8b352733f9514419a4b4540aa09","head":{"label":"v-zhongz:master","ref":"master","sha":"9c6a3071c77bf8b352733f9514419a4b4540aa09","user":{"login":"v-zhongz","id":13326941,"avatar_url":"https://avatars.githubusercontent.com/u/13326941?v=3","gravatar_id":"","url":"https://api.github.com/users/v-zhongz","html_url":"https://github.com/v-zhongz","followers_url":"https://api.github.com/users/v-zhongz/followers","following_url":"https://api.github.com/users/v-zhongz/following{/other_user}","gists_url":"https://api.github.com/users/v-zhongz/gists{/gist_id}","starred_url":"https://api.github.com/users/v-zhongz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v-zhongz/subscriptions","organizations_url":"https://api.github.com/users/v-zhongz/orgs","repos_url":"https://api.github.com/users/v-zhongz/repos","events_url":"https://api.github.com/users/v-zhongz/events{/privacy}","received_events_url":"https://api.github.com/users/v-zhongz/received_events","type":"User","site_admin":false},"repo":{"id":42704637,"name":"azure-linux-extensions","full_name":"v-zhongz/azure-linux-extensions","owner":{"login":"v-zhongz","id":13326941,"avatar_url":"https://avatars.githubusercontent.com/u/13326941?v=3","gravatar_id":"","url":"https://api.github.com/users/v-zhongz","html_url":"https://github.com/v-zhongz","followers_url":"https://api.github.com/users/v-zhongz/followers","following_url":"https://api.github.com/users/v-zhongz/following{/other_user}","gists_url":"https://api.github.com/users/v-zhongz/gists{/gist_id}","starred_url":"https://api.github.com/users/v-zhongz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v-zhongz/subscriptions","organizations_url":"https://api.github.com/users/v-zhongz/orgs","repos_url":"https://api.github.com/users/v-zhongz/repos","events_url":"https://api.github.com/users/v-zhongz/events{/privacy}","received_events_url":"https://api.github.com/users/v-zhongz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/v-zhongz/azure-linux-extensions","description":"","fork":true,"url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions","forks_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/forks","keys_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/teams","hooks_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/hooks","issue_events_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/events","assignees_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/tags","blobs_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/languages","stargazers_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/stargazers","contributors_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/contributors","subscribers_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/subscribers","subscription_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/subscription","commits_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/merges","archive_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/downloads","issues_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/labels{/name}","releases_url":"https://api.github.com/repos/v-zhongz/azure-linux-extensions/releases{/id}","created_at":"2015-09-18T06:48:23Z","updated_at":"2015-09-18T06:48:25Z","pushed_at":"2015-09-24T07:36:17Z","git_url":"git://github.com/v-zhongz/azure-linux-extensions.git","ssh_url":"git@github.com:v-zhongz/azure-linux-extensions.git","clone_url":"https://github.com/v-zhongz/azure-linux-extensions.git","svn_url":"https://github.com/v-zhongz/azure-linux-extensions","homepage":null,"size":87108,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"Azure:master","ref":"master","sha":"1721b3704043464b9e25402532eb59132beeedef","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":19841123,"name":"azure-linux-extensions","full_name":"Azure/azure-linux-extensions","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-linux-extensions","description":"","fork":false,"url":"https://api.github.com/repos/Azure/azure-linux-extensions","forks_url":"https://api.github.com/repos/Azure/azure-linux-extensions/forks","keys_url":"https://api.github.com/repos/Azure/azure-linux-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-linux-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-linux-extensions/teams","hooks_url":"https://api.github.com/repos/Azure/azure-linux-extensions/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-linux-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-linux-extensions/events","assignees_url":"https://api.github.com/repos/Azure/azure-linux-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-linux-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-linux-extensions/tags","blobs_url":"https://api.github.com/repos/Azure/azure-linux-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-linux-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-linux-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-linux-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-linux-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-linux-extensions/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-linux-extensions/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-linux-extensions/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-linux-extensions/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-linux-extensions/subscription","commits_url":"https://api.github.com/repos/Azure/azure-linux-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-linux-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-linux-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-linux-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-linux-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-linux-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-linux-extensions/merges","archive_url":"https://api.github.com/repos/Azure/azure-linux-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-linux-extensions/downloads","issues_url":"https://api.github.com/repos/Azure/azure-linux-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-linux-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-linux-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-linux-extensions/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-linux-extensions/releases{/id}","created_at":"2014-05-16T01:38:49Z","updated_at":"2015-09-13T20:16:51Z","pushed_at":"2015-09-24T07:36:18Z","git_url":"git://github.com/Azure/azure-linux-extensions.git","ssh_url":"git@github.com:Azure/azure-linux-extensions.git","clone_url":"https://github.com/Azure/azure-linux-extensions.git","svn_url":"https://github.com/Azure/azure-linux-extensions","homepage":null,"size":87726,"stargazers_count":21,"watchers_count":21,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":5,"forks":17,"open_issues":5,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/40"},"html":{"href":"https://github.com/Azure/azure-linux-extensions/pull/40"},"issue":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/issues/40"},"comments":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-linux-extensions/statuses/9c6a3071c77bf8b352733f9514419a4b4540aa09"}}}}