-
Notifications
You must be signed in to change notification settings - Fork 176
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
Mem / Swap / Load etc. not displaying #32
Comments
You should run pg_activity with 'postgres' user privileges (or 'root'). |
I have tried both postgres and root with the same results. At any rate that shouldn't matter since ordinary users can see memory usage and load stats through uptime, top, etc. I noticed the following query in Data.pg_is_local(self,): When pg_activity is connected over a unix domain socket, both of those functions return null, which psycopg2 translates to None, and str(None) is 'None' rather than '' so the length test returns false. Strangely though, if I use -h localhost, both functions return '127.0.0.1', so the equality test should return true, but I still don't get memory and load stats. I was able to get them to show up by completely commenting out all the "am I local" tests... |
Thanks for these informations. What psutil version you have ? I've just discovered that the new psutil versions > 2.0 bring a new API and I can reproduce this behaviour with a 2.1.1. |
my psutil is 2.1.0 |
Just commited a fixe : f00fc2a Could you try it ? Thank you, |
That fixed it, thank you! |
Seems to be broken again in pg_activity 1.0.2 (from PyPI), tried with psutil 2.1.3 (current) and 2.1.0, psycopg2 2.5.4 if that matters |
It's not broken again, it's just that the latest release at PyPI, i.e. the 1.0.2 you mentioned, dates from 2013-06 and the fix was committed 2014-05. The current git master works just fine. |
Hi, Latest version (1.2.0) has been pushed on pypi. Thanks, |
Thanks, this makes it easier to keep my servers updated |
I am connecting locally but these stats are not showing. Are there any known issues that might cause this? What can I do to troubleshoot?
The text was updated successfully, but these errors were encountered: