- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jialiu907
Path Finder
05-25-2023
07:48 AM
I am looking for the table to be in decreasing order and with the Total row on top.
This is my current search.
index=jia source="/hptc_cluster/splunk/Reports/PBS/splunkresults.csv" host="gridmetrics" sourcetype="JiaGridMetrics"
| stats count as Slots by JobName
| rename Slots as CPU
| addcoltotals label=Total labelfield=JobName
| sort count desc
This is the output.
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
05-25-2023
09:38 AM
You're asking the sort command to sort on a field that doesn't exist (count). Choose either CPU or JobName for the sort.
index=jia source="/hptc_cluster/splunk/Reports/PBS/splunkresults.csv" host="gridmetrics" sourcetype="JiaGridMetrics"
| stats count as CPU by JobName
| addcoltotals label=Total labelfield=JobName
| sort - CPU
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
05-25-2023
09:38 AM
You're asking the sort command to sort on a field that doesn't exist (count). Choose either CPU or JobName for the sort.
index=jia source="/hptc_cluster/splunk/Reports/PBS/splunkresults.csv" host="gridmetrics" sourcetype="JiaGridMetrics"
| stats count as CPU by JobName
| addcoltotals label=Total labelfield=JobName
| sort - CPU
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
