NAMD / pypelinin

Python library to distribute jobs and pipelines among a cluster
3 stars 5 forks source link

psutil may not be platform independent or may have changed its API #28

Closed rhcarvalho closed 11 years ago

rhcarvalho commented 11 years ago

pypelinin/monitoring.py calls psutil.cached_phymem() but this method does not exist on psutil==0.6.1 running on Mac OS X 10.6.8.

cached_memory = psutil.cached_phymem()
AttributeError: 'module' object has no attribute 'cached_phymem'

If it is a change in API, then I suggest specifying the version number in the requirements/production.txt file (currently unspecified).

If it is a platform problem, then I suggest that calls to psutil methods that fail should be ignored in order to provide just "as much information as possible", without breaking the program execution flow.

turicas commented 11 years ago

Thanks for bringing us this issue. Current code is using deprecated methods. psutil's documentation says that we should use psutil.virtual_memory() and psutil.swap_memory() instead.

turicas commented 11 years ago

@rhcarvalho can you please test my fix (f9b1304) so I can close this issue?

Note: as we are not using anything to monitor broker monitoring data yet, I've changed the schema a little.

turicas commented 11 years ago

@rhcarvalho can you please test with modifications added on 5efe6f6ea2b?

rhcarvalho commented 11 years ago

I've sent you a patch: https://github.com/turicas/pypelinin/pull/1