Dashboards & Visualizations

How to create visualizations by using Unix top command output?

rajgowd1
Communicator

Hi,
i have a cronjob which has some performance related scripts which run for every 5 mins and sends output to indexed folder.

attaching the top command output: link text

I'd like respective graphs using Unix top command output. How can we create the visualizations by using top output? any help is appreciated

0 Karma
1 Solution

woodcock
Esteemed Legend

For uptime, you do not multikv, just send the entire output in as a single event and use a field extraction like this:

... | rex "(?<time>.*)\s+up\s+(?<updays>.*)\s+days,\s+(?<uphours>\d+):(?<upminutes>\d+),\s+(?<num_users>\d+)\s+users,\s+load\s+average:\s+(?<avgload_1minute>.+),\s+(?<avgload_5minutes>.+),\s+(?<avgload_15minutes>.+)"
0 Karma

rajgowd1
Communicator

Thank you,I was not able to copy my output.

Usually when we run uptime command in Linux it shows load average with 3 values delimited by a comma.
Can we visualize these load average values in any kind of chart.

0 Karma

woodcock
Esteemed Legend

You can then add this:

... | timechart avg(avgload*) BY host
0 Karma

woodcock
Esteemed Legend
0 Karma

rajgowd1
Communicator

thank you,i am checking and working on it,i will update on this thread once i implement the same

0 Karma

rajgowd1
Communicator

Hi,
i am working on uptime command.can we show below uptime load average results in line chart?

13:43:55 up 74 days, 4:08, 2 users, load average: 0.11, 0.05, 0.01

0 Karma

rajgowd1
Communicator

i have written a script which display output like below.can we create any kind of chart with below out put

0 Karma

woodcock
Esteemed Legend

Post the output of the script here.

0 Karma

somesoni2
Revered Legend

Is the output of whole command available in Splunk as part of one event?

0 Karma

rajgowd1
Communicator

No,
when i index the output,i selected source type as generic_single_line,so its displaying each line as one event.

i am not very sure,which one is good for displaying like total output as one event or each line as one event.

0 Karma

rajgowd1
Communicator

will it work if i make it as one event?

0 Karma

rajgowd1
Communicator

can we show them based on top output like

total memory
used memory
free and cached
total swap
used swap
free and buffered swap

top users consumed CPU,memory and PID

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...