diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-30 11:03:50 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-30 11:03:50 -0800 |
commit | 1e70eece00605b7c81ae536c08eac9a4894c4137 (patch) | |
tree | ad8e8e1431a910dadcb59dece754ef4363f1fa89 /scripts | |
parent | b204513bbfbac10a826e485f677c7ed77e342d52 (diff) | |
download | vyatta-op-1e70eece00605b7c81ae536c08eac9a4894c4137.tar.gz vyatta-op-1e70eece00605b7c81ae536c08eac9a4894c4137.zip |
Fix CPU summary
Handle case of UP and virtualized CPU better.
Fix path to script.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-cpu-summary.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/vyatta-cpu-summary.pl b/scripts/vyatta-cpu-summary.pl index 1839a5d..771bc5a 100755 --- a/scripts/vyatta-cpu-summary.pl +++ b/scripts/vyatta-cpu-summary.pl @@ -31,7 +31,9 @@ while (<$cpuinfo>) { } close $cpuinfo; -print "CPU ", join( " \n", keys %models ), "\n"; -print "Packages ", scalar keys %packages, "\n"; -print "Cores ", scalar keys %cores, "\n"; -print "Threads ", $cpu, "\n"; +print "Processors ", $cpu, "\n"; +print "Packages ", scalar keys %packages, "\n" if (%packages); +print "Cores ", scalar keys %cores, "\n" if (%cores); + +# Handle any attempt to run different CPU models +print "Model ", join( " \n", keys %models ), "\n"; |