RAM usage is occasionally represented as a negative value
See original GitHub issueHi,
With this i3pystatus mem config:
status.register("mem",
format="RAM: {used_mem}/{total_mem} GiB",
color="#FFFFFF",
divisor=1073741824
)
I get negative values for RAM usage in my i3status bar. Here is a screenshot to show it (I’ve circled or rather rectangled around it in red to point it out):
I have tried to fix this myself by throwing abs around the RHS of L48 and L50 of the mem.py file. It made no difference I’m afraid. This issue is intermittent, by-the-way, when I’ve just booted my system after several hours of it being off the issue is not there but after the system has been up for several hours the issue is there. Any ideas on how to fix this issue?
Thanks for your time, Brenton
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Why does memory utilization show negative results? - TechNet
If "Total Memory (MB)" is 5 GB, but "Available Bytes (MB)" is greater than 5 GB, then "Available Bytes (MB)" is definitely being...
Read more >Memory limit doesn't accept the negative value
Memory limit doesn't accept the negative value. Trying to edit a vm, results in the error you can see. If I reload the...
Read more >Negative Free Memory - java - Stack Overflow
It means after you've sorted, the garbage collector has probably freed more memory and you have more than you started out with.
Read more >Why Is Google Chrome Using So Much RAM? Here's How to ...
If you see Chrome using a lot of memory, but there are no negative performance consequences, it is not worth worrying about. For...
Read more >Memory usage - Advanced R. - Hadley Wickham
Positive numbers represent an increase in the memory used by R, and negative numbers represent a decrease. # Need about 4 mb to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t see how it can be an issue with
mem
module. The values comes frompsutil
. https://psutil.readthedocs.io/en/latest/#memoryI wanted to know if
mem
should keep printing occasional negative values or do we replace occasional negative values with0
to make it easier for users? (i.e. hide negative values from users)If you like https://github.com/lasers/i3pystatus/commit/ea46f44d4bf8bb9bcac043ae34a4ff583978b220, I can make a PR.
With my present configs it isn’t.