Skip to content
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

adjust frequency-graph max to reflect change in psutil reporting #180

Open
sq-pyxisai opened this issue Dec 31, 2021 · 6 comments
Open

adjust frequency-graph max to reflect change in psutil reporting #180

sq-pyxisai opened this issue Dec 31, 2021 · 6 comments

Comments

@sq-pyxisai
Copy link

Is your feature request related to a problem? Please describe.
Looks like psutil v5.8.0 (used in s-tui v1.0.0) reported max frequency and instantaneous frequency in KHz, while psutil v5.9.0 (latest version, and installed with current implementation of s-tui) reports max frequency in KHz but instantaneous frequency in MHz. Hence, the scale of the frequency bar graph is such that frequency bars are too small to be seen.

Describe the solution you'd like
Modify function in s_tui.sources.freq_source.py as follows:
def get_top(self):
logging.debug("Returning top %s", self.top_freq)
# top frequency is in KHz, live frequency is in MHz, looks like. Need to divide top by 1000 so the
# graph is scaled correctly
return self.top_freq / 1000

Additional context
May need some check of what version psutil is running and adjust this function accordingly...

@sq-pyxisai
Copy link
Author

my units might be wrong... it may be that 5.9 reports instantaneous frequency in GHz (and max frequency in MHz).

@grobie
Copy link

grobie commented Jan 6, 2022

Hah, missed this ticket here. I reported the issue in psutil: giampaolo/psutil#2049 It appears that giampaolo/psutil#1852 implemented caching and might have changed the behavior by that.

@sq-pyxisai
Copy link
Author

Nice. looks like the change made in psutil should fix it. I may try to pull that code later and see.

@amanusk
Copy link
Owner

amanusk commented Jan 7, 2022

Thank you for openning the issue.
This seems to be a changed in the latest version of psutil. The fix is already implemented, but the package needs updating.
#2049

For now you can try manually installing the latest version of psutil

@genema
Copy link

genema commented Mar 7, 2022

This issue, which is actually caused by 'psutil' == 5.9.0 can be solved by downgrade pstuil v5.8.0. However, I'm not very sure about the root of this problem currently.

@ejgallego
Copy link

Installing psutil 5.9.1 solved the issue too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants