hello
if I print the byte-out of active user in hotspot
and then divide it by 1048576 , I will see the only the Integer
for example - if I have 10414452 bytes → I will see 9Mb
how can I make it show me 9.9 ?
I keep the value of the byte-out as an global variable
I tested it on 6.7, and it works with adding, subtracting, and multiplying, but dividing seems to be broken! Which is what you’re looking for… Hm.
If you do try the script, there’s one typo in the code that I saw right off. Line 18 (the last commented line in the instructions) should be :put $decimalresult (there is a missing letter l)
For testing, change the top part of the script to:
:local dividend 10414452
:local divisor 1048576
:local decimalplaces 2Enclose the whole script in brackets {} and paste into the terminal. Output:
10414452 / 1048576 = 9.93