[ZBXNEXT-954] Units standardization Created: 2011 Sep 09  Updated: 2021 May 20

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Major
Reporter: Piotr Szczepański Assignee: Unassigned
Resolution: Unresolved Votes: 15
Labels: consistency, units, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot from 2020-07-28 13-17-56.png     GIF File aaa.gif    
Issue Links:
Duplicate
is duplicated by ZBX-18146 Zabbix uses TB instead of TiB for vfs... Closed

 Description   

according to topic:
http://www.zabbix.com/forum/showthread.php?t=23309

1K = 1024 or 1K = 1000 ?? -> let's stop making people guess

==== 1 === (FAST FIX)
if item unit is B - displayed units suffixes should be:

  • KiB
  • MiB
  • GiB
  • etc

http://en.wikipedia.org/wiki/IEEE_1541

=== 2 === (Improvement)
imo it's good idea to add additional option in item creation/edit form

so people can chose display format:

  • normal (k, M, G, ... = x 1000)
  • binary prefixes (Ki, Mi, Gi, ... = x 1024)
  • unixtime - translated to "yyyy.mm.dd hh:mm:ss"
  • uptime - translated to "hh:mm:ss" or "N days, hh:mm:ss"
  • s - translated to "yyy mmm ddd hhh mmm sss ms"
  • as it is (like rpm % ect)

but additional column in items table is needed so it can be only target for zabbix 2.0
(i can't see any db updates related witch new versions in 1.8.x line)

now u can use Unist field and do it this way (temporary):

If set, Zabbix will add the unit postfix to all received values.
Till Zabbix 1.8.2, default multiplier is 1024, and some units have special processing:
b, bps - 1000 is 1K, special processing for bits.
Since Zabbix 1.8.2, default multiplier is 1000, and special processing is used for units B, where multiplier is 1024.
For example, if units are set to B, Zabbix will display:
1 as 1B
1024 as 1KB
1536 as 1.5KB

+ Since Zabbix 1.8.8, default multiplier is 1000, and special processing is used for units iB and ib, where multiplier is 1024.
+ For example, if units are set to iB, Zabbix will display:
+ 1 as 1B
+ 1024 as 1KiB
+ 1536 as 1.5KiB

unixtime - translated to "yyyy.mm.dd hh:mm:ss"
uptime - translated to "hh:mm:ss" or "N days, hh:mm:ss"
s - translated to "yyy mmm ddd hhh mmm sss ms", parameter is treated as number of seconds. Only 3 upper major units are shown, like "1m 15d 5h" or "2h 4m 46s". If there are no days to display, only two levels are displayed - "1m 5h" (no minutes, seconds or milliseconds are shown). Will be translated to "< 1 ms" if the value is less than 0.001.

EDIT:
and triggers
i have one defined like this:
used bandwidth is to high:

{switch:if.Fa5.In.last(0)}>3.9M

i don't know - its activating when used bandwidth is over 3.9*1024*1024 ? or 3.9*1000*1000

but server should calculate it like this:

{switch:if.Fa5.In.last(0)}>3.9M -> {switch:if.Fa5.In.last(0)}>3.9*1000*1000
{switch:if.Fa5.In.last(0)}>3.9Mi -> {switch:if.Fa5.In.last(0)}>3.9*1024*1024

ADDITIONAL INFO (don't read if u don have time):
i have TS3 server and its statistics are in attachment

packets are in units x1000
all transfers in unist x1024
all is clear no one need to guess



 Comments   
Comment by richlv [ 2011 Sep 09 ]

this is mixing several different issues in one, might be hard to follow. blacklist customisation is ZBXNEXT-768

Comment by Oleksii Zagorskyi [ 2011 Nov 24 ]

some answers and suggestion reported in the ZBX-4390

Comment by Volker Fröhlich [ 2014 Jan 14 ]

About the use of kilo: ZBX-5764

ZBX-1273 is related too

Comment by Artjoms Rimdjonoks [ 2020 Jul 28 ]

"http://en.wikipedia.org/wiki/IEEE_1541" is not the only standard, there are 2 standards on this issue:
1) IEC - uses the base of 1000: 1000 bytes in a Kilobyte, 1000 Kilobytes in a Megabyte etc.
2) JEDEC - uses the base of 1024: 1024 bytes in a Kilobyte, 1024 Kilobytes in a Megabyte etc.

It happens that Zabbix uses the JEDEC at the moment.

Comment by Glebs Ivanovskis [ 2021 May 20 ]

If Wikipedia quotes JEDEC correctly, it does not feel like JEDEC is encouraging use of "binary" kilo-, mega- and giga- prefixes:

Quote from JEDEC Standard 100B.01, page 8:
The definitions of kilo, giga, and mega based on powers of two are included only to reflect common usage. IEEE/ASTM SI 10-1997 states "This practice frequently leads to confusion and is deprecated." Further confusion results from the popular use of the megabyte representing 1 024 000 bytes to define the capacity of the 1.44-MB high-density diskette. An alternative system is found in Amendment 2 to IEC 60027-2: Letter symbols to be used in electrical technology – Part 2.

Aforementioned "alternative system" from IEC 6007-2 is Ki, Mi, Gi, etc.

Generated at Thu Apr 25 09:34:33 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.