Binary prefixes for memory, swap

Asked by Abhishek on 2016-01-22

Gnome system monitor shows both memory/swap and network bandwidth with binary prefixes. There should be an option for this in the applet as well.

While for network bandwidth decimal prefixes are fine but for memory/swap the default should be binary prefixes.

Can this be supported in the applet?

Question information

Language:
English Edit question
Status:
Solved
For:
System Load Indicator Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Hofmann
Solved:
2016-01-25
Last query:
2016-01-25
Last reply:
2016-01-25
Best Michael Hofmann (mh21) said : #1

Hi Abhishek,

yes this could be supported.

I don't have time to work on this, but the implementation should be straightforward. The applet uses the size() function defined in src/function.vala and src/utils.vala. Since gtk 2.30, g_format_size_for_display has been replaced by g_format_size, which supports both base 2 and base 10. So it should be easily to implement a function size2() that uses base 2.

Cheers
  Michael

Abhishek (rawcoder) said : #2

Thanks for the response!

I'll read the code and try to implement it.

Abhishek (rawcoder) said : #3

Thanks Michael Hofmann, that solved my question.