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

Failed to Allocate Memory -- FreeBSD #781

Closed
carpenike opened this issue Jan 18, 2016 · 5 comments
Closed

Failed to Allocate Memory -- FreeBSD #781

carpenike opened this issue Jan 18, 2016 · 5 comments

Comments

@carpenike
Copy link

Hey All,

Having an issue after installing Glances from ports.

root@freebsd:~ # glances -w
Traceback (most recent call last):
  File "/usr/local/bin/glances", line 9, in <module>
    load_entry_point('Glances==2.5', 'console_scripts', 'glances')()
  File "/usr/local/lib/python2.7/site-packages/glances/__init__.py", line 190, in main
    args=core.get_args())
  File "/usr/local/lib/python2.7/site-packages/glances/core/glances_webserver.py", line 42, in __init__
    self.stats.update()
  File "/usr/local/lib/python2.7/site-packages/glances/core/glances_stats.py", line 156, in update
    self._plugins[p].update()
  File "/usr/local/lib/python2.7/site-packages/glances/plugins/glances_plugin.py", line 654, in wrapper
    ret = fct(*args, **kw)
  File "/usr/local/lib/python2.7/site-packages/glances/plugins/glances_quicklook.py", line 68, in update
    self.stats['mem'] = psutil.virtual_memory().percent
  File "/usr/local/lib/python2.7/site-packages/psutil-3.4.1-py2.7-freebsd-10.2-STABLE-amd64.egg/psutil/__init__.py", line 1676, in virtual_memory
    ret = _psplatform.virtual_memory()
  File "/usr/local/lib/python2.7/site-packages/psutil-3.4.1-py2.7-freebsd-10.2-STABLE-amd64.egg/psutil/_psbsd.py", line 119, in virtual_memory
    mem = cext.virtual_mem()
OSError: [Errno 12] Cannot allocate memory
@nicolargo
Copy link
Owner

Hi @carpenike , can you send us your Glances and PsUtil version ?

glances -v will do the trick.

@asergi Is it working out of the box on your BSD ?

@carpenike
Copy link
Author

root@freebsd:~ # glances -V
Glances v2.5 with psutil v3.4.1

@syohex
Copy link

syohex commented Jan 19, 2016

I have sent PR(giampaolo/psutil#731). psutil uses wrong data type for getting physical memory size by sysctlbyname. This bug was introduced at psutil 3.4.1. So you can avoid this issue downgrade to 3.3.0.

@carpenike
Copy link
Author

Thanks. Pulled down / installed the master branch for psutil and was able to launch Glances.

@nicolargo
Copy link
Owner

REJECTED cause: PsUtil issue.

Thks for the report and the work around !

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

No branches or pull requests

3 participants