-
Notifications
You must be signed in to change notification settings - Fork 453
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
lscpu on Debian VM on ARM system crashes CPU plugin #1805
Comments
This is due to a newer version of util-linux (>= 2.37.0) changing the formatting:
This is also breaking on RHEL >= 9 and Ubuntu >= 22.04. I am working on creating a PR to resolve this. |
Starting in util-linux v2.36, the output of lscpu changed which introduced some bugs in some platforms. To work around this, the previous output can be retained if the lscpu command is piped to something else. To work around that, this just pipes the output to cat. This fixes chef#1805 Signed-off-by: Lance Albertson <[email protected]>
Description
Running
lscpu
on a Debian (or other linux) VM on an arm64 system (for example an Apple M2 system) does not output the lineCore(s) per socket
but outputsCore(s) per cluster
. BecauseCore(s) per socket
is not in the output the line calculating the number of cpus crashes:The output of a Debian 12 VM on an amd64 system gives (truncated to relevant part):
The output of
lscpu
on a Debian 12 VM on an arm64 system (in a Debian VM) gives (truncated to relevant part):Ohai Version
Platform Version
Debian 12 on a Apple M2 Macbook Pro.
Ohai Output
I've added some debug output at line 196 of the CPU plugin:
This results in:
The text was updated successfully, but these errors were encountered: