Browse Source

Fix line print

On the last awk command, line containing "yes"
were printed two times.
pull/2/head
Alexis Ben Miloud--Josselin 8 months ago
parent
commit
20cecaa77a
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      kvmstats

+ 1
- 1
kvmstats View File

@@ -57,7 +57,7 @@ do
echo "$VM" "$CPU" "$RAM" "$DSK" "$RUN"
done | (
echo vm vcpu ram disk running
awk '{ print } /yes$/ { print; vcpu += $2; ram += $3; disk += $4; running++ } END { print "TOTAL(running)", vcpu, ram, disk, running }'
awk '{ print } /yes$/ { vcpu += $2; ram += $3; disk += $4; running++ } END { print "TOTAL(running)", vcpu, ram, disk, running }'
if [ "$SHOW_AVAIL" ]
then
AV_CPU=$(awk '/^processor/ { cpu++ } END { print cpu }' /proc/cpuinfo)

Loading…
Cancel
Save