楼主: Timandes

MySQL占用高CPU问题

[复制链接]
论坛徽章:
52
2015年新春福章
日期:2015-03-06 11:57:312012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:25生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:32:552012新春纪念徽章
日期:2012-02-07 09:59:35
21#
发表于 2008-12-4 11:24 | 只看该作者
原帖由 Timandes 于 2008-12-4 09:09 发表
现在还经常出现另外两种情况了……
第一种就是因为超过max_connections,无法再次进行连接了……但是无论等多久都无法连接,而且CPU和内存占用率都很低。
第二种就是无法连接错误,操作系统死掉,CPU和内存占用率都非常低……
期间我曾经调整过max_connections由100变为200,害怕内存吃紧,调整内存到768MB,并且将innodb_buffer_pool_size降低为100MB。



第一种情况,若超过连接数,其他链接确实不能再连接了,除非有空闲的线程允许再连接
第而种情况,我看你的配置都是给Innodb引擎的,那应该跑的就是Innodb表为主了,否则就用不上

而且你的show status,感我的第一感觉是没跑多久的数据,或者是你们应用不多造成的


找下是否虚拟机方面存在什么问题不?

使用道具 举报

回复
论坛徽章:
10
会员2007贡献徽章
日期:2007-09-26 18:42:102011新春纪念徽章
日期:2011-02-18 11:43:342010广州亚运会纪念徽章:帆船
日期:2010-11-13 17:33:442010年世界杯参赛球队:科特迪瓦
日期:2010-10-08 11:21:35ITPUB9周年纪念徽章
日期:2010-10-08 09:31:222009日食纪念
日期:2009-07-22 09:30:00生肖徽章2007版:猴
日期:2008-01-02 17:35:53生肖徽章2007版:鸡
日期:2008-01-02 17:35:53ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28
22#
发表于 2008-12-4 17:27 | 只看该作者
1、mysql error log 贴一段,看报错没。

2、/var/log/messages 贴一段重启这段时间的,看有没报错。

使用道具 举报

回复
论坛徽章:
10
会员2007贡献徽章
日期:2007-09-26 18:42:102011新春纪念徽章
日期:2011-02-18 11:43:342010广州亚运会纪念徽章:帆船
日期:2010-11-13 17:33:442010年世界杯参赛球队:科特迪瓦
日期:2010-10-08 11:21:35ITPUB9周年纪念徽章
日期:2010-10-08 09:31:222009日食纪念
日期:2009-07-22 09:30:00生肖徽章2007版:猴
日期:2008-01-02 17:35:53生肖徽章2007版:鸡
日期:2008-01-02 17:35:53ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28
23#
发表于 2008-12-4 17:32 | 只看该作者
#!/bin/bash
day=`date "+%Y%m%d %R###"`
swap=`free | tail -1`
loadavg=`cat /proc/loadavg`
echo "$day $swap  ###load: $loadavg" >> /var/log/swap.log


#!/bin/bash

day=`date "+%Y%m%d %R"`
echo $day >> /var/log/vmstat.log
vmstat 5 11 >> /var/log/vmstat.log

写2个脚本,内容如上,每分钟执行1次,记录每分钟的系统情况。下回出问题,在观察。

使用道具 举报

回复
论坛徽章:
0
24#
 楼主| 发表于 2008-12-4 18:27 | 只看该作者
原帖由 jinguanding 于 2008-12-4 11:24 发表



第一种情况,若超过连接数,其他链接确实不能再连接了,除非有空闲的线程允许再连接
第而种情况,我看你的配置都是给Innodb引擎的,那应该跑的就是Innodb表为主了,否则就用不上

而且你的show status,感我的第一感觉是没跑多久的数据,或者是你们应用不多造成的


找下是否虚拟机方面存在什么问题不?



遇到第一种情况时,无论等多久都不会出现空闲的连接……而且Web方面不会有什么流量的。
PS:出问题的服务器确实以InnoDB为主。

使用道具 举报

回复
论坛徽章:
0
25#
 楼主| 发表于 2008-12-4 18:29 | 只看该作者
原帖由 shengang34 于 2008-12-4 17:27 发表
1、mysql error log 贴一段,看报错没。

2、/var/log/messages 贴一段重启这段时间的,看有没报错。


1.每次出问题的时候都看MySQL的 Error Log的,但是每次都没什么新鲜的。
2.这里从没关注过,不知道该贴哪些,因为每秒都会有大概3-4对这样的文字出现:
atkbd.c: Use 'setkeycodes e00d (> here)keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x8d on isa0060/serio0).

不知道这个是不是问题所在呢?

特别频繁,我用tail -f messages时,每秒能翻一页……

使用道具 举报

回复
论坛徽章:
0
26#
 楼主| 发表于 2008-12-4 18:58 | 只看该作者
原帖由 shengang34 于 2008-12-4 17:27 发表
1、mysql error log 贴一段,看报错没。

2、/var/log/messages 贴一段重启这段时间的,看有没报错。


Dec  3 17:00:31 WSDataM1 kernel: [28923.567146] atkbd.c: Unknown key pressed (translated set 2, code 0x8d on isa0060/serio0).
Dec  3 17:00:31 WSDataM1 kernel: [28923.567156] atkbd.c: Use 'setkeycodes e00d <keycode>' to make it known.
Dec  3 17:00:31 WSDataM1 kernel: [28923.569185] atkbd.c: Unknown key released (translated set 2, code 0x8d on isa0060/serio0).
Dec  3 17:00:31 WSDataM1 kernel: [28923.569192] atkbd.c: Use 'setkeycodes e00d <keycode>' to make it known.
Dec  3 17:00:32 WSDataM1 kernel: [28924.598625] atkbd.c: Unknown key pressed (translated set 2, code 0x8d on isa0060/serio0).
Dec  3 17:00:32 WSDataM1 kernel: [28924.598633] atkbd.c: Use 'setkeycodes e00d <keycode>' to make it known.
Dec  3 17:00:32 WSDataM1 kernel: [28924.615445] atkbd.c: Unknown key released (translated set 2, code 0x8d on isa0060/serio0).
Dec  3 17:00:32 WSDataM1 kernel: [28924.615452] atkbd.c: Use 'setkeycodes e00d <keycode>' to make it known.
Dec  3 17:18:02 WSDataM1 -- MARK --
Dec  3 17:38:02 WSDataM1 -- MARK --
Dec  3 17:58:02 WSDataM1 -- MARK --
Dec  3 18:18:02 WSDataM1 -- MARK --
Dec  3 18:38:02 WSDataM1 -- MARK --
Dec  3 18:58:02 WSDataM1 -- MARK --
Dec  3 19:18:02 WSDataM1 -- MARK --
Dec  3 19:38:02 WSDataM1 -- MARK --
Dec  3 19:58:02 WSDataM1 -- MARK --
Dec  3 20:18:02 WSDataM1 -- MARK --
Dec  3 20:38:02 WSDataM1 -- MARK --
Dec  3 20:58:02 WSDataM1 -- MARK --
Dec  4 08:47:28 WSDataM1 syslogd 1.5.0#1ubuntu1: restart.
Dec  4 08:47:28 WSDataM1 kernel: Inspecting /boot/System.map-2.6.24-19-server
Dec  4 08:47:28 WSDataM1 kernel: Loaded 28742 symbols from /boot/System.map-2.6.24-19-server.
Dec  4 08:47:28 WSDataM1 kernel: Symbols match kernel version 2.6.24.
Dec  4 08:47:28 WSDataM1 kernel: Loaded 10513 symbols from 49 modules.
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Initializing cgroup subsys cpuset
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Initializing cgroup subsys cpu
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Linux version 2.6.24-19-server (buildd@palmer) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Jun 18 15:18:00 UTC 2008 (Ubuntu 2.6.24-19.34-server)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] BIOS-provided physical RAM map:
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 0000000000100000 - 000000002fef0000 (usable)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 000000002fef0000 - 000000002feff000 (ACPI data)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 000000002feff000 - 000000002ff00000 (ACPI NVS)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 000000002ff00000 - 0000000030000000 (usable)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]  BIOS-e820: 00000000fffe0000 - 0000000100000000 (reserved)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] 0MB HIGHMEM available.
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] 768MB LOWMEM available.
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] found SMP MP-table at 000f6cd0
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] NX (Execute Disable) protection: active
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Zone PFN ranges:
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]   DMA             0 ->     4096
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]   Normal       4096 ->   196608
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]   HighMem    196608 ->   196608
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Movable zone start PFN for each node
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] early_node_map[1] active PFN ranges
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000]     0:        0 ->   196608
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] DMI present.
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: RSDP signature @ 0xC00F6C60 checksum 0
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: RSDP 000F6C60, 0014 (r0 PTLTD )
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: RSDT 2FEFAB5A, 0030 (r1 PTLTD    RSDT    6040000  LTP        0)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: FACP 2FEFEF06, 0074 (r1 INTEL  440BX     6040000 PTL     F4240)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: DSDT 2FEFAB8A, 437C (r1 PTLTD  Custom    6040000 MSFT  100000D)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: FACS 2FEFFFC0, 0040
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: APIC 2FEFEF7A, 005E (r1 PTLTD  ^I APIC    6040000  LTP        0)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: BOOT 2FEFEFD8, 0028 (r1 PTLTD  $SBFTBL$  6040000  LTP        1)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: PM-Timer IO Port: 0x1008
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Processor #0 15:6 APIC version 17
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Processor #1 15:6 APIC version 17
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Enabling APIC mode:  Flat.  Using 1 I/O APICs
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Using ACPI (MADT) for SMP configuration information
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Allocating PCI resources starting at 40000000 (gap: 30000000:cec00000)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] swsusp: Registered nosave memory region: 000000000009f000 - 00000000000a0000
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] swsusp: Registered nosave memory region: 00000000000a0000 - 00000000000ca000
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] swsusp: Registered nosave memory region: 00000000000ca000 - 00000000000cc000
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] swsusp: Registered nosave memory region: 00000000000cc000 - 00000000000dc000
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] swsusp: Registered nosave memory region: 00000000000dc000 - 0000000000100000
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] swsusp: Registered nosave memory region: 000000002fef0000 - 000000002feff000
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] swsusp: Registered nosave memory region: 000000002feff000 - 000000002ff00000
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 195072
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Kernel command line: root=UUID=60c7734f-1644-4c7c-b716-bec090b22bdf ro quiet splash
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Enabling fast FPU save and restore... done.
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Enabling unmasked SIMD FPU exception support... done.
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Initializing CPU#0
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] PID hash table entries: 4096 (order: 12, 16384 bytes)
Dec  4 08:47:28 WSDataM1 kernel: [    0.000000] Detected 2992.077 MHz processor.
Dec  4 08:47:28 WSDataM1 kernel: [    5.227900] Console: colour VGA+ 80x25
Dec  4 08:47:28 WSDataM1 kernel: [    5.228264] console [tty0] enabled
Dec  4 08:47:28 WSDataM1 kernel: [    5.229121] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Dec  4 08:47:28 WSDataM1 kernel: [    5.229639] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230497] Memory: 767344k/786432k available (2256k kernel code, 18456k reserved, 1031k data, 384k init, 0k highmem)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230554] virtual kernel memory layout:
Dec  4 08:47:28 WSDataM1 kernel: [    5.230560]     fixmap  : 0xfff4c000 - 0xfffff000   ( 716 kB)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230562]     pkmap   : 0xffc00000 - 0xffe00000   (2048 kB)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230564]     vmalloc : 0xf0800000 - 0xffbfe000   ( 243 MB)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230565]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230567]       .init : 0xc043c000 - 0xc049c000   ( 384 kB)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230568]       .data : 0xc03341f5 - 0xc0435fe4   (1031 kB)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230570]       .text : 0xc0100000 - 0xc03341f5   (2256 kB)
Dec  4 08:47:28 WSDataM1 kernel: [    5.230624] Checking if this processor honours the WP bit even in supervisor mode... Ok.
Dec  4 08:47:28 WSDataM1 kernel: [    5.231482] SLUB: Genslabs=11, HWalign=64, Order=0-1, MinObjects=4, CPUs=2, Nodes=1
Dec  4 08:47:28 WSDataM1 kernel: [    5.382343] Calibrating delay using timer specific routine.. 5999.09 BogoMIPS (lpj=29995490)
Dec  4 08:47:28 WSDataM1 kernel: [    5.382500] Security Framework initialized
Dec  4 08:47:28 WSDataM1 kernel: [    5.382656] SELinux:  Disabled at boot.
Dec  4 08:47:28 WSDataM1 kernel: [    5.382812] AppArmor: AppArmor initialized
Dec  4 08:47:28 WSDataM1 kernel: [    5.382968] Failure registering capabilities with primary security module.
Dec  4 08:47:28 WSDataM1 kernel: [    5.383124] Mount-cache hash table entries: 512
Dec  4 08:47:28 WSDataM1 kernel: [    5.383280] Initializing cgroup subsys ns
Dec  4 08:47:28 WSDataM1 kernel: [    5.383437] Initializing cgroup subsys cpuacct
Dec  4 08:47:28 WSDataM1 kernel: [    5.383749] CPU: Trace cache: 12K uops, L1 D cache: 16K
Dec  4 08:47:28 WSDataM1 kernel: [    5.383805] CPU: L2 cache: 2048K
Dec  4 08:47:28 WSDataM1 kernel: [    5.384105] Compat vDSO mapped to ffffe000.
Dec  4 08:47:28 WSDataM1 kernel: [    5.384261] Checking 'hlt' instruction... OK.
Dec  4 08:47:28 WSDataM1 kernel: [    5.422437] SMP alternatives: switching to UP code
Dec  4 08:47:28 WSDataM1 kernel: [    5.422593] Early unpacking initramfs... done
Dec  4 08:47:28 WSDataM1 kernel: [    5.662294] ACPI: Core revision 20070126
Dec  4 08:47:28 WSDataM1 kernel: [    5.662450] ACPI: Looking for DSDT in initramfs... error, file /DSDT.aml not found.
Dec  4 08:47:28 WSDataM1 kernel: [    5.663231] CPU0: Intel(R) Pentium(R) D CPU 3.00GHz stepping 08
Dec  4 08:47:28 WSDataM1 kernel: [    5.663699] SMP alternatives: switching to SMP code
Dec  4 08:47:28 WSDataM1 kernel: [    5.663855] Booting processor 1/1 eip 3000
Dec  4 08:47:28 WSDataM1 kernel: [    5.676211] Initializing CPU#1
Dec  4 08:47:28 WSDataM1 kernel: [    5.822140] Calibrating delay using timer specific routine.. 6052.85 BogoMIPS (lpj=30264256)
Dec  4 08:47:28 WSDataM1 kernel: [    5.823806] CPU: Trace cache: 12K uops, L1 D cache: 16K
Dec  4 08:47:28 WSDataM1 kernel: [    5.823862] CPU: L2 cache: 2048K
Dec  4 08:47:28 WSDataM1 kernel: [    5.825135] CPU1: Intel(R) Pentium(R) D CPU 3.00GHz stepping 08
Dec  4 08:47:28 WSDataM1 kernel: [    5.825292] Total of 2 processors activated (12051.94 BogoMIPS).
Dec  4 08:47:28 WSDataM1 kernel: [    5.825448] ENABLING IO-APIC IRQs
Dec  4 08:47:28 WSDataM1 kernel: [    5.825860] ..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
Dec  4 08:47:28 WSDataM1 kernel: [    6.062474] checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Dec  4 08:47:28 WSDataM1 kernel: [    6.084278] Brought up 2 CPUs
Dec  4 08:47:28 WSDataM1 kernel: [    6.086082] net_namespace: 64 bytes
Dec  4 08:47:28 WSDataM1 kernel: [    6.086141] Booting paravirtualized kernel on bare hardware
Dec  4 08:47:28 WSDataM1 kernel: [    6.086531] Time:  0:47:03  Date: 12/04/08
Dec  4 08:47:28 WSDataM1 kernel: [    6.094009] NET: Registered protocol family 16
Dec  4 08:47:28 WSDataM1 kernel: [    6.095076] EISA bus registered
Dec  4 08:47:28 WSDataM1 kernel: [    6.097106] ACPI: bus type pci registered
Dec  4 08:47:28 WSDataM1 kernel: [    6.097704] PCI: PCI BIOS revision 2.10 entry at 0xfd9a0, last bus=1
Dec  4 08:47:28 WSDataM1 kernel: [    6.097770] PCI: Using configuration type 1
Dec  4 08:47:28 WSDataM1 kernel: [    6.097916] Setting up standard PCI resources
Dec  4 08:47:28 WSDataM1 kernel: [    6.154067] ACPI: Interpreter enabled
Dec  4 08:47:28 WSDataM1 kernel: [    6.154140] ACPI: (supports S0 S1 S4 S5)
Dec  4 08:47:28 WSDataM1 kernel: [    6.154296] ACPI: Using IOAPIC for interrupt routing
Dec  4 08:47:28 WSDataM1 kernel: [    6.203184] ACPI: PCI Root Bridge [PCI0] (0000:00)
Dec  4 08:47:28 WSDataM1 kernel: [    6.212382] PCI quirk: region 1000-103f claimed by PIIX4 ACPI
Dec  4 08:47:28 WSDataM1 kernel: [    6.212468] PCI quirk: region 1040-104f claimed by PIIX4 SMB
Dec  4 08:47:28 WSDataM1 kernel: [    6.216407] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 11 14 15) *0, disabled.
Dec  4 08:47:28 WSDataM1 kernel: [    6.216563] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *9 10 11 14 15)
Dec  4 08:47:28 WSDataM1 kernel: [    6.216719] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 *11 14 15)
Dec  4 08:47:28 WSDataM1 kernel: [    6.216875] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 11 14 15) *0, disabled.
Dec  4 08:47:28 WSDataM1 kernel: [    6.217480] Linux Plug and Play Support v0.97 (c) Adam Belay
Dec  4 08:47:28 WSDataM1 kernel: [    6.217622] pnp: PnP ACPI init
Dec  4 08:47:28 WSDataM1 kernel: [    6.217778] ACPI: bus type pnp registered
Dec  4 08:47:28 WSDataM1 kernel: [    6.344735] pnp: PnP ACPI: found 12 devices
Dec  4 08:47:28 WSDataM1 kernel: [    6.344853] ACPI: ACPI bus type pnp unregistered
Dec  4 08:47:28 WSDataM1 kernel: [    6.344956] PnPBIOS: Disabled by ACPI PNP
Dec  4 08:47:28 WSDataM1 kernel: [    6.346457] PCI: Using ACPI for IRQ routing
Dec  4 08:47:28 WSDataM1 kernel: [    6.346566] PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
Dec  4 08:47:28 WSDataM1 kernel: [    6.432226] NET: Registered protocol family 8
Dec  4 08:47:28 WSDataM1 kernel: [    6.432253] NET: Registered protocol family 20
Dec  4 08:47:28 WSDataM1 kernel: [    6.432540] NetLabel: Initializing
Dec  4 08:47:28 WSDataM1 kernel: [    6.432563] NetLabel:  domain hash size = 128
Dec  4 08:47:28 WSDataM1 kernel: [    6.432580] NetLabel:  protocols = UNLABELED CIPSOv4
Dec  4 08:47:28 WSDataM1 kernel: [    6.433886] NetLabel:  unlabeled traffic allowed by default
Dec  4 08:47:28 WSDataM1 kernel: [    6.434042] AppArmor: AppArmor Filesystem Enabled
Dec  4 08:47:28 WSDataM1 kernel: [    6.442231] Time: tsc clocksource has been installed.
Dec  4 08:47:28 WSDataM1 kernel: [    6.462367] system 00:01: ioport range 0x1000-0x103f has been reserved
Dec  4 08:47:28 WSDataM1 kernel: [    6.462397] system 00:01: ioport range 0x1040-0x104f has been reserved
Dec  4 08:47:28 WSDataM1 kernel: [    6.494580] PCI: Bridge: 0000:00:01.0
Dec  4 08:47:28 WSDataM1 kernel: [    6.494627]   IO window: disabled.
Dec  4 08:47:28 WSDataM1 kernel: [    6.494783]   MEM window: disabled.
Dec  4 08:47:28 WSDataM1 kernel: [    6.494920]   PREFETCH window: disabled.
Dec  4 08:47:28 WSDataM1 kernel: [    6.495232] NET: Registered protocol family 2
Dec  4 08:47:28 WSDataM1 kernel: [    6.593782] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
Dec  4 08:47:28 WSDataM1 kernel: [    6.593938] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
Dec  4 08:47:28 WSDataM1 kernel: [    6.594095] TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
Dec  4 08:47:28 WSDataM1 kernel: [    6.594251] TCP: Hash tables configured (established 131072 bind 65536)
Dec  4 08:47:28 WSDataM1 kernel: [    6.594407] TCP reno registered
Dec  4 08:47:28 WSDataM1 kernel: [    6.623763] checking if image is initramfs... it is
Dec  4 08:47:28 WSDataM1 kernel: [    7.124201] Freeing initrd memory: 7181k freed
Dec  4 08:47:28 WSDataM1 kernel: [    7.124616] Simple Boot Flag at 0x36 set to 0x1
Dec  4 08:47:28 WSDataM1 kernel: [    7.134531] audit: initializing netlink socket (disabled)
Dec  4 08:47:28 WSDataM1 kernel: [    7.134639] audit(1228351621.780:1): initialized
Dec  4 08:47:28 WSDataM1 kernel: [    7.135624] Total HugeTLB memory allocated, 0
Dec  4 08:47:28 WSDataM1 kernel: [    7.143354] VFS: Disk quotas dquot_6.5.1
Dec  4 08:47:28 WSDataM1 kernel: [    7.143673] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Dec  4 08:47:28 WSDataM1 kernel: [    7.144633] io scheduler noop registered
Dec  4 08:47:28 WSDataM1 kernel: [    7.144701] io scheduler anticipatory registered
Dec  4 08:47:28 WSDataM1 kernel: [    7.144738] io scheduler deadline registered (default)
Dec  4 08:47:28 WSDataM1 kernel: [    7.144835] io scheduler cfq registered
Dec  4 08:47:28 WSDataM1 kernel: [    7.144943] Limiting direct PCI/PCI transfers.
Dec  4 08:47:28 WSDataM1 kernel: [    7.146572] isapnp: Scanning for PnP cards...
Dec  4 08:47:28 WSDataM1 kernel: [    7.508476] isapnp: No Plug & Play device found
Dec  4 08:47:28 WSDataM1 kernel: [    7.620377] Real Time Clock Driver v1.12ac
Dec  4 08:47:28 WSDataM1 kernel: [    7.620897] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
Dec  4 08:47:28 WSDataM1 kernel: [    7.621235] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Dec  4 08:47:28 WSDataM1 kernel: [    7.621831] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Dec  4 08:47:28 WSDataM1 kernel: [    7.624207] 00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Dec  4 08:47:28 WSDataM1 kernel: [    7.624773] 00:0a: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Dec  4 08:47:28 WSDataM1 kernel: [    7.628123] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
Dec  4 08:47:28 WSDataM1 kernel: [    7.628402] input: Macintosh mouse button emulation as /devices/virtual/input/input0
Dec  4 08:47:28 WSDataM1 kernel: [    7.628947] PNP: PS/2 Controller [PNP0303:KBC,PNP0f13:MOUS] at 0x60,0x64 irq 1,12
Dec  4 08:47:28 WSDataM1 kernel: [    8.173744] serio: i8042 KBD port at 0x60,0x64 irq 1
Dec  4 08:47:28 WSDataM1 kernel: [    8.173872] serio: i8042 AUX port at 0x60,0x64 irq 12
Dec  4 08:47:28 WSDataM1 kernel: [    8.224288] mice: PS/2 mouse device common for all mice
Dec  4 08:47:28 WSDataM1 kernel: [    8.225465] EISA: Probing bus 0 at eisa.0
Dec  4 08:47:28 WSDataM1 kernel: [    8.225723] Cannot allocate resource for EISA slot 1
Dec  4 08:47:28 WSDataM1 kernel: [    8.225851] EISA: Detected 0 cards.
Dec  4 08:47:28 WSDataM1 kernel: [    8.225980] cpuidle: using governor ladder
Dec  4 08:47:28 WSDataM1 kernel: [    8.226108] cpuidle: using governor menu
Dec  4 08:47:28 WSDataM1 kernel: [    8.226894] NET: Registered protocol family 1
Dec  4 08:47:28 WSDataM1 kernel: [    8.227384] Using IPI No-Shortcut mode
Dec  4 08:47:28 WSDataM1 kernel: [    8.227642] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
Dec  4 08:47:28 WSDataM1 kernel: [    8.227899] registered taskstats version 1
Dec  4 08:47:28 WSDataM1 kernel: [    8.228028]   Magic number: 4:568:758
Dec  4 08:47:28 WSDataM1 kernel: [    8.228157] BIOS EDD facility v0.16 2004-Jun-25, 6 devices found
Dec  4 08:47:28 WSDataM1 kernel: [    8.233486] Freeing unused kernel memory: 384k freed
Dec  4 08:47:28 WSDataM1 kernel: [    8.654529] fuse init (API version 7.9)
Dec  4 08:47:28 WSDataM1 kernel: [    8.704220] ACPI: Processor [CPU0] (supports 8 throttling states)
Dec  4 08:47:28 WSDataM1 kernel: [    8.704608] ACPI: Processor [CPU1] (supports 8 throttling states)
Dec  4 08:47:28 WSDataM1 kernel: [    8.704778] ACPI Exception (processor_core-0816): AE_NOT_FOUND, Processor Device is not present [20070126]
Dec  4 08:47:28 WSDataM1 kernel: [    8.704883] ACPI Exception (processor_core-0816): AE_NOT_FOUND, Processor Device is not present [20070126]
Dec  4 08:47:28 WSDataM1 kernel: [    8.956119] SCSI subsystem initialized
Dec  4 08:47:28 WSDataM1 kernel: [    9.053693] scsi0 : ata_piix
Dec  4 08:47:28 WSDataM1 kernel: [    9.054073] scsi1 : ata_piix
Dec  4 08:47:28 WSDataM1 kernel: [    9.054270] ata1: PATA max UDMA/33 cmd 0x1f0 ctl 0x3f6 bmdma 0x1050 irq 14
Dec  4 08:47:28 WSDataM1 kernel: [    9.054314] ata2: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0x1058 irq 15
Dec  4 08:47:28 WSDataM1 kernel: [    9.210874] Fusion MPT base driver 3.04.06
Dec  4 08:47:28 WSDataM1 kernel: [    9.210899] Copyright (c) 1999-2007 LSI Corporation
Dec  4 08:47:28 WSDataM1 kernel: [    9.251084] Fusion MPT SPI Host driver 3.04.06
Dec  4 08:47:28 WSDataM1 kernel: [    9.302928] pcnet32.c:v1.34 14.Aug.2007 tsbogend@alpha.franken.de
Dec  4 08:47:28 WSDataM1 kernel: [    9.383080] ata1.00: ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33
Dec  4 08:47:28 WSDataM1 kernel: [    9.407110] Floppy drive(s): fd0 is 1.44M
Dec  4 08:47:28 WSDataM1 kernel: [    9.433127] FDC 0 is a post-1991 82077
Dec  4 08:47:28 WSDataM1 kernel: [    9.550481] ata1.00: configured for UDMA/33
Dec  4 08:47:28 WSDataM1 kernel: [    9.558137] scsi 0:0:0:0: CD-ROM            NECVMWar VMware IDE CDR00 1.00 PQ: 0 ANSI: 5
Dec  4 08:47:28 WSDataM1 kernel: [    9.570876] ACPI: PCI Interrupt 0000:00:11.0[A] -> GSI 18 (level, low) -> IRQ 16
Dec  4 08:47:28 WSDataM1 kernel: [    9.571093] pcnet32: PCnet/PCI II 79C970A at 0x1400, 00 0c 29 f8 ee ae assigned IRQ 16.
Dec  4 08:47:28 WSDataM1 kernel: [    9.582635] eth0: registered as PCnet/PCI II 79C970A
Dec  4 08:47:28 WSDataM1 kernel: [    9.582884] pcnet32: 1 cards_found.
Dec  4 08:47:28 WSDataM1 kernel: [    9.583558] ACPI: PCI Interrupt 0000:00:10.0[A] -> GSI 17 (level, low) -> IRQ 17
Dec  4 08:47:28 WSDataM1 kernel: [    9.583867] mptbase: ioc0: Initiating bringup
Dec  4 08:47:28 WSDataM1 kernel: [    9.770371] ioc0: LSI53C1030 B0: Capabilities={Initiator}
Dec  4 08:47:28 WSDataM1 kernel: [   10.093246] scsi2 : ioc0: LSI53C1030 B0, FwRev=00000000h, Ports=1, MaxQ=128, IRQ=17
Dec  4 08:47:28 WSDataM1 kernel: [   10.256611] Driver 'sr' needs updating - please use bus_type methods
Dec  4 08:47:28 WSDataM1 kernel: [   10.275925] sr0: scsi3-mmc drive: 1x/1x xa/form2 cdda tray
Dec  4 08:47:28 WSDataM1 kernel: [   10.276142] Uniform CD-ROM driver Revision: 3.20
Dec  4 08:47:28 WSDataM1 kernel: [   10.292022] sr 0:0:0:0: Attached scsi generic sg0 type 5
Dec  4 08:47:28 WSDataM1 kernel: [   10.381989] scsi 2:0:0:0: Direct-Access     VMware   Virtual disk     1.0  PQ: 0 ANSI: 2
Dec  4 08:47:28 WSDataM1 kernel: [   10.382193]  target2:0:0: Beginning Domain Validation
Dec  4 08:47:28 WSDataM1 kernel: [   10.382397]  target2:0:0: Domain Validation skipping write tests
Dec  4 08:47:28 WSDataM1 kernel: [   10.382442]  target2:0:0: Ending Domain Validation
Dec  4 08:47:28 WSDataM1 kernel: [   10.382646]  target2:0:0: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
Dec  4 08:47:28 WSDataM1 kernel: [   10.394031] scsi 2:0:0:0: Attached scsi generic sg1 type 0
Dec  4 08:47:28 WSDataM1 kernel: [   10.422817] Driver 'sd' needs updating - please use bus_type methods
Dec  4 08:47:28 WSDataM1 kernel: [   10.423504] sd 2:0:0:0: [sda] 104857600 512-byte hardware sectors (53687 MB)
Dec  4 08:47:28 WSDataM1 kernel: [   10.423973] sd 2:0:0:0: [sda] Test WP failed, assume Write Enabled
Dec  4 08:47:28 WSDataM1 kernel: [   10.424177] sd 2:0:0:0: [sda] Cache data unavailable
Dec  4 08:47:28 WSDataM1 kernel: [   10.425379] sd 2:0:0:0: [sda] 104857600 512-byte hardware sectors (53687 MB)
Dec  4 08:47:28 WSDataM1 kernel: [   10.425491] sd 2:0:0:0: [sda] Test WP failed, assume Write Enabled
Dec  4 08:47:28 WSDataM1 kernel: [   10.425532] sd 2:0:0:0: [sda] Cache data unavailable
Dec  4 08:47:28 WSDataM1 kernel: [   10.425741]  sda: sda1 sda2 < sda5 >
Dec  4 08:47:28 WSDataM1 kernel: [   10.452552] sd 2:0:0:0: [sda] Attached SCSI disk
Dec  4 08:47:28 WSDataM1 kernel: [   10.625998] Attempting manual resume
Dec  4 08:47:28 WSDataM1 kernel: [   10.646832] EXT3-fs: INFO: recovery required on readonly filesystem.
Dec  4 08:47:28 WSDataM1 kernel: [   10.646867] EXT3-fs: write access will be enabled during recovery.
Dec  4 08:47:28 WSDataM1 kernel: [   10.853180] kjournald starting.  Commit interval 5 seconds
Dec  4 08:47:28 WSDataM1 kernel: [   10.853673] EXT3-fs: sda1: orphan cleanup on readonly fs
Dec  4 08:47:28 WSDataM1 kernel: [   10.862980] EXT3-fs: sda1: 5 orphan inodes deleted
Dec  4 08:47:28 WSDataM1 kernel: [   10.863074] EXT3-fs: recovery complete.
Dec  4 08:47:28 WSDataM1 kernel: [   10.867545] EXT3-fs: mounted filesystem with ordered data mode.
Dec  4 08:47:28 WSDataM1 kernel: [   12.837895] Linux agpgart interface v0.102
Dec  4 08:47:28 WSDataM1 kernel: [   12.878660] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
Dec  4 08:47:28 WSDataM1 kernel: [   12.900756] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
Dec  4 08:47:28 WSDataM1 kernel: [   12.938047] piix4_smbus 0000:00:07.3: Found 0000:00:07.3 device
Dec  4 08:47:28 WSDataM1 kernel: [   12.988088] input: PC Speaker as /devices/platform/pcspkr/input/input2
Dec  4 08:47:28 WSDataM1 kernel: [   13.018047] agpgart: Detected an Intel 440BX Chipset.
Dec  4 08:47:28 WSDataM1 kernel: [   13.020391] agpgart: AGP aperture is 256M @ 0x0
Dec  4 08:47:28 WSDataM1 kernel: [   13.130013] eth0: link up
Dec  4 08:47:28 WSDataM1 kernel: [   14.039976] input: Power Button (FF) as /devices/virtual/input/input3
Dec  4 08:47:28 WSDataM1 kernel: [   14.096806] ACPI: Power Button (FF) [PWRF]
Dec  4 08:47:28 WSDataM1 kernel: [   14.100585] ACPI: AC Adapter [ACAD] (on-line)
Dec  4 08:47:28 WSDataM1 kernel: [   14.826330] input: ImPS/2 Generic Wheel Mouse as /devices/platform/i8042/serio1/input/input4
Dec  4 08:47:28 WSDataM1 kernel: [   18.114197] parport_pc 00:08: reported by Plug and Play ACPI
Dec  4 08:47:28 WSDataM1 kernel: [   18.117596] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
Dec  4 08:47:28 WSDataM1 kernel: [   21.955376] NET: Registered protocol family 10
Dec  4 08:47:28 WSDataM1 kernel: [   21.965521] lo: Disabled Privacy Extensions
Dec  4 08:47:28 WSDataM1 kernel: [   30.400583] loop: module loaded
Dec  4 08:47:28 WSDataM1 kernel: [   30.449843] lp0: using parport0 (interrupt-driven).
Dec  4 08:47:28 WSDataM1 kernel: [   30.709689] Adding 1510068k swap on /dev/sda5.  Priority:-1 extents:1 across:1510068k
Dec  4 08:47:28 WSDataM1 kernel: [   31.049309] EXT3 FS on sda1, internal journal
Dec  4 08:47:28 WSDataM1 kernel: [   32.000243] ip_tables: (C) 2000-2006 Netfilter Core Team
Dec  4 09:04:19 WSDataM1 kernel: [ 1043.905979] atkbd.c: Unknown key pressed (translated set 2, code 0x8d on isa0060/serio0).
Dec  4 09:04:19 WSDataM1 kernel: [ 1043.906019] atkbd.c: Use 'setkeycodes e00d <keycode>' to make it known.
Dec  4 09:04:19 WSDataM1 kernel: [ 1043.909865] atkbd.c: Unknown key released (translated set 2, code 0x8d on isa0060/serio0).
Dec  4 09:04:19 WSDataM1 kernel: [ 1043.909873] atkbd.c: Use 'setkeycodes e00d <keycode>' to make it known.
Dec  4 09:04:20 WSDataM1 kernel: [ 1044.908209] atkbd.c: Unknown key pressed (translated set 2, code 0x8d on isa0060/serio0).
Dec  4 09:04:20 WSDataM1 kernel: [ 1044.908218] atkbd.c: Use 'setkeycodes e00d <keycode>' to make it known.
Dec  4 09:04:20 WSDataM1 kernel: [ 1044.920275] atkbd.c: Unknown key released (translated set 2, code 0x8d on isa0060/serio0).
Dec  4 09:04:20 WSDataM1 kernel: [ 1044.920282] atkbd.c: Use 'setkeycodes e00d <keycode>' to make it known.

