Splunk Search

Evaluation of CPU_power

LKrieger
Explorer

Hi Splunkers,

 

Iam a beginner at splunk. So I managed to get all Data from Aida64 into Splunk. That does include Temperatures, Mhz Clocks of all Cores, TDP-Values etc.

Now I wanted to try to get a nice timechart from the average CPU Power usage of the System per Minute. The Problem is that all the values are entering splunk with a timeframe of around 2-4 seconds from the system.  Here is an example:

LKrieger_0-1620927714842.png

The field CPU_power is the necessary one which I want to have a timechart from.

A normal timechart search was not possible for me, because I only get it managed to show all the values at per line in the timechart.

LKrieger_2-1620928148540.png

Another try was then to sum all values in a minute together and divide them by the amount of counts per minute. But there I get not result per minute then...

LKrieger_3-1620928509387.png

Actually I dont know how to manage this.

 

Hopefully you can help me out here.

Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

It looks like CPU_power is not being treated as a numeric (it is left-aligned not right-aligned) which might explain why it is taking all 5 digits without a decimal place - possibly something to do with language settings?

index=aida64_2
| eval CPU_power=replace(CPU_power,",",".")
| timechart span=1m avg(CPU_power)

 

View solution in original post

LKrieger
Explorer

Hi ITWhisperer,

 

thanks man, this did the trick!!

But actually I am not sure what you mean mit aligned. Do you mean by language maybe the "." and "," notation for english and german language, regarding the separation after the deciaml place?

Actually the Log from aida looks like this:

LKrieger_0-1620936156714.png

So the values are separated by semicolons. As you can see the forth last place is the value for the cpu_power (First line as example 124,20). So the decimal place is separated by ",". Did you mean this by aligned and regarding the language?

 

How can I change this in Splunk, maybe then without using the separate eval command from your query?

 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

ITWhisperer_0-1620936657253.png

Values in the yellow column are to the left of the column (left-align) whereas values in the blue column are to the right of the column (right-align). Strings are usually left-aligned and numerics are right-aligned.

Yes, the language difference is that German(?) uses commas for decimal place delimiters whereas English uses dots for decimal place delimiters.

I am afraid I don't know whether it is possible to do this without the extra eval.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index=aida64_2
| timechart span=1m avg(CPU_power)
0 Karma

LKrieger
Explorer

Hi ITWhisperer,

 

thanks for your fast reply. I tried your query but there seems something wrong.

LKrieger_0-1620932739100.png

It seems your query is right, but I dont know where the values come from. Arount 10000 per minute seems completely wrong. So in idle the System needs around 100Watt and there are around 20 entries per minute, which must leed in a value of 2000 per Minute. But I dont know where the 10000 are coming from now.

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It looks like CPU_power is not being treated as a numeric (it is left-aligned not right-aligned) which might explain why it is taking all 5 digits without a decimal place - possibly something to do with language settings?

index=aida64_2
| eval CPU_power=replace(CPU_power,",",".")
| timechart span=1m avg(CPU_power)

 

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...