glances icon indicating copy to clipboard operation
glances copied to clipboard

permission denied on Android 12

Open BeeBreeze opened this issue 3 years ago • 7 comments

glances Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_common.py", line 398, in wrapper return cache[key] KeyError: (('/proc',), frozenset())

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_pslinux.py", line 285, in set_scputimes_ntuple("/proc") File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_common.py", line 400, in wrapper ret = cache[key] = fun(*args, **kwargs) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_pslinux.py", line 268, in set_scputimes_ntuple with open_binary('%s/stat' % procfs_path) as f: File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_common.py", line 727, in open_binary return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE) PermissionError: [Errno 13] Permission denied: '/proc/stat' Error while initializing the network plugin ([Errno 13] Permission denied: '/proc/net/dev') Error while initializing the uptime plugin ([Errno 13] Permission denied: '/proc/stat') Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_common.py", line 398, in wrapper return cache[key] KeyError: (('/proc',), frozenset())

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/data/data/com.termux/files/usr/bin/glances", line 8, in sys.exit(main()) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/init.py", line 179, in main start(config=core.get_config(), args=core.get_args()) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/init.py", line 108, in start mode = GlancesMode(config=config, args=args) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/standalone.py", line 72, in init self.stats.update() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/stats.py", line 216, in update self._plugins[p].update() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/plugins/glances_plugin.py", line 1160, in wrapper ret = fct(self, *args, **kw) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/plugins/glances_plugin.py", line 1177, in wrapper ret = fct(*args, **kw) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/plugins/glances_cpu.py", line 166, in update stats = self.update_local() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/plugins/glances_cpu.py", line 188, in update_local stats['total'] = cpu_percent.get() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/cpu_percent.py", line 51, in get return self.__get_cpu() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/glances/cpu_percent.py", line 88, in __get_cpu self.cpu_percent = psutil.cpu_percent(interval=0.0) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/init.py", line 1751, in cpu_percent t1 = cpu_times() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/init.py", line 1613, in cpu_times return _psplatform.cpu_times() File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_pslinux.py", line 585, in cpu_times set_scputimes_ntuple(procfs_path) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_common.py", line 400, in wrapper ret = cache[key] = fun(*args, **kwargs) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_pslinux.py", line 268, in set_scputimes_ntuple with open_binary('%s/stat' % procfs_path) as f: File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/psutil/_common.py", line 727, in open_binary return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE) PermissionError: [Errno 13] Permission denied: '/proc/stat'

BeeBreeze avatar Aug 20 '22 16:08 BeeBreeze

Is your device rooted ?

nicolargo avatar Aug 21 '22 15:08 nicolargo

Is your device rooted ? yes Screenshot_2022-08-22-09-14-47-35_79207ecbd38cec5b94430de4cca16a09 Screenshot_2022-08-22-09-14-10-08_79207ecbd38cec5b94430de4cca16a09

BeeBreeze avatar Aug 22 '22 01:08 BeeBreeze

Same issue here, rooted as well.

askz avatar Nov 07 '22 14:11 askz

same here. also tried to install with sudo. then running "sudo glances"

~ $ sudo glances
Error opening terminal: unknown.

DocMAX avatar Jul 31 '23 13:07 DocMAX

This issue is stale because it has been open for 3 months with no activity.

github-actions[bot] avatar Jun 22 '24 01:06 github-actions[bot]

This issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution ! :sparkles:

github-actions[bot] avatar Jun 22 '24 07:06 github-actions[bot]