Stan Hu

Results 227 comments of Stan Hu

Note that `lscpu` can list multiple CPUs if there are available, so I think the parser needs to be updated with that in mind. `lscpu` can output in JSON format...

It seems `lscpu` v2.37 changed the output to use these sections: https://github.com/util-linux/util-linux/commit/91eef60ca33e1fb0a7be36a5c2a67f1a650feba7 The `lscpu -J` output on Ubuntu 22.04: ```json { "lscpu": [ { "field": "Architecture:", "data": "aarch64", "children": [...

The documentation does say: > The output for non-terminals (e.g., pipes) is never affected by this optimization and it is always in "Field: data\\n" format. Use for example `lscpu |...

Here is the `lscpu` output piped to a file: [lscpu-rpi4.json.txt](https://github.com/chef/ohai/files/9214397/lscpu-rpi4.json.txt) [lscpu-rpi4.txt](https://github.com/chef/ohai/files/9214398/lscpu-rpi4.txt)

> Please update the description to show why the default cpu is configurable. @johnmccrae Could you elaborate? I don't quite understand.

https://github.com/chef/ohai/pull/1761 might be an alternative solution: if we get 0, give up and use `/proc/cpuinfo`.

@jaymzh Oh, right, thanks. It's been a while since I worked on this so I forgot that I did that. Updated. 😄

> Thanks. Looks good, minus the lint failures. Can you run the rubocop autocorrecting rake task? @tpowell-progress is trying to find the exact command. I manually corrected them. Running `git...

We ran into this as well, and it caused test failures because a test that ran `Rails.application.load_tasks` and then `Rake.application.rake_require 'some/task'` would run twice. Alternative, should `@actions` be defined as...

What's even weirder is that if I do a lookup **before** running `repo.config.each_key`, the cache seems to get flushed. This returns the right result for 0.28.0: ```ruby require 'rugged' repo...