1.把ihsdiag软件上传到服务器上,解压。
例如解压到 /opt/IBM/ihsdiag
2.例如:IHS缓慢的时候
root@testserver:/>ps -A -o pid,ppid,pcpu,time,args |grep httpd
377042 1 0.0 00:01:23 /opt/IBM/HttpServer/bin/httpd -d /opt/IBM/HttpServer -k start
417986 377042 40.0 00:00:15 /opt/IBM/HttpServer/bin/httpd -d /opt/IBM/HttpServer -k start
442604 377042 0.0 00:00:15 /opt/IBM/HttpServer/bin/httpd -d /opt/IBM/HttpServer -k start
462886 377042 0.0 00:00:00 /opt/IBM/HttpServer/bin/httpd -d /opt/IBM/HttpServer -k start
1482880 1474622 0.0 00:00:00 grep httpd
等10秒再执行一次,观察几次找出CPU使用率(第3列)最高的那个IHS进程。
3.运行ihsdiag软件进行诊断
cd /opt/IBM/ihsdiag
root@testserver:/opt/IBM/ihsdiag/>java -jar ServerDoc.jar GatherHighCpuDoc /opt/IBM/HttpServer 417986 127.0.0.1:80
Web server version: 6.0.2.23
Available global GSKit version: 7.0.3.20 (32-bit)
Available global GSKit version: 7.0.3.18 (64-bit)
Getting backtraces for process 417986
Tracing process 417986 for 10 seconds...
Seconds remaining before gathering information again:
60...54...48...42...36...30...24...18...12...6...
Getting backtraces for process 417986
Tracing process 417986 for 10 seconds...
Seconds remaining before gathering information again:
30...27...24...21...18...15...12...9...6...3...
Getting backtraces for process 417986
Tracing process 417986 for 10 seconds...
Reports, log files, and configuration files have been saved to directory
HighCpuDoc.201103011747
If you have additional log files or configuration files, copy them there
before packing up the directory.
Web server log and conf files other than the default will have to be
copied manually.
WebSphere plug-in conf and log files will have to be copied manually.
Hint for packing up the directory:
tar -cf HighCpuDoc.201103011747.tar HighCpuDoc.201103011747
gzip HighCpuDoc.201103011747.tar
CPU使用率高的诊断报告会自动在/opt/IBM/HttpServer/ihsdiag目录里面生成HighCpuDoc.201103011747文件夹。