Splunk Search

Memory Usage

SN1
Path Finder

this is the search
| rest /services/server/status/partitions-space splunk_server=*
| eval free = if(isnotnull(available), available, free)
| eval usage_TB = round((capacity - free) /1024/1024, 2)
| eval free=round(free/1024/1024,2)
| eval capacity_TB = round(capacity /1024/1024, 2)
| eval pct_usage = round(usage / capacity * 100, 2)
| table splunk_server, usage_TB , capacity_TB , free

it gives memory usage of splunk servers , can this be implemented using _introspection index as well?

Labels (1)
0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @SN1 

Just to check - are you referring to disk usage rather than memory (RAM) usage?

If so, you can access this in the _introspection endpoint to get changes over time rather than just the current value using:

index="_introspection" sourcetype=splunk_disk_objects host=macdev 
| rename data.* as * 
| timechart latest(available) as available, latest(capacity) as capacity, latest(free) as free by mount_point

You can also use the _metrics index with mstats:

| mstats latest(spl.intr.disk_objects.Partitions.data.*) AS * WHERE index=_metrics sourcetype=splunk_intro_disk_objects component=Partitions by data.mount_point

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma

kiran_panchavat
Champion

@SN1 

introspection index is intended to collect information about your systems running Splunk and give you more data to help diagnose Splunk performance issues. There are some details about what data is collected at About Splunk Enterprise platform instrumentation - Splunk Documentation

kiran_panchavat_0-1744114088940.png

 

For example, If you want to search CPU and memory utilization per search execution with relevant information like which used executed and more.

index=_introspection host=* source=*/resource_usage.log* component=PerProcess data.process_type="search" 
| stats latest(data.pct_cpu) AS resource_usage_cpu latest(data.mem_used) AS resource_usage_mem by data.pid, _time, data.search_props.type,data.search_props.mode, data.search_props.role,data.search_props.user, data.search_props.app, data.search_props.sid

kiran_panchavat_0-1744113275036.png

You may be able to find some useful information in the What does platform instrumentation log? - Splunk Documentation or the Introspection endpoint descriptions - Splunk Documentation

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!
0 Karma
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!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

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 ...