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

Glances error after installing on Windows 10 WSL Kali Linux #1485

Open
johnsparkmytech opened this issue May 17, 2019 · 2 comments
Open

Glances error after installing on Windows 10 WSL Kali Linux #1485

johnsparkmytech opened this issue May 17, 2019 · 2 comments

Comments

@johnsparkmytech
Copy link

Before filling this issue, please read the manual (https://glances.readthedocs.io/en/latest/) and search if the bug do not already exists in the database (https://github.com/nicolargo/glances/issues).

Description

For a bug: Describe the bug and list the steps you used when the issue occurred.

After installing Glances in Windows 10 WSL Kali Linux I receive this error message.
It looks like I possibly need the Docker package?
As well as several plug-ins?

sparkla@JohnMorris-LPC:/etc$ glances
Traceback (most recent call last):
File "/usr/bin/glances", line 11, in
load_entry_point('Glances==3.1.0', 'console_scripts', 'glances')()
File "/usr/lib/python3/dist-packages/glances/init.py", line 140, in main
start(config=config, args=args)
File "/usr/lib/python3/dist-packages/glances/init.py", line 106, in start
mode = GlancesMode(config=config, args=args)
File "/usr/lib/python3/dist-packages/glances/standalone.py", line 74, in init
self.stats.update()
File "/usr/lib/python3/dist-packages/glances/stats.py", line 222, in update
self._plugins[p].update()
File "/usr/lib/python3/dist-packages/glances/plugins/glances_plugin.py", line 914, in wrapper
ret = fct(self, *args, **kw)
File "/usr/lib/python3/dist-packages/glances/plugins/glances_plugin.py", line 923, in wrapper
ret = fct(*args, **kw)
File "/usr/lib/python3/dist-packages/glances/plugins/glances_fs.py", line 99, in update
fs_stat = psutil.disk_partitions(all=False)
File "/usr/lib/python3/dist-packages/psutil/init.py", line 2095, in disk_partitions
return _psplatform.disk_partitions(all)
File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1168, in disk_partitions
partitions = cext.disk_partitions(mtab_path)
FileNotFoundError: [Errno 2] No such file or directory: '/etc/mtab'

For an enhancement or new feature: Describe your needs.

Versions

  • Glances & psutil (glances -V): 3.1.0-1
  • Operating System (lsb_release -a): Kali Linux 4.4.0-17763-Microsoft (Windows 10 WSL)

Logs

sparkla@JohnMorris-LPC:/tmp$ cat glances-sparkla.log
2019-05-17 10:07:40,055 -- INFO -- Start Glances 3.1.0
2019-05-17 10:07:40,055 -- INFO -- CPython 3.7.3rc1 and psutil 5.5.1 detected
2019-05-17 10:07:40,066 -- INFO -- Search glances.conf file in /home/sparkla/.config/glances/glances.conf
2019-05-17 10:07:40,067 -- INFO -- Search glances.conf file in /etc/glances/glances.conf
2019-05-17 10:07:40,073 -- INFO -- Read configuration file '/etc/glances/glances.conf'
2019-05-17 10:07:40,105 -- INFO -- Start GlancesStandalone mode
2019-05-17 10:07:40,354 -- WARNING -- Missing Python Lib (No module named 'pynvml'), Nvidia GPU plugin is disabled
2019-05-17 10:07:40,608 -- WARNING -- Missing Python Lib (No module named 'cpuinfo'), Quicklook plugin will not display CPU info
2019-05-17 10:07:40,609 -- WARNING -- Missing Python Lib (No module named 'pymdstat'), Raid plugin is disabled
2019-05-17 10:07:40,615 -- WARNING -- Missing Python Lib (No module named 'pySMART'), HDD Smart plugin is disabled
2019-05-17 10:07:40,621 -- WARNING -- Missing Python Lib (No module named 'wifi'), Wifi plugin is disabled
2019-05-17 10:07:40,621 -- WARNING -- Wifi lib is not compliant with Python 3, Wifi plugin is disabled
2019-05-17 10:07:40,628 -- ERROR -- docker plugin - Cannot get Docker version (('Connection aborted.', FileNotFoundError(2, 'No such file or directory')))
2019-05-17 10:09:11,497 -- INFO -- Start Glances 3.1.0
2019-05-17 10:09:11,498 -- INFO -- CPython 3.7.3rc1 and psutil 5.5.1 detected
2019-05-17 10:09:11,503 -- INFO -- Search glances.conf file in /home/sparkla/.config/glances/glances.conf
2019-05-17 10:09:11,504 -- INFO -- Search glances.conf file in /etc/glances/glances.conf
2019-05-17 10:09:11,507 -- INFO -- Read configuration file '/etc/glances/glances.conf'
2019-05-17 10:09:11,525 -- INFO -- Start GlancesStandalone mode
2019-05-17 10:09:11,759 -- WARNING -- Missing Python Lib (No module named 'pynvml'), Nvidia GPU plugin is disabled
2019-05-17 10:09:11,974 -- WARNING -- Missing Python Lib (No module named 'cpuinfo'), Quicklook plugin will not display CPU info
2019-05-17 10:09:11,975 -- WARNING -- Missing Python Lib (No module named 'pymdstat'), Raid plugin is disabled
2019-05-17 10:09:11,978 -- WARNING -- Missing Python Lib (No module named 'pySMART'), HDD Smart plugin is disabled
2019-05-17 10:09:11,981 -- WARNING -- Missing Python Lib (No module named 'wifi'), Wifi plugin is disabled
2019-05-17 10:09:11,981 -- WARNING -- Wifi lib is not compliant with Python 3, Wifi plugin is disabled
2019-05-17 10:09:11,986 -- ERROR -- docker plugin - Cannot get Docker version (('Connection aborted.', FileNotFoundError(2, 'No such file or directory')))

You can also pastebin the Glances logs file (https://glances.readthedocs.io/en/latest/config.html#logging)

@nicolargo
Copy link
Owner

Hi @johnsparkmytech

The problem did not came from the missing Docker lib.

It is a PsUtil error. PsUtil try to read the /etc/mtab, but did not succes.
For the moment, PsUtil is not compatible with Windows WSL.

Follow this feature request: giampaolo/psutil#1251

cc: @giampaolo

@jorjoris25
Copy link

Please try the below:

###run the below with root user

dnf remove glances-3.1.0-2.fc31.noarch
dnf install glances

pip install --upgrade glances
dnf install pip
pip install --upgrade pip
pip install --upgrade glances
pip install --upgrade psutil

###exit from root user
###try to run glances with your "simple user"
###login with root and try to run glances
*This worked for me

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