Monitoring Splunk

Garbage collector graph for heap usage

kmahamkali
New Member

I am trying to create a dashboard for Heap analysis. There I would like to plot a line graph with a time taken for Full gc. So I extracted 3 feilds 1.Afg: memory after full Gc 2. Memory Before Full Gc 3. Tfg: time taken for full Gc. My data looks like this

_time Bfg (in bytes) Afg((iin bytes) Tfg in Sec
2018-06-05T01:41:59.882-0700 3827336 2714566 13.974176
2018-06-05T14:12:27.501-0700 3464646 2852415 14.039128
2018-05-25T01:32:57.757-0700 3802706 2080387 10.89727
2018-05-15T10:20:43.301-0700 3400723 1793472 9.449684
2018-05-17T02:36:08.789-0700 2946767 1731755 9.05516

I wanted to plot line graph for BFG and AFG and show the Tfg values on the Afg line at the corresponding values.
Please find the attached line graph for reference.
alt text
Can some one help me with the SPL?

0 Karma

Sukisen1981
Champion

Hi,

You will need to tweak things a little for the scale issue on the y axis. Divide your bytes by 10 ^6 to convert them to GB first, if that is acceptable try something like this |
eval bfg_gb= round(Bfg (in bytes)/1000000,1) |eval afg_gb= round(afg (in bytes)/1000000,1)|eval tfg=round(tfg,1)| chart values(bfg_gb),values(afg_gb),values(tfg) by _time

Check the output, is this similar to what you need?

0 Karma

kmahamkali
New Member

Awesome that works

0 Karma

Sukisen1981
Champion

hi @kmahamkali , if the answer is satisfactory, please accept the answer

0 Karma

kmahamkali
New Member

Any recommendations?

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...