CPU [Solaris]: Truncate garbage output in SPARC systems

This commit is contained in:
Muhammad Herdiansyah 2017-06-09 23:36:25 +07:00
parent 76399f55da
commit 04bdb70227

View file

@ -949,6 +949,7 @@ get_cpu() {
cpu="${cpu//*$'\n'}"
cpu="${cpu/[0-9]\.*}"
cpu="${cpu/ @*}"
cpu="${cpu/\(portid*}"
# Get CPU speed.
speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')"