diff options
author | Chris Chambers <ccgithub@chrischambers.net> | 2015-08-20 14:27:11 -0500 |
---|---|---|
committer | Chris Chambers <ccgithub@chrischambers.net> | 2015-08-20 14:27:11 -0500 |
commit | a4bb1a643918c794cc2511ab9e9a39fbe98a9362 (patch) | |
tree | 41550e340ec43181024e568a544a313829456619 | |
parent | f7ceceef34b1e949d981846d351f3c8e171b2a89 (diff) | |
download | ohai-a4bb1a643918c794cc2511ab9e9a39fbe98a9362.tar.gz |
Make CPU state detection more specific, as it also matched cstate
-rw-r--r-- | lib/ohai/plugins/solaris2/cpu.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/solaris2/cpu.rb b/lib/ohai/plugins/solaris2/cpu.rb index e53d05b1..3225949a 100644 --- a/lib/ohai/plugins/solaris2/cpu.rb +++ b/lib/ohai/plugins/solaris2/cpu.rb @@ -50,7 +50,7 @@ Ohai.plugin(:CPU) do cpu[instance]["mhz"] = value when /brand/ cpu[instance]["model_name"] = value.sub(/\s+/," ") - when /state$/ + when /^state$/ cpu[instance]["state"] = value cpu["cpustates"][value] = 0 if cpu["cpustates"][value].nil? cpu["cpustates"][value] += 1 |