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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...