Ad Widget

Collapse

How conver bytes to Gbytes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mixmox
    Member
    • Apr 2020
    • 54

    #1

    How conver bytes to Gbytes

    Hey
    im using this trigger to monitor device total traffic in/out
    net.if.total[ens192,bytes]
    but it will display long number like 48406177205
    how can i change it to GB?

    when i set GB as unit in trigger setting, it display value az this: 4.8GGB
    extra G(where does it dome from??)
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Try setting the unit to B.

    Comment

    • mixmox
      Member
      • Apr 2020
      • 54

      #3
      Originally posted by Atsushi
      Try setting the unit to B.
      net.if.total[ens192,bytes]
      when i set Unit to empty result in lastest value is 96786673887 when i set unit to B, value change to 90.14 GB
      so difference between byte and B near 6 GB

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        In the computer world, when converting K or M, divide by 1024, not by 1000. Therefore, the following calculation is made.

        96786673887 / 1024 = 94518236.21777344
        94518236.21777344 / 1024 = 92302.96505641937
        92302.96505641937 / 1024 = 90.13961431290954

        96786673887 B = 94518236.21777344 KB = 92302.96505641937 MB = 90.13961431290954 GB

        Comment

        Working...