{"id":140,"date":"2012-01-19T12:33:05","date_gmt":"2012-01-19T10:33:05","guid":{"rendered":"http:\/\/darkvoice.dyndns.org\/blog\/?p=140"},"modified":"2012-02-27T06:53:54","modified_gmt":"2012-02-27T05:53:54","slug":"perfomce-counter-ubersetzen","status":"publish","type":"post","link":"https:\/\/ms07.de\/blog\/?p=140","title":{"rendered":"Perfomance Counter \u00fcbersetzen"},"content":{"rendered":"<p>Performance Counter sind toll! Man kann relativ einfach Werte auslesen. Dumm nur, dass Microsoft alles \u00fcbersetzt, selbst die Performance Counter Objekte.<\/p>\n<p>Man findet im Technet viele tolle Beschreibungen, welche Counter sinnvoll zum \u00dcberwachen bestimmter Dienste w\u00e4ren.<\/p>\n<p>Hier wird nat\u00fcrlich immer auf die englische Variante verwiesen.<\/p>\n<p>Man findet in der Registry sowohl deutsche als auch englische Beschreibungen, ansprechen kann man aber scheinbar nur die deutschen.<\/p>\n<p>Daher habe ich ein Powershell Script geschrieben. Welches alle Counter englisch und deutsch ausgiebt.<\/p>\n<p>Alternativ kann auch \u00fcber folgende Syntax ein bestimmter Counter in der Originalsprache gesucht werden:<\/p>\n<pre>PS C:\\Scripting&gt; .\\perflib-translator.ps1 \"Current % Processor Time\"\r\nCurrent % Processor Time\r\nAktuelle Prozessorzeit (%)\r\n===============================================================================<\/pre>\n<p>Hier nun das doch recht simple\u00a0Script:<\/p>\n<pre>$english = \"009\"\r\n$german = \"007\"\r\n\r\n$translatefrom = $english\r\n$translateto\u00a0\u00a0 = $german\r\n\r\n$langfrom = (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib\\$($translatefrom)\").Counter\r\n$langto = (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib\\$($translateto)\").Counter\r\n$translation = @{}\r\nFor ($x=0; $x -lt $langto.length; $X=$x+2){\r\n    $translation.Add($langto[$x],$langto[$x+1])\r\n}\r\nFor ($x=0; $x -lt $langfrom.length; $X=$x+2){\r\n    If($args[0]){\r\n        If($langfrom[$x+1] -match $args[0]){\r\n            $langfrom[$x+1]\r\n            $translation[($langfrom[$x])]\r\n            \"===============================================================================\"\r\n        }\r\n    } else{\r\n        $langfrom[$x+1]\r\n        $translation[($langfrom[$x])]\r\n        \"===============================================================================\"\r\n    }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Performance Counter sind toll! Man kann relativ einfach Werte auslesen. Dumm nur, dass Microsoft alles \u00fcbersetzt, selbst die Performance Counter Objekte. Man findet im Technet viele tolle Beschreibungen, welche Counter sinnvoll zum \u00dcberwachen bestimmter Dienste w\u00e4ren. Hier wird nat\u00fcrlich immer auf die englische Variante verwiesen. Man findet in der Registry sowohl deutsche als auch englische [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[12,8,7,10,9,11],"class_list":["post-140","post","type-post","status-publish","format-standard","hentry","category-it","category-windows","tag-leistungsindikator","tag-perflib","tag-perfmon","tag-performance-counter","tag-translator","tag-ubersetzen"],"_links":{"self":[{"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=140"}],"version-history":[{"count":13,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":148,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/140\/revisions\/148"}],"wp:attachment":[{"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}