[node-patches] Change in ovirt-node[master]: read model name from "/proc/cpuinfo" when miss "Model name" ...

hadong0720 at gmail.com hadong0720 at gmail.com
Wed Aug 13 10:24:33 UTC 2014


hadong has uploaded a new change for review.

Change subject: read model name from "/proc/cpuinfo" when miss "Model name" line of "lscpu" output
......................................................................

read model name from "/proc/cpuinfo" when miss "Model name" line of "lscpu" output

Change-Id: Id397d3c02dcc1c3bf0fa16ea2c9b816fef1e213f
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1129598
Signed-off-by: hadong <hadong at redhat.com>
---
M src/ovirt/node/utils/system.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/42/31442/1

diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 68fac19..459fa72 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -189,6 +189,9 @@
 
     data = process.pipe(["lscpu"])
     cpu = _parse_lscpu(data)
+    if "Model name" not in cpu:
+        cpu["Model name"] = _parse_lscpu(
+            process.pipe(["cat", "/proc/cpuinfo"]))["model name"]
     cpu_details = ("%s: %s" % (f, cpu.get(f, "(Unknown)")) for f in fields)
 
     return "\n".join(cpu_details)


-- 
To view, visit http://gerrit.ovirt.org/31442
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id397d3c02dcc1c3bf0fa16ea2c9b816fef1e213f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>



More information about the node-patches mailing list