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

Improve CPU name in Quicklook plugin #3127

Open
jaw3l opened this issue Mar 15, 2025 · 5 comments
Open

Improve CPU name in Quicklook plugin #3127

jaw3l opened this issue Mar 15, 2025 · 5 comments

Comments

@jaw3l
Copy link

jaw3l commented Mar 15, 2025

Hi,

I noticed that while all other information is present, the CPU name is still missing. I’m aware that this issue was previously reported in #2616, but I’m still experiencing it while running the application inside a Docker container on an Oracle Cloud VM.

Would appreciate any updates or suggestions. Thanks!

Image


Information about Glances:

Glances version:        4.3.0.7
Glances API version:    4
PsUtil version:         6.1.1
Log file:               /tmp/glances-root.log

/tmp/glances-root.log:

2025-03-15 15:41:43,334 -- INFO -- Start Glances 4.3.0.7
2025-03-15 15:41:43,335 -- INFO -- CPython 3.12.8 (/venv/bin/python3) and psutil 6.1.1 detected
2025-03-15 15:41:43,340 -- INFO -- Read configuration file '/etc/glances/glances.conf'
2025-03-15 15:41:43,342 -- INFO -- Read password from file /root/.config/glances/tk.pwd
2025-03-15 15:41:43,908 -- INFO -- Start GlancesWebServer mode
2025-03-15 15:41:43,937 -- WARNING -- Sparklines module not found (No module named 'sparklines')
2025-03-15 15:41:43,951 -- WARNING -- Missing Python Lib (No module named 'pymdstat'), Raid plugin is disabled
2025-03-15 15:41:43,982 -- WARNING -- Missing Python Lib (No module named 'netifaces'), IP plugin is disabled  2025-03-15 15:41:43,986 -- WARNING -- Missing Python Lib (No module named 'pySMART'), HDD Smart plugin is disabled
2025-03-15 15:41:44,499 -- INFO -- Glances Web User Interface started on http://0.0.0.0:61208/
2025-03-15 15:41:44,499 -- INFO -- Glances RESTful API Server started on http://0.0.0.0:61208/api/4
2025-03-15 15:41:44,513 -- INFO -- Autodiscover is enabled with service name venus
2025-03-15 15:41:44,514 -- ERROR -- Cannot announce Glances server on the network: zeroconf library not found.

docker compose file:

services:
  glances:                                                                                                         
    image: nicolargo/glances:latest
    container_name: glances
    restart: unless-stopped
    pid: host
    network_mode: host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/os-release:/etc/os-release:ro
    environment:
      - "GLANCES_OPT=-w -u tk --password"
    secrets:
      - source: secret                                                                                                 
      - target: /root/.config/glances/tk.pwd
    labels:
      - com.centurylinklabs.watchtower.enable=true

secrets:
  secret:
    file: secret
@nicolargo
Copy link
Owner

Hi @jaw3l

Glances try to read CPU name from the /proc/cpuinfo file. Please can you cat this file inside your container ?

Thanks !

@nicolargo nicolargo added this to the Glances 4.3.1 milestone Mar 16, 2025
@jaw3l
Copy link
Author

jaw3l commented Mar 16, 2025

Sorry, I forgot to post it.

/proc/cpuinfo

processor       : 0
BogoMIPS        : 50.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x3
CPU part        : 0xd0c
CPU revision    : 1

processor       : 1
BogoMIPS        : 50.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x3
CPU part        : 0xd0c
CPU revision    : 1

processor       : 2
BogoMIPS        : 50.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x3
CPU part        : 0xd0c
CPU revision    : 1

processor       : 3
BogoMIPS        : 50.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x3
CPU part        : 0xd0c
CPU revision    : 1

@nicolargo
Copy link
Owner

Glances can not find any information regarding the CPU name in this file, so it display "CPU" per default. Is there another file in the /etc folder with a exploitable information ?

@jaw3l
Copy link
Author

jaw3l commented Mar 17, 2025

I might be wrong, but I don't think so.

I researched a bit to figure out how lscpu obtains that information and found out they use predefined lookup tables to map CPU implementer and CPU part.

For example, in my case according to lscpu-arm.c:

  • CPU implementer 0x41 is mapped to ARM
  • CPU part 0xd0c is mapped to Neoverse-N1

@nicolargo nicolargo changed the title Empty CPU name on Oracle Cloud VM Improve CPU name in Quicklook plugin Mar 22, 2025
Copy link

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

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

2 participants