Splunk Dev

What is pctIdle in splunk index os?

Shashank_87
Explorer

Hi,

What is this field pctIdle which automatically gets extracted when we use multikv command?
Is it the avg cpu load?
Is it the percentage of time when CPU was idle?
If i need to calculate the CPU utilisation % of my 2 host, which query and sourcetype should i use from the below 2 queries?

1. index=os sourcetype=top host="host1" OR host="host2" 
| timechart span=5m values(pctCPU) by host

2.index=os sourcetype=cpu host="host1" OR host="host2" 
| eval Percent_CPU_Load = 100 - pctIdle 
| timechart avg(Percent_CPU_Load) by host

Appreciate if someone can help

Tags (1)
1 Solution

renjith_nair
Legend

@Shashank_87,

pctIdle or Percent Idle Time is percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request. Have a look at this to see a comparison of commands used : https://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html

If you need to calculate CPU utilisation % of hosts, use eval Percent_CPU_Usage = 100 - pctIdle , see Percent_CPU_Usage

On another note, do you have pctCPU field? As far as I have seen, the headers for CPU utilization are

CPU    pctUser    pctNice  pctSystem  pctIowait    pctIdle

Which are

CPU : CPU number

%user: Percentage of CPU utilization that occurred while executing at the user level (application).

%nice: Percentage of CPU utilization that occurred while executing at the user level with nice priority.

%system: Percentage of CPU utilization that occurred while executing at the system level (kernel).

%iowait: Percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.

%idle: Percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

renjith_nair
Legend

@Shashank_87,

pctIdle or Percent Idle Time is percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request. Have a look at this to see a comparison of commands used : https://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html

If you need to calculate CPU utilisation % of hosts, use eval Percent_CPU_Usage = 100 - pctIdle , see Percent_CPU_Usage

On another note, do you have pctCPU field? As far as I have seen, the headers for CPU utilization are

CPU    pctUser    pctNice  pctSystem  pctIowait    pctIdle

Which are

CPU : CPU number

%user: Percentage of CPU utilization that occurred while executing at the user level (application).

%nice: Percentage of CPU utilization that occurred while executing at the user level with nice priority.

%system: Percentage of CPU utilization that occurred while executing at the system level (kernel).

%iowait: Percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.

%idle: Percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.
---
What goes around comes around. If it helps, hit it with Karma 🙂

Shashank_87
Explorer

Brilliant Thank you

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...