>Synopsis: top cpu usage is wrong before first refresh >Category: system >Environment: System : OpenBSD 5.9 Details : OpenBSD 5.9 (GENERIC.MP) #1888: Fri Feb 26 01:20:19 MST 2016 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64 Machine : amd64 >Description: top command reports wrong CPU usage before being refreshed after the delay. This is problematic in batch mode because the output is always wrong >How-To-Repeat: top -1b always display the same cpu usage using top in interactive mode also always display wrong cpu usage before being refreshed (same cpu usage as batch mode) >Fix: I don't have a fix dmesg: OpenBSD 5.9 (GENERIC.MP) #1888: Fri Feb 26 01:20:19 MST 2016 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 8495271936 (8101MB) avail mem = 8233607168 (7852MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdcbff000 (39 entries) bios0: vendor TOSHIBA version "Version 3.30" date 02/05/2014 bios0: TOSHIBA PORTEGE Z30-A acpi0 at bios0: rev 0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP HPET APIC MCFG ASF! TCPA BOOT MSDM SLIC DBGP SSDT SSDT SSDT SSDT SSDT SSDT SSDT FPDT acpi0: wakeup devices GLAN(S4) EHC1(S3) XHC_(S3) HDEF(S3) PXSX(S3) PWRB(S4) LID_(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz, 1496.76 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz, 1496.54 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0 cpu2 at mainbus0: apid 2 (application processor) cpu2: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz, 1496.54 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 1, package 0 cpu3 at mainbus0: apid 3 (application processor) cpu3: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz, 1496.54 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 1, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEGP) acpiprt2 at acpi0: bus 2 (RP03) acpiprt3 at acpi0: bus 1 (RP06) acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpipwrres0 at acpi0: PDOC, resource for DOCK acpitz0 at acpi0: critical temperature is 102 degC acpitoshiba0 at acpi0 acpiac0 at acpi0: AC unit offline acpibtn0 at acpi0: PWRB acpibtn1 at acpi0: LID_ acpibat0 at acpi0: BAT1 model "G71C000G7110" serial 0 type Li-ION oem "0" acpidock0 at acpi0: DOCK not docked (0) cpu0: Enhanced SpeedStep 1496 MHz: speeds: 2301, 2300, 2200, 2100, 2000, 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1000, 900, 800, 759 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x09 inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x09 drm0 at inteldrm0 inteldrm0: msi inteldrm0: 1366x768 wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added (std, vt100 emulation) azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x09: msi xhci0 at pci0 dev 20 function 0 "Intel 8 Series xHCI" rev 0x04: msi usb0 at xhci0: USB revision 3.0 uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1 "Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured em0 at pci0 dev 25 function 0 "Intel I218-V" rev 0x04: msi, address b8:6b:23:51:ea:77 azalia1 at pci0 dev 27 function 0 "Intel 8 Series HD Audio" rev 0x04: msi azalia1: codecs: Realtek/0x0283 audio0 at azalia1 ppb0 at pci0 dev 28 function 0 "Intel 8 Series PCIE" rev 0xe4: msi pci1 at ppb0 bus 1 rtsx0 at pci1 dev 0 function 0 "Realtek RTS5227 Card Reader" rev 0x01: msi sdmmc0 at rtsx0 ppb1 at pci0 dev 28 function 2 "Intel 8 Series PCIE" rev 0xe4: msi pci2 at ppb1 bus 2 iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 3160" rev 0x83, msi ehci0 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 2 int 23 usb1 at ehci0: USB revision 2.0 uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1 pcib0 at pci0 dev 31 function 0 "Intel 8 Series LPC" rev 0x04 ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi, AHCI 1.3 ahci0: port 0: 6.0Gb/s scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, TOSHIBA THNSNJ12, JUT1> SCSI3 0/direct fixed naa.500080d9100da278 sd0: 122104MB, 512 bytes/sector, 250069680 sectors, thin isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 error: [drm:pid0:intel_uncore_check_errors] *ERROR* Unclaimed register before interrupt uhub2 at uhub0 port 6 "Genesys Logic USB2.0 Hub" rev 2.00/85.37 addr 2 ugen0 at uhub2 port 2 "Validity Sensors product 0x0010" rev 1.10/0.78 addr 3 uhub3 at uhub2 port 3 "O2 Micro OZ776 Hub" rev 1.10/1.10 addr 4 ugen1 at uhub3 port 2 "O2 O2Micro CCID SC Reader" rev 1.10/1.10 addr 5 uvideo0 at uhub0 port 7 configuration 1 interface 0 "Chicony Electronics Co.,Ltd. TOSHIBA Web Camera - FHD" rev 2.00/83.73 addr 6 video0 at uvideo0 uhub4 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.04 addr 2 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd0a (56dcd8397df7c6fd.a) swap on sd0b dump on sd0b iwm0: hw rev 0x160, fw ver 25.228 (API ver 9), address a0:88:69:79:52:57 usbdevs: Controller /dev/usb0: addr 1: super speed, self powered, config 1, xHCI root hub(0x0000), Intel(0x8086), rev 1.00 port 1 addr 7: low speed, power 100 mA, config 1, product 0x0011(0x0011), Cherry Mikroschalter(0x046a), rev 1.00 port 2 disabled port 3 disabled port 4 disabled port 5 addr 8: low speed, power 100 mA, config 1, Kensington Eagle Trackball(0x2048), Primax(0x047d), rev 6.00 port 6 addr 2: high speed, self powered, config 1, USB2.0 Hub(0x0608), Genesys Logic(0x05e3), rev 85.37 port 1 powered port 2 addr 3: full speed, power 100 mA, config 1, product 0x0010(0x0010), Validity Sensors(0x138a), rev 0.78, iSerialNumber 004c61d365d9 port 3 addr 4: full speed, self powered, config 1, OZ776 Hub(0x7761), O2 Micro(0x0b97), rev 1.10 port 1 powered port 2 addr 5: full speed, self powered, config 1, O2Micro CCID SC Reader(0x7772), O2(0x0b97), rev 1.10 port 3 powered port 4 powered port 7 addr 6: high speed, power 500 mA, config 1, TOSHIBA Web Camera - FHD(0xb3b2), Chicony Electronics Co.,Ltd.(0x04f2), rev 83.73, iSerialNumber 0x0001 port 8 disabled port 9 disabled port 10 disabled port 11 disabled port 12 disabled port 13 disabled Controller /dev/usb1: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x8086), rev 1.00 port 1 addr 2: high speed, self powered, config 1, Rate Matching Hub(0x8000), Intel(0x8087), rev 0.04 port 1 powered port 2 powered port 3 powered port 4 powered port 5 powered port 6 powered port 7 powered port 8 powered port 2 powered