Ad Widget

Collapse

Units Type supported?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pdwalker
    Senior Member
    • Dec 2005
    • 166

    #1

    Units Type supported?

    What Unit Types are Supported in the UI?

    from ./include/config.inc.php in convert_units() (if I've read it correctly)

    s - seconds

    b, bps - bits

    <empty string> - (number or float depending on the input)

    <any other value> - treated as a multiple of 1024
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    I do not remember any special processing of any units apart of s.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • pdwalker
      Senior Member
      • Dec 2005
      • 166

      #3
      You have a series of if statements controlling the conversions

      if "s"
      convert to time and return

      if "b" or "bps"
      convert using 1K units and return

      if ""
      treat it as a number and return

      convert using 1024 units and return

      Comment

      Working...