All Apps and Add-ons

Find total MB in use based on '% Committed in Bytes' and 'Committed Bytes'

bcyates
Communicator

Hi all,

My fields looks like this:

CommittedBytes=1610014720
PagesPersec=0
PercentCommittedBytesInUse=27
wmi_type=Memory

I can see my total CommittedBytes and my PercentCommittedBytesInUse. But what I need is MB in use instead of just the percentage. Does anyone know a good way to do the math on the conversion?

1 Solution

mayurr98
Super Champion

you should do something like this

| eval CommittedBytes_MB=round(CommittedBytes/1000000,2)

In more accurate way you should try

| eval CommittedBytes(MB) = round(CommittedBytes/1024/1024,2)

let me know if this helps!

View solution in original post

0 Karma

mayurr98
Super Champion

you should do something like this

| eval CommittedBytes_MB=round(CommittedBytes/1000000,2)

In more accurate way you should try

| eval CommittedBytes(MB) = round(CommittedBytes/1024/1024,2)

let me know if this helps!

0 Karma

mayurr98
Super Champion

Okay so this is still achievable using simple math.

Step1:Calculate UsedBytes
(UsedBytes/CommittedBytes)*100=PercentCommittedBytesInUse

Step2 : convert bytes to MB

UsedBytes/1024/1024

Try this search query

| eval UsedBytes=(PercentCommittedBytesInUse/100)*CommittedBytes | eval UsedMB=UsedBytes/1024/1024

Let me know if this helps!

bcyates
Communicator

This is great, thanks!

0 Karma

anjambha
Communicator

Hi bcyates,

Are you looking for something like.
CommittedBytes(MB) = CommittedBytes/1000000

= 1610014720/1000000
= 1610.01472 MB

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...