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

FileNotFoundError (/system/etc/mtab) on Android (termux) #1344

Closed
stephengmatthews opened this issue Nov 1, 2018 · 7 comments
Closed

FileNotFoundError (/system/etc/mtab) on Android (termux) #1344

stephengmatthews opened this issue Nov 1, 2018 · 7 comments
Labels
Milestone

Comments

@stephengmatthews
Copy link

stephengmatthews commented Nov 1, 2018

I installed glances according to the README on Android (7) under termux. When I run glances, it returns:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/glances", line 11, in <module>
    load_entry_point('Glances==3.0.2', 'console_scripts', 'glances')()
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/glances/__init__.py", line 140, in main
    start(config=config, args=args)
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/glances/__init__.py", line 106, in start
    mode = GlancesMode(config=config, args=args)
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/glances/standalone.py", line 73, in __init__
    self.stats.update()
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/glances/stats.py", line 222, in update
    self._plugins[p].update()
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/glances/plugins/glances_plugin.py", line 911, in wrapper''
ret = fct(self, *args, **kw)
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/glances/plugins/glances_plugin.py", line 920, in wrapper
    ret = fct(*args, **kw)
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/glances/plugins/glances_fs.py", line 99, in update
    fs_stat = psutil.disk_partitions(all=False)
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/psutil/__init__.py", line 1990, in disk_partitions
    return _psplatform.disk_partitions(all)
  File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/psutil/_pslinux.py", line 1162, in disk_partitions
    partitions = cext.disk_partitions(mtab_path)
FileNotFoundError: [Errno 2] No such file or directory: '/system/etc/mtab'

Is there any other information I can provide?

@nicolargo
Copy link
Owner

Can you try to disable the fs plugin:

glances --disable-plugin fs

@nicolargo nicolargo added the bug label Nov 2, 2018
@nicolargo nicolargo added this to the Glances 3.1 milestone Nov 2, 2018
@stephengmatthews
Copy link
Author

stephengmatthews commented Nov 2, 2018 via email

@nicolargo
Copy link
Owner

Strange...

@giampaolo Any idea ? Did you test PsUtil with the latest Android version ?

@giampaolo
Copy link

giampaolo commented Nov 3, 2018

Does /etc/mtab exist? It's weird it looks for /system/etc/mtab.

NotImplementedError: couldn't find /proc/1546/io (kernel too old?)

As for this one, psutil should probably avoid to expose Process.io_counters() method in case this is not available. I'll file a ticket.

@stephengmatthews
Copy link
Author

stephengmatthews commented Nov 4, 2018 via email

@nicolargo
Copy link
Owner

I close this issue.

Please track the PsUtil issue here: giampaolo/psutil#1357

@papin97
Copy link

papin97 commented Jan 2, 2019

I still get the same issue (mtab not found), even though that PsUtil issue is already closed.

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

No branches or pull requests

4 participants