Problem
The script /usr/lib/sa2 greps for the wrong number of CPUs when run
on either a multiprocessor or single-processor. It also increases
the number of CPUs by one, which causes an extra iteration in the
while loop statement. Solution
This problem is resolved in SCO OpenServer 5.0.5.
As a workaround for OpenServer 5.0.4, using your favorite editor, edit the /usr/lib/sa/sa2 file.
Change the following line:A_CPUS=`cat /dev/string/cfg | grep "CPU.*type=" | wc -l`to:CPUS=`cat /dev/string/cfg | grep -i "CPU.*type=" | wc -l | sed 's/ //g'`and delete the line:CPU=`expr $A_CPUS + 1` See also
manual pages: sar(ADM), cpusar(ADM), mpsar(ADM), sa1(ADM), sadc(ADM)ta104892, "Try to run sar, get: 'sar: Can't open /usr/adm/sa/saXX'."