question

04550248 avatar image
0 Votes"
04550248 asked tbgangav-MSFT answered

how to save cpu usage

I check that i can save data for f cpu usage on excel every 1 minute

but I need to save data every 1 sec

Can we save data for the cpu usage on excel every 1 second?

azure-monitor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

tbgangav-MSFT avatar image
0 Votes"
tbgangav-MSFT answered

Hi @04550248,

When you say that you were able to save data for cpu usage every 1 minute, can you elaborate on below things and clarify with more context so it would help to provide relevant answer:

  1. From which tile you were able to fetch and save data of cpu usage to excel ? Is it from Logs tile under a Log Analytics Workspace ?

  2. If Yes, what's the kusto query that you have used to fetch cpu usage ?

  3. If No, is it related to alert frequency and period attributes ?

  4. If No, please provide more context around your use case.

In general, if its about Perf kusto table related cpu usage then its related to Processor Time counter so kusto query for it with minimal time generation can be as shown below:

 Perf
 | where CounterName == @"% Processor Time"
 | where ( InstanceName == "_Total" )  
 | summarize AggregatedValue= avg(CounterValue) by Computer, bin(TimeGenerated, 1s) 

Or if its about alert frequency and period attributes then minimum that we can select is 1 minute. For more information w.r.t it, please refer this document.

Or if its about log data ingestion time then upload frequency is typically between 30 seconds and 2 minutes depending on the type of the data. For more information w.r.t it, please refer this document.

Looking forward to your reply.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.