FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add back `Get-Counter` cmdlet for Windows by SteveL-MSFT · Pull Request #10933 · PowerShell/PowerShell · GitHub

Add back Get-Counter cmdlet for Windows - #10933

Merged
Travis Plunk (TravisEz13) merged 8 commits into
PowerShell:masterfrom
SteveL-MSFT:perfcounters
Nov 6, 2019
Merged

Add back Get-Counter cmdlet for Windows#10933
Travis Plunk (TravisEz13) merged 8 commits into
PowerShell:masterfrom
SteveL-MSFT:perfcounters

Conversation

Steve Lee (SteveL-MSFT) commented Oct 29, 2019
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

Reviewed the APIs being used. Get-Counter can work with just public APIs published in pdh.h. Import-Counter and Export-Counter rely on undocumented APIs so those are removed. The PDH apis are really old so I don't believe there's any chance to get those APIs or the binary log format documented so removed that code. Get-Counter -ListSet has Description property as empty because it isn't supported by PDH apis.

PR Checklist

Copy link
Copy Markdown
Member Author

Sean Wheeler (@sdwheeler) new fwlink for Get-Counter?

Sean Wheeler (sdwheeler) commented Oct 29, 2019
edited by unfurl-links Bot
Loading

Copy link
Copy Markdown
Collaborator

Steve Lee (@SteveL-MSFT) https://go.microsoft.com/fwlink/?linkid=2109647

The Get-Counter cmdlet gets performance counter data directly from the performance monitoring instrumentation in the Windows family of operating systems. Get-Counter gets performance data from a local computer or remote computers. You can use the Get-Counter parameters to specify one or more computers, list the performance counter sets and the instances they contain, set the sample intervals, and specify the maximum number of samples. Without parameters, Get-Counter gets performance counter data for a set of system counters. Many counter sets are protected by access control lists (ACL). To see all counter sets, open PowerShell with the Run as administrator option.

Ilya (iSazonov) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I found https://github.com/microsoft/Tx. It seems work with blg.

Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 30, 2019
Ilya (iSazonov) added this to the 7.0.0-preview.6 milestone Oct 30, 2019

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) nice find, seems that Tx is using a different set of APIs to read the log, not sure if there is a different public api to write the binary log. I suggest we defer this for now.

Copy link
Copy Markdown
Collaborator

I suggest we defer this for now.

Maybe open a tracking issue if you plan to investigate this?

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) created #10946

Copy link
Copy Markdown
Member

Steve Lee (@SteveL-MSFT) Can you run a coordinated package build and send me a Direct Message with the build information? Let's verify this doesn't cause any new compliance issues.

ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Nov 5, 2019
ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Nov 5, 2019
Travis Plunk (TravisEz13) merged commit 7ddfb82 into PowerShell:master Nov 6, 2019
Steve Lee (SteveL-MSFT) deleted the perfcounters branch November 6, 2019 16:16

Copy link
Copy Markdown

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL