MX CPU utilization using API

Solved
guitb
Getting noticed

MX CPU utilization using API

I have a list of 50 MX devices in my organization that are reporting high utilization (greater than 90%). However, the dashboard is limited to the top 50. I am certain that more devices are experiencing this issue. Is there a way to retrieve the CPU utilization of a specific device via API? Alternatively, is there an API to obtain the utilization for all my MX devices?

1 Accepted Solution
RaphaelL
Kind of a big deal
Kind of a big deal
9 Replies 9
RaphaelL
Kind of a big deal
Kind of a big deal
MartinS
Building a reputation

Do you know what the maximum quantity allowed on this call is please? Sadly the documentation just specifies a minimum.

---
COO
Highlight - Service Observability Platform
www.highlight.net
sungod
Kind of a big deal
Kind of a big deal

After some testing, the returned CPU value looks suspect at higher quantity values.

 

For an org with 170 MX devices...

 

From the 11th device there're several at 10%, then a bunch at 9, and so on, down to 1

 

From 126th device onwards, it's 0.0* and below, 0.00*, 0.000* etc.

 

If you can do a similar test, what do you see?

 

RaphaelL
Kind of a big deal
Kind of a big deal

This is my top 1500 : 

 

Spoiler
30.0
29.0
27.0
26.0
25.0
23.0
19.0
16.0
16.0
14.0
14.0
13.0
13.0
13.0
13.0
12.0
12.0
12.0
11.0
11.0
11.0
11.0
10.0
10.0
10.0
10.0
10.0
10.0
10.0
9.0
9.0
9.0
9.0
9.0
8.0
8.0
8.0
8.0
8.0
8.0
8.0
8.0
8.0
7.0
7.0
7.0
7.0
7.0
7.0
7.0
7.0
7.0
7.0
7.0
7.0
7.0
6.70153811083053
6.0
6.0
6.0
6.0
6.0
6.0
6.0
6.0
6.0
6.0
6.0
6.0
6.0
6.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
5.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0
4.0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0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
0.8740277133572647
0.5938651018339156
0.5259220326959747
0.31468439335802634
0.22873082841790174
0.1975309639309981
0.1829504401866541
0.17744324827148078
0.17653277635348855
0.15809866559917646
0.15468938995694584
0.15289025432830805
0.14733675230278342
0.14620770042984663
0.12390377919608583
0.12330352673489135
0.11106571641827963
0.1104154834873879
0.09957879487035663
0.08921234073322969
0.08650710466873474
0.08618145361161388
0.08521181461831996
0.08397512503537402
0.08352447629359887
0.07888034258706038
0.07525291144848215
0.06920582953806585
0.06475538750466842
0.06305075966885657
0.05935708044933836
0.05766815187740634
0.056877324745226825
0.05682677980244766
0.05598467707866399
0.047515051811340726
0.04747555421326069
0.04730234243278013
0.04659288781988974
0.045032096843445626
0.0448396600955114
0.043724115761617166
0.04281685590578951
0.04273254468048926
0.04229133904061155
0.04152668868558448
0.0413499748377575
0.0411047501093175
0.041059153349033276
0.04072047018016021
0.03903577479313978
0.038995289259329054
0.03803985539980672
0.03788751881928281
0.03664857594484717
0.035293520669058984
0.0350810519678358
0.03374137707866628
0.03351589811183316
0.03329113500737617
0.033079246134646016
0.03260556232953848
0.030840553054468582
0.028208085961946152
0.027871225523316983
0.02778254027396078
0.027444477843376492
0.02660318199437402
0.02603021557772864
0.025948752072278165
0.02590875148200525
0.025738359890581698
0.025374425642291948
0.024993293822569776
0.024757634489300108
0.024260686693481456
0.023675514176063502
0.023560143881164758
0.022523958587437744
0.02165166592412993
0.02161162101017421
0.02154259187905647
0.021511428550538423
0.021294310478818915
0.02115475549743206
0.020999841204727986
0.020322954867636873
0.020244962012907187
0.019752826622882632
0.019732366919904248
0.019407736274597544
0.019157334793698827
0.019070311351587575
0.018709471652799108
0.018703075769617362
0.01857294271043428
0.018069340115266317
0.017983830290607374
0.01757677987823807
0.017558423692917064
0.017424964262313228
0.017279497074702756
0.017232092310025503
0.01670047461001301
0.01657475421028111
0.016562346008561064
0.01651953710631265
0.016017232525674066
0.015583539934574559
0.015297587727419954
0.015010397818484716
0.014518412228148914
0.013988065512362561
0.013957972706563323
0.01390917702498038
0.013848813935683078
0.013721921621670196
0.013517841142923502
0.013480931101665334
0.013480279656356918
0.013378541800634691
0.013333535207169159
0.01321021042117465
0.013092425145393188
0.013070188834290043
0.012841515443886557
0.012436609416978456
0.012234035807014848
0.012070645230337941
0.01189260770522296
0.011864239075769788
0.011784057970843273
0.011105732619750265
0.010582665909823192
0.010109283557258614
0.009901398807419375
0.009824190547054235
0.009594605061416224
0.009530662818875067
0.009262941382142568
0.009214451109200189
0.009199660872288844
0.009050426457232053
0.008849065363967679
0.008764226906824624
0.008743314051382626
0.008724830108516645
0.00865437334964291
0.008651120670031515
0.008591691290026581
0.008405000362549384
0.008208339721707331
0.008022897386077508
0.007921281863346083
0.007763323949049019
0.007409901944042441
0.007387247673383206
0.00719549154627948
0.007132066904771832
0.0070758253875939136
0.006752239604522381
0.00674898044583361
0.006635009693855256
0.006441974686123115
0.006224764873905384
0.006128583309783081
0.006094001890209235
0.005805626858236482
0.00549578704313028
0.005435862355580241
0.005336211483659499
0.005273072334073676
0.005264169741695955
0.0051694890903597615
0.005032350510844135
0.004983252136375686
0.004968493118114418
0.004937255158496002
0.004899568063285558
0.004553102957433854
0.004456684618323298
0.0044289549160916614
0.004298004683091621
0.0039844279035657
0.003963161420839843
0.003924302613155652
0.003889141335262872
0.0035708223172298804
0.0034466763211563186
0.003420590125471424
0.003393645685183149
0.0032697554126050383
0.0032425138384450125
0.003221976449162396
0.0031346855051569526
0.0030903979151062975
0.0030714822846653017
0.0029130074502915462
0.0026966237670058824
0.0026690907743400485
0.0026297205431509603
0.0025998810778326267
0.002546029743890004
0.0024362517420855167
0.0024343974193816653
0.002394595315873363
0.0023942274212784198
0.002242046511870321
0.0022375597136336453
0.002235882254906509
0.0022244180420979104
0.0021278056681271916
0.0020875137278151905
0.0020613070163765703
0.0020460402338354
0.002027204100194813
0.0019419567509279397
0.0018952110446247305
0.0018577056531257547
0.0018441761020166264
0.0018361385327655868
0.0018273204784315124
0.0018159500468737633
0.0017697757348218602
0.0017349806426470017
0.0016015542822560504
0.001599557290107552
0.001597241338202248
0.0015594039859581376
0.0014757197120289526
0.0014552307386185696
0.001334591131717526
0.0013147680192988449
0.001211015785874033
0.00120916073582379
0.0012053831415430578
0.001196912108093886
0.0011714995309233824
0.001170881192851966
0.0011603739781173418
0.001144331036567644
0.0011429329521860062
0.0011279378083054671
0.0011100332969384513
0.0011012559948806013
0.0010937273391024424
0.0010421948804407422
0.0010408835796848776
0.0010343210061507222
0.0010300211109278918
0.0010208522288721056
0.0010104562164958309
0.00097392094598078
0.0009573019348772161
0.0009470617893133867
0.0009347803785469277
0.0009190627771427406
0.0009106638279753726
0.0008990038823203674
0.0008930332119895737
0.0008839245408554371
0.0008720413112323504
0.0008633099163162317
0.0008526327350521551
0.0008506351362062664
0.0008477799981754238
0.0008307038671801752
0.0008174184256597546
0.0008043741424376645
0.0008022844017662639
sungod
Kind of a big deal
Kind of a big deal

Thanks, that looks like a similar distribution.

 

I wonder what the expected %CPU is for an idle MX? The very low values returned for some devices do not seem likely.

 

Fwiw I checked an MX85 that the API is reporting < 0.00005% for yesterday, it's passing c. 20kbps traffic on average, it's not busy but I don't believe the CPU is below 0.00005%.

 

Maybe best to set quantity high, but throw away results less than, say, 0.5%.

RaphaelL
Kind of a big deal
Kind of a big deal

Yes those  low device utilization usally have like 1-2 devices and passing a small amount of traffic. 

I also noticed that prior to MX19 , the value is always a round double ( eg : 20.0 ). After upgrading to MX 19++ I get some device reporting 20.5 , 31.5. Not sure if you are seeing the same behavior.

sungod
Kind of a big deal
Kind of a big deal

Except for the tiny values, I see all round numbers, the org I'm testing on is all MX18.x, I'll see if I've any with MX19 to try.

MartinS
Building a reputation

One thing we see with other devices/vendors are there are a lot of different CPUs to measure. My guess is this is measuring the CPU that runs the OS, but if traffic passing doesn't touch that as it's passing by via the ASICs or alike, the CPU may stay low. Then again, run something like the ThousandEyes agent and I bet the CPU jump up occasionally..

---
COO
Highlight - Service Observability Platform
www.highlight.net
sungod
Kind of a big deal
Kind of a big deal

If I loop through a single day, 18th February 0000 UTC, with a 1800 difference between t0 and t1, i.e. requesting 48 time slices in total, the endpoint only returns data for one time slice in each 4 hours.

 

Change the date to 19th March, and I get data for every 30 minute time slice.

 

Tested on the two orgs, exactly the same behaviour.

 

Is that expected behaviour?

 

It suggests that data older than some period is being discarded or consolidated into a few time buckets per day, if that's correct it would be good to have that period documented.

 

 

Get notified when there are additional replies to this discussion.