使用道具 举报

回复
论坛徽章:
0
27#
 楼主| 发表于 2008-12-4 19:00 | 只看该作者
atkbd.c: Use 'setkeycodes e00d (> here)keycode>' to make it known.
atkbd.c: Unknown key released (translated set 2, code 0x8d on isa0060/serio0).

出现这个错误的原因找到了:是我的主控机器不停的发出这些按键,换别的机器就没有了。
看来死机不是因为这个问题……

使用道具 举报

回复
论坛徽章:
0
28#
 楼主| 发表于 2008-12-4 19:13 | 只看该作者
原帖由 shengang34 于 2008-12-4 17:32 发表
#!/bin/bash
day=`date "+%Y%m%d %R###"`
swap=`free | tail -1`
loadavg=`cat /proc/loadavg`
echo "$day $swap  ###load: $loadavg" >> /var/log/swap.log


#!/bin/bash

day=`date "+%Y%m%d %R"`
echo $day >> /var/log/vmstat.log
vmstat 5 11 >> /var/log/vmstat.log

写2个脚本,内容如上,每分钟执行1次,记录每分钟的系统情况。下回出问题,在观察。



脚本已经挂上,多谢热心达人~^_^

使用道具 举报

回复
论坛徽章:
52
2015年新春福章
日期:2015-03-06 11:57:312012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:25生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:33:22生肖徽章2007版:龙
日期:2012-02-07 10:32:552012新春纪念徽章
日期:2012-02-07 09:59:35
29#
发表于 2008-12-5 11:06 | 只看该作者
原帖由 Timandes 于 2008-12-4 18:27 发表



遇到第一种情况时,无论等多久都不会出现空闲的连接……而且Web方面不会有什么流量的。
PS:出问题的服务器确实以InnoDB为主。



没有空闲链接,是不是你程序不没有释放掉链接啊..............从你所说的情况看,
我觉得问题有90%以上可能出在虚拟机方面....问题不在MySQL server方面

使用道具 举报

回复
论坛徽章:
0
30#
 楼主| 发表于 2008-12-5 11:43 | 只看该作者
刚被我目测到服务器逐渐变慢的过程了,内存严重被占用,交换区占用非常明显。
趁机执行了一次vmstat,贴图在下面了。
同时也show processlist了一下,发现有77个客户端连接,其中有好多都停在commit上了……



达人帮忙分析。

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表