Kbase 18755: uname, mpsar, and cpusar on SCO UNIX
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/25/2003 |
|
Status: Unverified
GOAL:
How to determine how many CPUs you have in SCO UNIX
GOAL:
How to see the average CPU utilization for each CPU
FACT(s) (Environment):
SCO OpenServer
FIX:
Run the following command to gather information about the machine:
$ uname -X
System = SCO_SV
Node = servername
Release = 3.2v5.0.0
KernelID = 95/08/08
Machine = Pentium
BusType = EISA
Serial = 4DA004009
Users = 30-user
OEM# = 0
Origin# = 1
NumCPU = 2
The last entry states that this machine is running with 2 CPU's.
Run the following command:
mpsar 2 5
mpsar combines the data of all the CPUs, 2 is the interval in seconds and 5 the number of times that mpsar information is displayed.
$ mpsar 2 5
SCO_SV servername 3.2v5.0.0 Pentium 04/15/99
16:50:50 %usr %sys %wio %idle
16:50:52 0 50 0 50
16:50:54 0 50 0 50
16:50:56 0 50 0 50
16:50:58 0 50 2 47
16:51:00 0 50 0 50
Average 0 50 0 49
Use another command to see the information for each CPU
cpusar -u -P1 2 5 (where -P1 is the first system default CPU)
$ cpusar -P1 2 5
SCO_SV servername 3.2v5.0.0 Pentium 04/15/99
17:04:27 %usr %sys %wio %idle
17:04:29 0 0 0 100
17:04:31 0 1 1 98
17:04:33 0 0 0 100
17:04:35 0 0 0 100
17:04:37 0 0 0 100
Average 0 0 0 99
cpusar -P2 2 5 (where -P2 is the second system default CPU)
$ cpusar -P2 2 5
SCO_SV servername 3.2v5.0.0 Pentium 04/15/99
17:05:11 %usr %sys %wio %idle
17:05:13 0 100 0 0
17:05:15 0 100 0 0
17:05:17 0 100 0 0
17:05:19 0 100 0 0
17:05:21 0 100 0 0
Average 0 100 0 0
Use sar in single processor systems.
Use cpusar and mpsar on multiprocessor machines.