Home

Get a very strange problem today when I benchmark application

Today I am trying to benchmark my web application, I tried use ab command to do pressure testing. At beginning it’s fine, but after several times, when I do this command again, I saw CPU goes up to 100%, but on top/htop command can’t tell me which process is processing now.

Really wired.


installing snmpd on ubuntu

  1. sudo apt-get install snmpd snmp
  2. change listen ip,  remove 127.0.0.1 in /etc/default/snmpd file
  3. change the community string for a readonly user #       sec.name  source          community #com2sec paranoid  default         public com2sec readonly  default         itjob.fm #com2sec readwrite default         private
  4. Setup syslocation and contact syslocation China syscontact Michael
  5. Then you restart the server /etc/init.d/snmpd restart
  6. Test: snmpwalk -v 2 localhost -c itjob.fm system

Webbench --- a web performance benchmarking tool which can simulate 30k concurrency

http://home.tiscali.cz/~cz210552/webbench.html Web Bench is very simple tool for benchmarking WWW or proxy servers. Uses fork() for simulating multiple clients and can use HTTP/0.9-HTTP/1.1 requests. This benchmark is not very realistic, but it can test if your HTTPD can realy handle that many clients at once (try to run some CGIs) without taking your machine down. Displays pages/min and bytes/sec. Can be used in more aggressive mode with -f switch.   How to use
webbench -c concurrency -t seconds URL.

One simple tutorial of Systemtap

Systemtap
View more PowerPoint from Feng Yu
Another good tutorial:
http://www.ibm.com/developerworks/cn/linux/l-systemtap/

使用 watchdog 构建高可用性的 Linux 系统及应用

http://www.ibm.com/developerworks/cn/linux/l-cn-watchdog/   Linux 自带了一个 watchdog 的实现,用于监视系统的运行,包括一个内核 watchdog module 和一个用户空间的 watchdog 程序 内核 watchdog 模块通过 /dev/watchdog 这个字符设备与用户空间通信。用户空间程序一旦打开 /dev/watchdog 设备,就会导致在内核中启动一个 1分钟的定时器,此后,用户空间程序需要保证在 1分钟之内向这个设备写入数据,每次写操作会导致重新设定定时器。如果用户空间程序在 1分钟之内没有写操作,定时器到期会导致一次系统 reboot 操作。 用户空间程序可通过关闭 /dev/watchdog 来停止内核中的定时器。 用户空间的 watchdog 守护进程: 在用户空间,还有一个叫做 watchdog 的守护进程,它可以定期对系统进行检测,包括:
  • Is the process table full?
  • Is there enough free memory?
  • Are some files accessible?
  • Have some files changed within a given interval?
  • Is the average work load too high?
  • Has a file table overflow occurred?
  • Is a process still running? The process is specified by a pid file.
  • Do some IP addresses answer to ping?
  • Do network interfaces receive traffic?
  • Is the temperature too high? (Temperature data not always available.)
  • Execute a user defined command to do arbitrary tests.
如果某项检测失败,则可能导致一次 soft reboot (模拟一次 shutdown 命令的执行) 它还可以通过 /dev/watchdog 来触发内核 watchdog 的运行。