Splunk search for Disk, CPU and Memory Details of SplunkCloud or On-prem Search Head
Copy
| rest splunk_server=local /services/server/info
| table splunk_server numberOfCores numberOfVirtualCores os_build physicalMemoryMB
| appendcols
[| rest splunk_server=local /services/server/status/partitions-space
| table splunk_server mount_point available capacity ]
| eval freeDiskGB=available/1024, totalDiskGB=capacity/1024
| table splunk_server numberOfCores numberOfVirtualCores os_build physicalMemoryMB mount_point freeDiskGB totalDiskGB
| addcoltotals freeDiskGB totalDiskGB
This search will provide information on the number of CPU cores (CPU), number of virtual CPU Cores (vCPU), OS Build, physical memory (RAM), free disk space and disk capacity. The search returns results only for the instance on which it is run. This search can be especially useful in a SplunkCloud environment where you do not have access to the underlying OS.