{"id":4762,"date":"2022-05-06T13:11:32","date_gmt":"2022-05-06T11:11:32","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=4762"},"modified":"2022-05-24T14:17:11","modified_gmt":"2022-05-24T12:17:11","slug":"free-space-for-linux-and-windows-servers","status":"publish","type":"post","link":"http:\/\/contoso.se\/blog\/?p=4762","title":{"rendered":"% Free Space for Linux and Windows servers"},"content":{"rendered":"\n<p>In the <a href=\"http:\/\/contoso.se\/blog\/?p=4753\" data-type=\"post\" data-id=\"4753\">workbook published yesterday<\/a> we used one graph for %Used Space from Linux servers, and one graph for %Free Space from Windows servers. But for some scenarios you might want to show disk space from both server types in the same graph. The following query convert Linux %Used Space to %Free Space, so they can be visualized together with %Free Space with data from Windows servers. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Perf\n| where TimeGenerated between (ago(1d) .. now() )\n| where CounterName == \"% Used Space\" or CounterName == \"% Free Space\"\n| where InstanceName != \"_Total\"\n| where InstanceName !contains \"HarddiskVolume\"\n| extend FreeSpace = iff(CounterName == \"% Used Space\", 100-CounterValue, CounterValue)\n| extend localTimestamp = TimeGenerated + 2h\n| extend description = strcat(Computer, \"  \", InstanceName)\n| summarize avg(FreeSpace) by bin(localTimestamp, 10m), description\n| sort by localTimestamp desc\n| render timechart <\/code><\/pre>\n\n\n\n<p>Thanks to&nbsp;<a href=\"https:\/\/cloudbunnies.wordpress.com\/\">Vanessa<\/a>&nbsp;for good conversation and ideas \u00f0\u0178\u2122\u201a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the workbook published yesterday we used one graph for %Used Space from Linux servers, and one graph for %Free Space from Windows servers. But for some scenarios you might want to show disk space from both server types in the same graph. The following query convert Linux %Used Space to %Free Space, so they &hellip; <a href=\"http:\/\/contoso.se\/blog\/?p=4762\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[64,75,101],"tags":[77,72,74,76],"_links":{"self":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4762"}],"collection":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4762"}],"version-history":[{"count":4,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4762\/revisions"}],"predecessor-version":[{"id":4769,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4762\/revisions\/4769"}],"wp:attachment":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4762"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}