- Notifications
You must be signed in to change notification settings - Fork923
Description
I do not know how to fix this in the code, but I've done some research to describe my issue.
Coder Information
Version: 2.16.1
Environment: Nomad Cluster
Hardware: Turing PI Cluster Board
Hardware Modules:
- 3 RK1 Modules
- 1 Nvidia Orin NX
Issue
The reported amount of cores needs to be corrected.
The hardware has eight cores total, and for the workspace, one core is allocated to the workspace.
This issue is that for the metadatacoder stat cpu
it reports the correct amount of cores, however for the--host
cores I was expecting it to report /8 cores, instead of 1.
Analysis
So, I reached this, and to my knowledge, Golang NumProc returns the number of logical CPUs. I think that for the workspace, this is fine, as seen in the screenshot for the left meta key. However, for the host, I think the value of the cli toolnproc --all
should be used, or the cgroup or /proc or whatever returns the actual number of cores of the CPU if theproc
command is not available.
I hope my analysis is sufficient to have somebody look at this and fix it.
Screenshot:
P.S.
If you are wondering why the `filebrowser' shows the correct icon, I also posted an issue about it349. I wrote my own terraform module, which uses the raw GitHub link of the file browser repo to show the correct icon.