mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
cpu-parse: Move model name detection to new script
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2933047c02
commit
29584c4a48
@ -196,6 +196,7 @@ def parse(args):
|
|||||||
data = json.load(sys.stdin)
|
data = json.load(sys.stdin)
|
||||||
|
|
||||||
os.environ["CPU_GATHER_PY"] = "true"
|
os.environ["CPU_GATHER_PY"] = "true"
|
||||||
|
os.environ["model"] = data["name"]
|
||||||
output = subprocess.check_output(
|
output = subprocess.check_output(
|
||||||
"./cpu-parse.sh",
|
"./cpu-parse.sh",
|
||||||
input=output_to_text(data),
|
input=output_to_text(data),
|
||||||
|
@ -7,8 +7,6 @@ fi
|
|||||||
|
|
||||||
data=`cat`
|
data=`cat`
|
||||||
|
|
||||||
model=`sed -ne '/^model name[ ]*:/ {s/^[^:]*: \(.*\)/\1/p; q}' <<<"$data"`
|
|
||||||
|
|
||||||
fname=`sed -e 's/^ *//;
|
fname=`sed -e 's/^ *//;
|
||||||
s/ *$//;
|
s/ *$//;
|
||||||
s/[ -]\+ \+/ /g;
|
s/[ -]\+ \+/ /g;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user