mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
branch one, openbsd tests
This commit is contained in:
parent
0443e0e046
commit
034015fcb3
23
inxi
23
inxi
|
@ -5,7 +5,7 @@
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### Version: 2.2.5
|
#### Version: 2.2.5
|
||||||
#### Date: 2014-09-17
|
#### Date: 2014-09-17
|
||||||
#### Patch Number: 02-b1
|
#### Patch Number: 03-b1
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -4025,13 +4025,13 @@ get_cpu_data_bsd()
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
}
|
}
|
||||||
$1 ~ /^(CPU|cpu0)$/ {
|
$1 ~ /^(CPU|cpu0)$/ {
|
||||||
if ( $NF ~ /[^0-9][0-9]+[-[:space:]]*[MG]Hz/) {
|
if ( $NF ~ /[^0-9][0-9\.]+[-[:space:]]*[MG]Hz/) {
|
||||||
max=gensub(/.*[^0-9]([0-9]+[-[:space:]]*[MG]Hz).*/,"\\1",1,$NF)
|
max=gensub(/.*[^0-9]([0-9\.]+[-[:space:]]*[MG]Hz).*/,"\\1",1,$NF)
|
||||||
if (max ~ /MHz/) {
|
if (max ~ /MHz/) {
|
||||||
sub(/[[:space:]]*MHz/,"",max)
|
sub(/[-[:space:]]*MHz/,"",max)
|
||||||
}
|
}
|
||||||
if (max ~ /GHz/) {
|
if (max ~ /GHz/) {
|
||||||
sub(/[[:space:]]*GHz/,"",max)
|
sub(/[-[:space:]]*GHz/,"",max)
|
||||||
max=max*1000
|
max=max*1000
|
||||||
}
|
}
|
||||||
print max
|
print max
|
||||||
|
@ -4064,13 +4064,13 @@ get_cpu_data_bsd()
|
||||||
if ( $NF ~ /[0-9]+[[:space:]]*[KM]B[[:space:]]+L2 cache/) {
|
if ( $NF ~ /[0-9]+[[:space:]]*[KM]B[[:space:]]+L2 cache/) {
|
||||||
cpuCache=gensub(/.*[^0-9]([0-9]+[[:space:]]*[KM]B)[[:space:]]+L2 cach.*/,"\\1",1,$NF)
|
cpuCache=gensub(/.*[^0-9]([0-9]+[[:space:]]*[KM]B)[[:space:]]+L2 cach.*/,"\\1",1,$NF)
|
||||||
}
|
}
|
||||||
if ( $NF ~ /[^0-9][0-9]+[-[:space:]]*[MG]Hz/) {
|
if ( $NF ~ /[^0-9][0-9\.]+[-[:space:]]*[MG]Hz/) {
|
||||||
max=gensub(/.*[^0-9]([0-9]+[-[:space:]]*[MG]Hz).*/,"\\1",1,$NF)
|
max=gensub(/.*[^0-9]([0-9\.]+[-[:space:]]*[MG]Hz).*/,"\\1",1,$NF)
|
||||||
if (max ~ /MHz/) {
|
if (max ~ /MHz/) {
|
||||||
sub(/[[:space:]]*MHz/,"",max)
|
sub(/[-[:space:]]*MHz/,"",max)
|
||||||
}
|
}
|
||||||
if (max ~ /GHz/) {
|
if (max ~ /GHz/) {
|
||||||
sub(/[[:space:]]*GHz/,"",max)
|
sub(/[-[:space:]]*GHz/,"",max)
|
||||||
max=max*1000
|
max=max*1000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4115,9 +4115,12 @@ get_cpu_data_bsd()
|
||||||
if ( cpuMax != "" ) {
|
if ( cpuMax != "" ) {
|
||||||
max=cpuMax
|
max=cpuMax
|
||||||
}
|
}
|
||||||
|
if ( cpuClock == "" ) {
|
||||||
|
cpuClock="N/A"
|
||||||
|
}
|
||||||
print cpuModel "," cpuClock "," cpuCache "," cpuFlags "," cpuBogomips "," cpuVendor
|
print cpuModel "," cpuClock "," cpuCache "," cpuFlags "," cpuBogomips "," cpuVendor
|
||||||
# triggers print case
|
# triggers print case
|
||||||
print "N/A," min "," max
|
print cpuClock "," min "," max
|
||||||
}' <<< "$Sysctl_a_Data" ) )
|
}' <<< "$Sysctl_a_Data" ) )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue