locked
Gathering past PerfMon data with Get-Counter RRS feed

  • Question

  • Is it possible to gather the last 24 hours worth of data using Get-Counter cmdlet? I am trying to gather the min, max and avg over a 24 hour period from a custom created counter.

    Thanks

    Monday, September 11, 2017 8:14 PM

Answers

  • You can only collect data for the time the counter is running and not before.  You can use perfmon utility to capture raw data and use perfmon utils to extract a subset of the collected data.

    Post in Performance monitoring forum to learn how to do this.  

    You can also use Get-Counter to CSV file an query the CSV file.

    Performance monitoring is an skill and an art.  It takes time to learn how to work with raw counter data.  There is no CmdLet to do this for you.


    \_(ツ)_/

    • Marked as answer by RackHat Thursday, September 14, 2017 7:39 PM
    Thursday, September 14, 2017 4:17 PM

All replies

  • Get-Counter counterpath <repetition parameters> | Measure-Object | Select Maximum, Minimum, Average

    help Get-Counter -Full
    help Measure-Object -full


    \_(ツ)_/

    Monday, September 11, 2017 9:40 PM
  • Thank you jrv, I'm just having trouble gathering information from the past. 
    Thursday, September 14, 2017 3:07 PM
  • There is not "past" with performance counters.

    \_(ツ)_/

    Thursday, September 14, 2017 3:20 PM
  • Okay, so there is no way to gather the last 24 hours?

    Say for example I create the perf counter "DBstats". I set this up on a Friday afternoon to collect certain metrics of data. I get to work on Monday and want to collect 12 hours of data from Sunday on the perf counter metrics. Is this possible? I am currently able to collect and sort data from the time I start running the command but not before it.


    Thursday, September 14, 2017 3:39 PM
  • You can only collect data for the time the counter is running and not before.  You can use perfmon utility to capture raw data and use perfmon utils to extract a subset of the collected data.

    Post in Performance monitoring forum to learn how to do this.  

    You can also use Get-Counter to CSV file an query the CSV file.

    Performance monitoring is an skill and an art.  It takes time to learn how to work with raw counter data.  There is no CmdLet to do this for you.


    \_(ツ)_/

    • Marked as answer by RackHat Thursday, September 14, 2017 7:39 PM
    Thursday, September 14, 2017 4:17 PM
  • Thank you!
    Thursday, September 14, 2017 7:39 PM