Comments (10)
You should run pg_activity with 'postgres' user privileges (or 'root').
from pg_activity.
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,):
SELECT inet_server_addr() AS inet_server_addr, inet_client_addr() AS inet_client_addr
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...
from pg_activity.
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.
from pg_activity.
my psutil is 2.1.0
from pg_activity.
Just commited a fixe : f00fc2a
It works for me with psutil 2 and older versions.
Could you try it ?
Thank you,
from pg_activity.
That fixed it, thank you!
from pg_activity.
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
from pg_activity.
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.
from pg_activity.
Hi,
Latest version (1.2.0) has been pushed on pypi.
Thanks,
from pg_activity.
Thanks, this makes it easier to keep my servers updated
from pg_activity.
Related Issues (20)
- ZeroDivisionError when server has no swap HOT 1
- [Rocky8] [Rocky9] Can't install because of python3.9 dependencies HOT 2
- Help for installation pg_activity 3.0.1 HOT 12
- packaged pg-activity not running on ubuntu 20.04 HOT 4
- AttributeError: module 'humanize' has no attribute 'precisedelta' HOT 2
- ModuleNotFoundError: No module named '_curses' HOT 1
- Encoding mess recap HOT 17
- Ask for new release, including pid bug HOT 4
- 3.1.0 issue: AttributeError: 'NoneType' object has no attribute 'encode' HOT 4
- 3.1.1: TypeError: cannot use a string pattern on a bytes-like object HOT 17
- psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type bytea HOT 3
- Weird display issues inside GNU screen HOT 8
- erorr attrs!=21.1,>=17 on centos8 HOT 1
- The 'client' column only shows the first 16 characters of IPv6 addresses. HOT 2
- Any plans to allow for running pg_activity remotely with superuser privileges? HOT 2
- AttributeError: module 'attr.validators' has no attribute 'gt' HOT 1
- Dependency errors when updating RHEL 8 HOT 1
- Document how to run tests locally HOT 3
- psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type bytea HOT 1
- ValueError after connected HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg_activity.