-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Raspberry PI - CPU info is not correct #2616
Comments
Perhaps in /proc/device-tree/model ? @jslegers73 can you have a look ? |
@nicolargo this is the result |
I have the same issue on an Oracle Cloud VM:
Obviously not much of this is useful but
|
Same here @nicolargo:
|
Hi, I have tried the new version 4 and it is still showing the number 8. |
return 8 because /proc/cpuinfo line 5:
On Raspberry, it is on line 1:
Better solution is to grab the first "model name" line. |
Pushed on the develop branch. Should be ok for Raspberry. |
Not possible to use lscpu because it is language dependent. For example on my french system, it returns:
|
@jslegers73 can you test the develop branch on your Raspberry and confirm that the issue is can be closed ? |
Hi @nicolargo I have checked it on both a Raspberry Pi 4 and 5 both are still showing 8. Using version 4.0.7. |
@jslegers73 The version 4.0.7 is not the develop branch (https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version) |
@nicolargo Sorry for that. I have tried it with your instructions on a clean install of the RPI OS. But I get errors : pi@rpi-test:~ $ mkdir ~/tmp
cd ~/tmp
git clone -b develop https://github.com/nicolargo/glances.git
cd ~/tmp/glances
git checkout develop
Cloning into 'glances'...
remote: Enumerating objects: 36885, done.
remote: Counting objects: 100% (3869/3869), done.
remote: Compressing objects: 100% (1005/1005), done.
remote: Total 36885 (delta 2612), reused 3575 (delta 2460), pack-reused 33016
Receiving objects: 100% (36885/36885), 40.40 MiB | 23.49 MiB/s, done.
Resolving deltas: 100% (26196/26196), done.
Already on 'develop'
Your branch is up to date with 'origin/develop'.
pi@rpi-test:~/tmp/glances $ cd ~/tmp/glances
make venv
virtualenv -p /usr/bin/python3 venv
make: virtualenv: No such file or directory
make: *** [Makefile:24: venv-full-python] Error 127
pi@rpi-test:~/tmp/glances $ cd ~/tmp/glances
make test
./venv/bin/python ./unittest-core.py
make: ./venv/bin/python: No such file or directory
make: *** [Makefile:67: test-core] Error 127
pi@rpi-test:~/tmp/glances $ cd ~/tmp/glances
make run-webserver
./venv/bin/python -m glances -C ./conf/glances.conf -w
make: ./venv/bin/python: No such file or directory
make: *** [Makefile:267: run-webserver] Error 127
|
You miss the first chapter: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version#install-pre-resquisites |
This is what I have done. pi@rpi-test:~ $ pip install --user virtualenv
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
For more information visit http://rptl.io/venv
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
pi@rpi-test:~ $ apt install python-dev
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
pi@rpi-test:~ $ sudo apt install python-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python-dev-is-python3
E: Package 'python-dev' has no installation candidate
pi@rpi-test:~ $ ^C
pi@rpi-test:~ $ sudo apt install python-dev-is-python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-6.6.20+rpt-common-rpi linux-headers-6.6.20+rpt-rpi-2712 linux-headers-6.6.20+rpt-rpi-v8
linux-image-6.6.20+rpt-rpi-2712 linux-image-6.6.20+rpt-rpi-v8 linux-kbuild-6.6.20+rpt
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
python-dev-is-python3
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,364 B of archives.
After this operation, 13.3 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main arm64 python-dev-is-python3 all 3.11.1-3 [1,364 B]
Fetched 1,364 B in 0s (71.1 kB/s)
Selecting previously unselected package python-dev-is-python3.
(Reading database ... 98836 files and directories currently installed.)
Preparing to unpack .../python-dev-is-python3_3.11.1-3_all.deb ...
Unpacking python-dev-is-python3 (3.11.1-3) ...
Setting up python-dev-is-python3 (3.11.1-3) ...
Processing triggers for man-db (2.11.2-2) ...
pi@rpi-test:~ $ mkdir ~/tmp
|
apt install python-dev |
Raspberry Bookworm has changed the usage of PIP. I will check it with an older version of Raspbian to see if I get it to work. My production is running on bookworm so can't check there. |
I have some issues with running an older version of the OS for my Pi. Still trying to figure out how to fix it. |
I have tried it with python -m venv .env and try the steps but still get the error :
Sorry I can't test it for you. |
I can give it a go on a Pi 2 but is there a way to run the develop version on a different port? |
@jslegers73 @lnlyssg @jslegers73 The fixes should be available in version 4.0.8, so you can go ahead and use that. Closing the issue as it's resolved. |
Hi I have tested it with version 4.0.8 but it still shows an empty CPU And this is on on a raspberry pi 4. |
I have tried it on a debian bullseye container but still get the file not found error on the develop version : make venv Sorry that I could not test it. |
Could you just try the below commands after cloning the repo: python3 -m venv venv
./venv/bin/python -m pip install -r requirements.txt
./venv/bin/python -m glances |
@RazCrimson thank you that did the trick. It shows the CPU Frequency. |
Could you try |
This is the result on a Raspberry Pi 4:
Hope it helps @RazCrimson... |
This is a Pi 5 `pi@pi-plex:~ $ cat /proc/cpuinfo processor : 1 processor : 2 processor : 3 Revision : c04170 |
@jslegers73 @juanmanuelbc Here are the steps if you are new to using git: Just open the cloned repo, run the below before running glances git fetch
git checkout origin/2616-raspberry-pi-cpu-info-is-not-correct Ignore any detached HEAD warnings from git caused by the last command and just run glances To revert back git checkout develop |
I can confirm that with the latest version both on a Pi4 and Pi5 it works. Thanks. |
Discussed in #2615
Originally posted by jslegers73 December 8, 2023
Hello,
I have a question what does the 8 mean?
The text was updated successfully, but these errors were encountered: