Hello! i’m use telegraf for system monitoring,
but in my testing in windows(linux seems ok), cpu used value in windows resource monitor(40~50% used) and telegraf metric data(with input.cpu, 20~30%) was little big different .
% idle_time in inputs.win_perf_counters was similar too,
why that value is different ? is that normal? sorry for my english
@john_park Welcome to the InfluxData community!
Your English is perfectly understandable, no need to apologise.
The difference you’re seeing between Windows Resource Monitor and Telegraf’s CPU metrics is actually quite normal and expected. Here’s why:
Different Calculation Methods:
- Windows Resource Monitor shows CPU usage as a percentage of total available CPU time across all cores
- Telegraf’s
inputs.cpu
plugin typically reports per-core usage and then averages it, which can give different results
Key Differences:
- Time intervals: Resource Monitor might use different sampling intervals than Telegraf
- Averaging method: Telegraf usually averages CPU usage across all cores, while Resource Monitor might weight it differently
- System vs. User perspective: Resource Monitor might include some system overhead that Telegraf filters out
Why Linux seems more consistent: Linux systems tend to have more standardized CPU reporting across different tools, whereas Windows has multiple ways to calculate CPU usage.
Recommendations:
- Use
inputs.win_perf_counters
with the “Processor Information” counter for more Windows-native measurements - Consider using both plugins and averaging them for a more complete picture
- Focus on trends rather than absolute values - both tools should show similar patterns even if the absolute numbers differ
The 10-20% difference you’re seeing (40-50% vs 20-30%) is within the normal range for this kind of cross-tool comparison on Windows. As long as the trends match (when one goes up, the other goes up), your monitoring is working correctly.
aha, Thank you so much!!