-
Notifications
You must be signed in to change notification settings - Fork 8
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
Issue running solaris_exporter #7
Comments
Hello, |
I investigated.
Old variant:
The latest version of psutil library 5.9.0 is adapted to this behavior, but the latest version of psutil not supports Python 2.7. Please test new version v2022Feb05, I placed it into separate branch forPython3. |
Just tested the python2.7 version - all working well i will move on to test the python3.7 version |
Tested and working on SPARC Solaris 11.4 (11.4.36.101) using python 3.7.10 Many thanks |
Hi,
I have run into a similar issue as seen previously by others with traceback errors when running solaris_exporter.py.
The errors seen are: -
admin@XXXXXX:
/solaris_exporter$ python2 solaris_exporter.py/solaris_exporter$couldn't set locale correctly
Traceback (most recent call last):
File "solaris_exporter.py", line 1040, in
REGISTRY.register(c)
File "/export/home/admin/.local/lib/python2.7/site-packages/prometheus_client/registry.py", line 26, in register
names = self._get_names(collector)
File "/export/home/admin/.local/lib/python2.7/site-packages/prometheus_client/registry.py", line 66, in _get_names
for metric in desc_func():
File "solaris_exporter.py", line 441, in collect
swap = psutil.swap_memory()
File "/export/home/admin/.local/lib/python2.7/site-packages/psutil/init.py", line 2000, in swap_memory
return _psplatform.swap_memory()
File "/export/home/admin/.local/lib/python2.7/site-packages/psutil/_pssunos.py", line 160, in swap_memory
free += int(int(f) * 512)
ValueError: invalid literal for int() with base 10: 'yes'
admin@XXXXXX:
In terms of the system I am trying to run this on, the following shows the environment and the installation process for the various components installed: -
admin@XXXXXX:
$ cat /etc/release$ uname -aOracle Solaris 11.4 SPARC
Copyright (c) 1983, 2021, Oracle and/or its affiliates.
Assembled 15 December 2021
admin@XXXXXX:
SunOS XXXXXX 5.11 11.4.41.107.2 sun4v sparc sun4v non-virtualized
admin@XXXXXX:~$
admin@XXXXXX:
$ export https_proxy=http://www-proxy.us.oracle.com:80$ python2 -m pip install prometheus_clientadmin@XXXXXX:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
couldn't set locale correctly
Collecting prometheus_client
Downloading prometheus_client-0.12.0-py2.py3-none-any.whl (57 kB)
|################################| 57 kB 993 kB/s
Installing collected packages: prometheus-client
Successfully installed prometheus-client-0.12.0
admin@XXXXXX:~$ sudo pkg install pkg:/developer/gcc
Password:
Failed to set locale: unsupported locale setting. Falling back to C.
pkg: Unable to set locale 'en_GB.UTF-8'; locale package may be broken or
not installed. Reverting to C locale.
Packages to install: 19
Mediators to change: 2
Services to change: 1
Create boot environment: No
Create backup boot environment: No
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 19/19 1974/1974 677.7/677.7 35.4M/s
PHASE ITEMS
Installing new actions 2553/2553
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Updating package cache 1/1
admin@XXXXXX:
$ which gcc$ sudo ln -s /usr/bin/gcc /usr/bin/cc/usr/bin/gcc
admin@XXXXXX:
Password:
admin@XXXXXX:
$ export CFLAGS=-m32$ python2 -m pip install psutil==5.7.0admin@XXXXXX:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
couldn't set locale correctly
Collecting psutil==5.7.0
Downloading psutil-5.7.0.tar.gz (449 kB)
|################################| 449 kB 6.4 MB/s
Using legacy 'setup.py install' for psutil, since package 'wheel' is not installed.
Installing collected packages: psutil
Running setup.py install for psutil ... done
Successfully installed psutil-5.7.0
admin@XXXXXX:~$
Can you help and let me know what I've done wrong ?
Steve Dennis
The text was updated successfully, but these errors were encountered: