-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System monitor Network sensors number-wrap #5141
Comments
I've noticed this behaviour too, for both I take it the values should only reset upon rebooting the host HASS is running on? |
As far as I could find, the values are indeed reset upon restarting the host. Knowing this, it would be more useful for me to get monthly stats, so I should check wether I can reset those manually or find another solution :p |
I just happen to do some research and it seems this is caused by a known issue in psutil. The documentation contains the following warning about the network monitor:
That issue was opened 10 months ago, so the system monitor may require changes to deal with the number wrapping (as suggested). |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 |
(psutil author here) It's the OS which wraps those numbers, psutil simply returns them unmodified. Unfortunately a bullet proof solution to this problem really does not exist. psutil may do some magic in order to "watch" the numbers which wrap across function calls and do Also, psutil is not aware of what the exact threshold at which the number is supposed to wrap is, so in the example above adding
...but we don't have the |
OK, I've fixed this in psutil: https://github.com/giampaolo/psutil/pull/1056/files (future 5.3.0). |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍 |
New psutil 5.3.0 is out and it includes the fix which wraps the numbers in case they reset from zero so the fix for the home-assistant project consists in upgrading psutil. |
That should be sorted in the next (major) release: #9253 |
Home Assistant release (
hass --version
):0.35.3
Python release (
python3 --version
):3.4.3
Component/platform:
System Monitor
Description of problem:
The system monitor network interfaces do not take in account wrapping around the maximum number.
After the amount gets too high, the number just wraps around to 0.
Expected:
The number should not wrap around to 0, unless the interface has actually been set to 0 again.
Problem-relevant
configuration.yaml
entries and steps to reproduce:Additional info:
Reading in the
psutil
lib docs, there's stated here: https://pythonhosted.org/psutil/#networkthat applications should be prepared for this.
I got a very old system, and it already wraps around after
4096MiB
.You can see this on the following screenshots:
While in my
/proc/net/dev
(wherepsutil
gets the info from) these numbers can be seen:The text was updated successfully, but these errors were encountered: