CPU Information

Monitoring the CPU Core Usage

To monitor the current load of each CPU Core, you can use top oder systat:
$ top -P
last pid: 12416;  load averages:  2.11,  1.86,  1.69                                                        up 2+13:13:54  14:14:20 153 processes: 4 running, 148 sleeping, 1 zombie CPU 0: 13.5% user,  0.0% nice,  1.5% system,  0.0% interrupt, 85.0% idle CPU 1:  0.4% user,  0.0% nice,  0.0% system,  1.5% interrupt, 98.1% idle CPU 2:  5.3% user,  0.0% nice,  1.9% system,  0.0% interrupt, 92.9% idle CPU 3: 11.3% user,  4.1% nice,  1.9% system,  0.0% interrupt, 82.7% idle CPU 4: 47.4% user,  0.0% nice,  9.4% system,  0.0% interrupt, 43.2% idle CPU 5:  0.4% user,  6.4% nice,  0.0% system,  0.0% interrupt, 93.2% idle CPU 6:  0.4% user,  0.0% nice,  0.7% system,  0.0% interrupt, 98.9% idle CPU 7:  0.0% user,  0.0% nice,  0.7% system,  0.0% interrupt, 99.3% idle Mem: 1140M Active, 2057M Inact, 422M Wired, 70M Cache, 214M Buf, 248M Free Swap: 8192M Total, 136K Used, 8192M Free PID USERNAME   THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND 1227 mysql       27   4    0  1039M   698M sbwait 4   0:02 101.42% mysqld
$ top -S
last pid: 12530;  load averages:  1.99,  1.89,  1.72                                                        up 2+13:15:01  14:15:27 208 processes: 11 running, 179 sleeping, 18 waiting CPU:  4.9% user, 11.7% nice,  2.3% system,  0.2% interrupt, 80.8% idle Mem: 1145M Active, 2083M Inact, 419M Wired, 64M Cache, 214M Buf, 227M Free Swap: 8192M Total, 136K Used, 8192M Free PID USERNAME   THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND 11 root         1 171 ki31     0K    16K CPU7   7  48.3H 98.39% idle: cpu7 14 root         1 171 ki31     0K    16K CPU4   4  47.7H 98.29% idle: cpu4 13 root         1 171 ki31     0K    16K CPU5   5  48.6H 96.48% idle: cpu5 15 root         1 171 ki31     0K    16K CPU3   3  45.9H 94.87% idle: cpu3 17 root         1 171 ki31     0K    16K CPU1   1  45.1H 88.96% idle: cpu1 16 root         1 171 ki31     0K    16K RUN    2  43.6H 70.26% idle: cpu2 12 root         1 171 ki31     0K    16K CPU6   6  48.8H 65.38% idle: cpu6 18 root         1 171 ki31     0K    16K RUN    0  34.4H 63.87% idle: cpu0 1227 mysql       26  50    0  1039M   698M ucond  2   0:09 58.89% mysqld 46 root         1 104    –     0K    16K ipmire 0 113:21  7.28% ipmi0: kcs 12525 www          1  20    0   132M 23000K lockf  5   0:00  2.10% httpd
 
$ systat
               /0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
Load Average   |||||||
               /0%  /10  /20  /30  /40  /50  /60  /70  /80  /90  /100

root     idle: cpu7 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu5 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu1 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu3 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root     idle: cpu0 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
mysql        mysqld XXXXXXXXXXX
mysql        mysqld XXXXXXXXX
mysql        mysqld XXXXXX
mysql        mysqld XXXXXX
mysql        mysqld XXXXX
mysql        mysqld XXXXX
mysql        mysqld XXXXX
mysql        mysqld XXXX
www           httpd XX
root          rsync X
www           httpd X
 

Getting CPU Model / Speed in FreeBSD

If you would like to get more information about the CPU on your server – such as model and speed, you can use the following commands:
# sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu|hw.clockrate'
Output:
hw.machine: amd64 hw.model: Intel(R) Atom(TM) CPU D510   @ 1.66GHz hw.ncpu: 4 hw.machine_arch: amd64 hw.clockrate: 1673
You can also use dmesg for more detailed information:
# grep -i cpu /var/run/dmesg.boot
Output:
CPU: Intel(R) Atom(TM) CPU D510   @ 1.66GHz (1673.34-MHz K8-class CPU) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs cpu0 (BSP): APIC ID:  0 cpu1 (AP/HT): APIC ID:  1 cpu2 (AP): APIC ID:  2 cpu3 (AP/HT): APIC ID:  3 cpu0: <ACPI CPU> on acpi0 cpu1: <ACPI CPU> on acpi0 cpu2: <ACPI CPU> on acpi0 cpu3: <ACPI CPU> on acpi0 p4tcc0: <CPU Frequency Thermal Control> on cpu0 p4tcc1: <CPU Frequency Thermal Control> on cpu1 p4tcc2: <CPU Frequency Thermal Control> on cpu2 p4tcc3: <CPU Frequency Thermal Control> on cpu3 SMP: AP CPU #1 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #2 Launched!
  • *

    You may use these HTML tags: <a> <abbr> <acronym> <b> <blockquote> <cite> <code> <del> <em> <i> <q> <s> <strike> <strong>

  • Comment Feed for this Post
Go to Top