{"id":76,"date":"2017-08-13T22:58:11","date_gmt":"2017-08-13T22:58:11","guid":{"rendered":"http:\/\/www.mrmarkyoung.com\/oracle\/?p=76"},"modified":"2018-06-04T16:51:44","modified_gmt":"2018-06-04T06:51:44","slug":"asm-disk-usage","status":"publish","type":"post","link":"http:\/\/www.mrmarkyoung.com\/oracle\/2017\/08\/13\/asm-disk-usage\/","title":{"rendered":"ASM Disk Usage"},"content":{"rendered":"\n<pre class=\"lang:default decode:true \" >SELECT target_name,\r\n         diskgroup,\r\n         MAX (DECODE (seq, 7, VALUE)) REDUNDANCY,\r\n         MAX (DECODE (seq, 4, VALUE)) PERCENT_USED,\r\n         MAX (DECODE (seq, 6, ceil(VALUE\/1024))) TOTAL_GB,\r\n         MAX (DECODE (seq, 9, ceil(VALUE\/1024))) USABLE_TOTAL_GB,\r\n         MAX (DECODE (seq, 3, ceil(VALUE\/1024))) FREE_GB,\r\n         MAX (DECODE (seq, 8, ceil(VALUE\/1024))) USABLE_FREE_GB,\r\n         MAX (DECODE (seq, 2, VALUE)) NO_OF_DISK,\r\n         ceil(( MAX (DECODE (seq, 6, ceil(VALUE\/1024)))) \/(MAX (DECODE (seq, 2, VALUE)))) LUN_SIZE,\r\n         MAX (DECODE (seq, 5, decode(VALUE,'No','',value))) REBAL_PENDING,\r\n         MAX (DECODE (seq, 1, VALUE)) IMBALANCE\r\n    FROM (SELECT target_name,\r\n                 key_value diskgroup,\r\n                 VALUE,\r\n                 metric_column,\r\n                 ROW_NUMBER ()\r\n                 OVER (PARTITION BY target_name, key_value\r\n                       ORDER BY metric_column)\r\n                    AS seq\r\n            FROM MGMT$METRIC_CURRENT\r\n          WHERE        target_type in ('osm_instance','osm_cluster')\r\n                   AND metric_column IN\r\n                          ('rebalInProgress',\r\n                           'free_mb',\r\n                           'usable_file_mb',\r\n                           'type',\r\n                           'computedImbalance',\r\n                           'usable_total_mb',\r\n                           'percent_used','diskCnt')\r\n                OR (    metric_column = 'total_mb'\r\n                    AND metric_name = 'DiskGroup_Usage'))\r\nGROUP BY target_name, diskgroup\r\norder by 1,2\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SELECT target_name, diskgroup, MAX (DECODE (seq, 7, VALUE)) REDUNDANCY, MAX (DECODE (seq, 4, VALUE)) PERCENT_USED, MAX (DECODE (seq, 6, ceil(VALUE\/1024))) TOTAL_GB, MAX (DECODE (seq, 9, ceil(VALUE\/1024))) USABLE_TOTAL_GB, MAX (DECODE (seq, 3, ceil(VALUE\/1024))) FREE_GB, MAX (DECODE (seq, 8, ceil(VALUE\/1024))) USABLE_FREE_GB, MAX (DECODE (seq, 2, VALUE)) NO_OF_DISK, ceil(( MAX (DECODE (seq, 6, ceil(VALUE\/1024)))) \/(MAX (DECODE (seq, 2, &#8230; <a title=\"ASM Disk Usage\" class=\"read-more\" href=\"http:\/\/www.mrmarkyoung.com\/oracle\/2017\/08\/13\/asm-disk-usage\/\" aria-label=\"Read more about ASM Disk Usage\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[16],"class_list":["post-76","post","type-post","status-publish","format-standard","hentry","category-oracle-database","tag-asm"],"_links":{"self":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":1,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/76\/revisions"}],"predecessor-version":[{"id":77,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/76\/revisions\/77"}],"wp:attachment":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/categories?post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/tags?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}