很多时候,我们要监视Oracle服务器的性能,今天我就介绍一个监视服务器性能的工具OSWatcher Black Box,这个工具是Oracle公司出的,大家可以再MOS上面进行下载,稍后我会共享出来给大家下载。
这个工具的使用,有一个条件,就是本机要安装java。在MOS对这个工具有详细的介绍,大家有账号的可以去好好看下,我这里就简单的介绍一个安装和使用。
相关介绍可以查看截图中的2个文章
前提条件,只是java1.4.2.这个推荐大家不要用安装系统时候自带的java。
这个工具现在最新版本是oswbb730.tar。下载后,之间上次到服务器解压缩就可以了。
步骤一:安装
[root@localhost oswbb]# pwd
/opt/oswbb
[root@localhost oswbb]#
[root@localhost oswbb]# ls
analysis ifconfigsub.sh oswib.sh tarupfiles.sh
call_du.sh iosub.sh oswnet.sh tar_up_partial_archive.sh
call_sar.sh locks oswrds.sh tmp
call_uptime.sh ltop.sh oswsub.sh topaix.sh
data mpsub.sh profile vmsub.sh
docs nfssub.sh psmemsub.sh xtop.sh
Example_extras.txt OSWatcherFM.sh src
Exampleprivate.net OSWatcher.sh startOSWbb.sh
gif oswbba.jar stopOSWbb.sh
[root@localhost oswbb]# <strong>
</strong>
这里面我们最常用的就是 startOSWbb.sh 和 stopOSWbb.sh。
步骤二:开启工具
默认开启模式
[root@localhost oswbb]#
[root@localhost oswbb]# ./startOSWbb.sh --这里可以不加参数的
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30 --默认30秒收集一次
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48 --包括48小时
[root@localhost oswbb]# Setting the archive log directory to/opt/oswbb/archive --记录归档文件位置
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
IFCONFIG found on your system.
NETSTAT found on your system.
TOP found on your system.
Testing for discovery of OS CPU COUNT
oswbb is looking for the CPU COUNT on your system
CPU COUNT will be used by oswbba to automatically look for cpu problems
CPU COUNT found on your system.
CPU COUNT = 2
Discovery completed.
Starting OSWatcher Black Box v7.3.0 on Sat Jun 21 16:24:50 CST 2014
With SnapshotInterval = 30
With ArchiveInterval = 48
OSWatcher Black Box - Written by Carl Davis, Center of Expertise,
Oracle Corporation
For questions on install/usage please go to MOS (Note:301137.1)
If you need further assistance or have comments or enhancement
requests you can email me Carl.Davis@Oracle.com
Data is stored in directory: /opt/oswbb/archive
Starting Data Collection...
oswbb heartbeat:Sat Jun 21 16:24:55 CST 2014
oswbb heartbeat:Sat Jun 21 16:25:25 CST 2014
oswbb heartbeat:Sat Jun 21 16:25:55 CST 2014
oswbb heartbeat:Sat Jun 21 16:26:25 CST 2014
如果什么参数都不加的话,默认30秒收集保留48小时的统计信息。
还有一种常用的启动方式就是
[root@localhost oswbb]# ./startOSWbb.sh 60 10 --60秒收集1次 保留10小时
[root@localhost oswbb]# Setting the archive log directory to/opt/oswbb/archive
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
IFCONFIG found on your system.
NETSTAT found on your system.
TOP found on your system.
Testing for discovery of OS CPU COUNT
oswbb is looking for the CPU COUNT on your system
CPU COUNT will be used by oswbba to automatically look for cpu problems
CPU COUNT found on your system.
CPU COUNT = 2
Discovery completed.
Starting OSWatcher Black Box v7.3.0 on Sat Jun 21 16:34:23 CST 2014
With SnapshotInterval = 60
With ArchiveInterval = 10
OSWatcher Black Box - Written by Carl Davis, Center of Expertise,
Oracle Corporation
For questions on install/usage please go to MOS (Note:301137.1)
If you need further assistance or have comments or enhancement
requests you can email me Carl.Davis@Oracle.com
Data is stored in directory: /opt/oswbb/archive
Starting Data Collection...
oswbb heartbeat:Sat Jun 21 16:34:28 CST 2014
我们进入刚才的归档文件目录下看一下
[root@localhost oswbb]# cd /opt/oswbb/archive/
[root@localhost archive]# ll
total 40
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswifconfig
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswiostat
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswmeminfo
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswmpstat
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswnetstat
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswprvtnet
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswps
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswslabinfo
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswtop
drwxr-xr-x 2 root root 4096 Jun 21 16:24 oswvmstat
可以看到,其实这个工具就是调用本地的相关命令。以命令分类来保存相关归档文件的。
还有一点大家要注意下startOSWbb.sh在最新版本里面启动后,是后天进程,就算我们关闭当前对话框也是运行着的。大家如果用其他版本我就不敢确认了,大家在实际环境还是确认下好。
[root@localhost ~]#
[root@localhost ~]# ps -ef | grep OSWatcher
root 5278 1 0 16:24 ? 00:00:00 /bin/sh ./OSWatcher.sh
root 5327 5278 0 16:24 ? 00:00:00 /bin/sh ./OSWatcherFM.sh 48 /opt/oswbb/archive
root 6671 6459 0 16:31 pts/3 00:00:00 grep OSWatcher
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# cd /opt/oswbb
[root@localhost oswbb]# ls
analysis gif oswbba.jar stopOSWbb.sh
archive ifconfigsub.sh oswib.sh tarupfiles.sh
call_du.sh iosub.sh oswnet.sh tar_up_partial_archive.sh
call_sar.sh locks oswrds.sh tmp
call_uptime.sh ltop.sh oswsub.sh topaix.sh
data mpsub.sh profile vmsub.sh
docs nfssub.sh psmemsub.sh xtop.sh
Example_extras.txt OSWatcherFM.sh src
Exampleprivate.net OSWatcher.sh startOSWbb.sh
[root@localhost oswbb]#
[root@localhost oswbb]# ./stopOSWbb.sh
[root@localhost oswbb]#
[root@localhost oswbb]#
[root@localhost oswbb]# ps -ef | grep OSWatcher
root 6796 6459 0 16:32 pts/3 00:00:00 grep OSWatcher
[root@localhost oswbb]#
步骤三:查看结果
[root@localhost ~]# cd /opt/oswbb/archive/
[root@localhost archive]#
[root@localhost archive]# ls
oswifconfig oswmeminfo oswnetstat oswps oswtop
oswiostat oswmpstat oswprvtnet oswslabinfo oswvmstat
[root@localhost archive]#
[root@localhost archive]#
[root@localhost archive]# cd oswvmstat/
[root@localhost oswvmstat]# ls
localhost.localdomain_vmstat_14.06.21.1600.dat
[root@localhost oswvmstat]#
[root@localhost oswvmstat]# cat localhost.localdomain_vmstat_14.06.21.1600.dat
Linux OSWbb v7.3.0 localhost.localdomain
SNAP_INTERVAL 30
CPU_COUNT 2
OSWBB_ARCHIVE_DEST /opt/oswbb/archive
zzz ***Sat Jun 21 16:24:55 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
5 0 0 2907980 35264 816440 0 0 316 25 524 178 1 2 95 3 0
0 0 0 2905336 35264 816528 0 0 0 0 1007 1201 2 3 96 0 0
0 0 0 2906096 35264 816528 0 0 0 0 1002 1084 1 1 98 0 0
zzz ***Sat Jun 21 16:25:25 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 2907224 35356 816508 0 0 309 25 524 188 1 2 95 3 0
0 0 0 2905068 35356 816560 0 0 0 0 980 1252 2 2 96 0 0
0 0 0 2905820 35356 816560 0 0 0 0 985 1157 0 2 98 0 0
zzz ***Sat Jun 21 16:25:55 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
3 0 0 2907372 35444 816576 0 0 302 25 524 196 1 2 95 3 0
0 0 0 2905200 35448 816636 0 0 0 0 939 1148 2 4 95 0 0
0 0 0 2905696 35448 816636 0 0 0 0 936 1084 1 2 98 0 0
zzz ***Sat Jun 21 16:26:25 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
3 0 0 2906880 35536 816624 0 0 295 25 524 204 1 2 95 3 0
0 0 0 2904708 35540 816664 0 0 0 0 1173 1561 3 5 92 0 0
0 0 0 2905460 35540 816664 0 0 0 0 1201 1371 2 2 96 0 0
zzz ***Sat Jun 21 16:26:55 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 2906952 35628 816700 0 0 289 25 524 212 1 1 95 3 0
0 0 0 2904672 35628 816760 0 0 0 0 994 1154 2 3 95 0 0
1 0 0 2904936 35636 816752 0 0 0 320 985 1096 1 1 96 2 0
zzz ***Sat Jun 21 16:27:26 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
2 0 0 2906544 35716 816748 0 0 283 25 524 218 1 1 95 3 0
0 0 0 2904704 35716 816788 0 0 0 0 993 1076 2 3 95 0 0
0 0 0 2904952 35724 816780 0 0 0 296 984 972 1 1 97 2 0
zzz ***Sat Jun 21 16:27:56 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
5 0 0 2906668 35804 816796 0 0 278 24 524 226 1 1 95 3 0
0 0 0 2904264 35804 816840 0 0 0 0 986 1148 2 5 94 0 0
0 0 0 2904760 35812 816832 0 0 0 316 995 1123 0 1 97 2 0
zzz ***Sat Jun 21 16:28:26 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
3 0 0 2906180 35900 816832 0 0 272 24 524 231 1 1 95 3 0
0 0 0 2904404 35900 816884 0 0 0 0 990 1084 2 4 95 0 0
0 0 0 2904668 35900 816884 0 0 0 0 969 966 1 1 99 0 0
zzz ***Sat Jun 21 16:28:56 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
3 0 0 2870476 36024 851944 0 0 278 25 524 236 1 1 95 3 0
0 0 0 2868420 36024 851996 0 0 0 0 1005 1042 2 3 95 0 0
1 0 0 2868916 36024 851996 0 0 0 0 974 1028 0 2 98 0 0
zzz ***Sat Jun 21 16:29:26 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
3 0 0 2870228 36112 851992 0 0 273 25 524 242 1 1 95 3 0
0 0 0 2868148 36112 852044 0 0 0 0 987 1197 2 4 95 0 0
0 0 0 2868652 36112 852044 0 0 0 0 975 1076 0 1 99 0 0
zzz ***Sat Jun 21 16:29:56 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 2869916 36200 852036 0 0 268 24 524 249 1 1 95 3 0
0 0 0 2868024 36200 852092 0 0 0 0 1378 1876 3 5 93 0 0
1 0 0 2868272 36200 852092 0 0 0 0 1273 1566 2 3 95 0 0
zzz ***Sat Jun 21 16:30:26 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 2869768 36304 852148 0 0 263 24 525 255 1 1 95 3 0
0 0 0 2867488 36304 852200 0 0 0 0 1019 1179 1 3 96 0 0
0 0 0 2867992 36304 852200 0 0 0 0 1002 1155 0 1 99 0 0
zzz ***Sat Jun 21 16:30:56 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
5 0 0 2868168 36404 852304 0 0 258 24 525 262 1 1 95 3 0
0 0 0 2866152 36404 852372 0 0 0 0 1020 1183 2 3 96 0 0
0 0 0 2866656 36408 852368 0 0 0 0 1001 1043 1 1 99 0 0
zzz ***Sat Jun 21 16:31:26 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 2868000 36496 852392 0 0 254 24 525 267 1 1 95 3 0
0 0 0 2866124 36496 852428 0 0 0 0 1244 1548 3 5 92 0 0
0 0 0 2866628 36496 852464 0 0 0 0 1088 1128 0 2 98 0 0
zzz ***Sat Jun 21 16:31:56 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
2 0 0 2867884 36584 852436 0 0 249 24 525 274 1 1 96 2 0
0 0 0 2865992 36584 852492 0 0 0 0 1008 1145 1 3 96 0 0
0 0 0 2866304 36584 852496 0 0 0 0 1011 1023 1 1 98 0 0
Linux OSWbb v7.3.0 localhost.localdomain
SNAP_INTERVAL 60
CPU_COUNT 2
OSWBB_ARCHIVE_DEST /opt/oswbb/archive
zzz ***Sat Jun 21 16:34:28 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 2867392 37020 852548 0 0 229 23 525 297 1 1 96 2 0
0 0 0 2865336 37020 852592 0 0 0 32 1006 1150 2 3 96 0 0
0 0 0 2865972 37020 852592 0 0 0 0 1013 1162 0 1 99 0 0
zzz ***Sat Jun 21 16:35:28 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 2831344 37228 887712 0 0 227 24 526 307 1 1 96 2 0
0 0 0 2829700 37228 887740 0 0 0 32 992 1047 2 3 95 0 0
1 0 0 2830212 37236 887732 0 0 0 284 979 965 1 2 97 0 0
zzz ***Sat Jun 21 16:36:28 CST 2014
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 2831376 37400 887756 0 0 220 23 525 313 1 1 96 2 0
0 0 0 2829716 37400 887796 0 0 0 68 995 1047 2 3 95 0 0
0 0 0 2830204 37408 887764 0 0 0 292 984 952 1 1 98 0 0
[root@localhost oswvmstat]#
类似这样的结果,不知道大家能不能看懂呢,哈哈,一般不是这样看的。
方法一:如果你的服务器有界面的话用
[root@localhost oswbb]# java -jar -Xmx512M oswbba.jar -i /opt/oswbb/archive --输入这个命令,看好在oswbb根目录下才有oswbba.jar
Starting OSW Analyzer V7.3.0
OSWatcher Analyzer Written by Oracle Center of Expertise
Copyright (c) 2014 by Oracle Corporation
Parsing Data. Please Wait...
Scanning file headers for version and platform info...
Parsing file localhost.localdomain_iostat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_iostat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_vmstat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_vmstat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_netstat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_netstat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_top_14.06.21.1600.dat ...
Parsing file localhost.localdomain_top_14.06.21.1700.dat ...
Parsing file localhost.localdomain_ps_14.06.21.1600.dat ...
Parsing file localhost.localdomain_ps_14.06.21.1700.dat ...
Parsing Completed.
Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs
Enter 6 to Generate All CPU Gif Files
Enter 7 to Generate All Memory Gif Files
Enter 8 to Generate All Disk Gif Files
Enter L to Specify Alternate Location of Gif Directory
Enter T to Alter Graph Time Scale Only (Does not change analysis dataset)
Enter D to Return to Default Graph Time Scale
Enter R to Remove Currently Displayed Graphs
Enter A to Analyze Data
Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale)
Enter P to Generate A Profile
Enter X to Export Parsed Data to File
Enter Q to Quit Program
Please Select an Option:
出现这个对话框以后,大家可以根据提示 输入1
这个时候,会自动弹出上面的图像。
方法二:服务器没有开启界面
[root@localhost oswbb]# java -jar -Xmx512M oswbba.jar -i /opt/oswbb/archive -6 -7 -P suys
Scanning file headers for version and platform info...
Parsing file localhost.localdomain_iostat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_iostat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_vmstat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_vmstat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_netstat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_netstat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_top_14.06.21.1600.dat ...
Parsing file localhost.localdomain_top_14.06.21.1700.dat ...
Parsing file localhost.localdomain_ps_14.06.21.1600.dat ...
Parsing file localhost.localdomain_ps_14.06.21.1700.dat ...
Generating file gif/Jun21162455_1403341660/OSWg_OS_Run_Queue.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Block_Queue.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Cpu_Idle.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Cpu_System.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Cpu_User.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Cpu_Wa.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Cpu_Interrupts.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Context_Switches.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Memory_Swap.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Memory_Free.gif
Generating file gif/Jun21162455_1403341660/OSWg_OS_Memory_Page_In_Rate.gif
Dates accepted. Verifying valid begin/end data points...
Validating times in the archive...
Recalibrating data...
Scanning file headers for version and platform info...
Parsing file localhost.localdomain_iostat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_iostat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_vmstat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_vmstat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_netstat_14.06.21.1600.dat ...
Parsing file localhost.localdomain_netstat_14.06.21.1700.dat ...
Parsing file localhost.localdomain_top_14.06.21.1600.dat ...
Parsing file localhost.localdomain_top_14.06.21.1700.dat ...
Parsing file localhost.localdomain_ps_14.06.21.1600.dat ...
Parsing file localhost.localdomain_ps_14.06.21.1700.dat ...
A new analysis file analysis/localhost.localdomain_1403341668894.txt has been created.
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Run_Queue.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Block_Queue.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Cpu_Idle.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Cpu_System.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Cpu_User.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Cpu_Wa.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Cpu_Interrupts.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Context_Switches.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Memory_Swap.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Memory_Free.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_Memory_Page_In_Rate.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_IO_ST.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_IO_RPS.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_IO_WPS.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_IO_PB.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_IO_PBTP_1.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_IO_PBTP_2.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_IO_PBTP_3.gif
Generating file profile/localhost.localdomain_suys/OSW_profile_files/OSWg_OS_IO_TPS.gif
[root@localhost oswbb]# ls
analysis Example_extras.txt mpsub.sh oswrds.sh tarupfiles.sh
archive Exampleprivate.net nfssub.sh oswsub.sh tar_up_partial_archive.sh
call_du.sh gif OSWatcherFM.sh profile tmp
call_sar.sh ifconfigsub.sh OSWatcher.sh psmemsub.sh topaix.sh
call_uptime.sh iosub.sh oswbba.jar src vmsub.sh
data locks oswib.sh startOSWbb.sh xtop.sh
docs ltop.sh oswnet.sh stopOSWbb.sh
[root@localhost oswbb]#
[root@localhost oswbb]# cd archive/
[root@localhost archive]# ls
oswifconfig oswmeminfo oswnetstat oswps oswtop
oswiostat oswmpstat oswprvtnet oswslabinfo oswvmstat
[root@localhost archive]# cd ..
[root@localhost oswbb]# cd p
profile/ psmemsub.sh
[root@localhost oswbb]# cd profile/localhost.localdomain_suys/
[root@localhost localhost.localdomain_suys]# ls
OSW_profile_files OSW_profile.htm
[root@localhost localhost.localdomain_suys]#
[root@localhost localhost.localdomain_suys]#
大家可以看到,这里输入相应的命令后,最后在profile/localhost.localdomain_suys下面生成了一个htm文件,下载下来还有那个文件夹啊,到本地看htm页面的
那么刚才的参数是什么意思呢,这个就不多讲了,之间把参数含义给大家奉上
OPTIONS
The following options are supported:
-i
<archive dir> Required. This is the input archive directory location.
-6
Same as option 6 from the menu. Will generate all cpu gif files.
-7
Same as option 7 from the menu. Will generate all memory gif files.
-8
Same as option 8 from the menu. Will generate all disk gif files.
-L
<location name> User specified location of an existing directory to place any gif files generated by OSWbba. This overrides the OSWbba automatic convention for placing all gif files in the /gif directory. This directory must pre-exist!
-A
<analysis name> Same as option A above. This option analyzes the files in the archive directory and produces a report
-S
<analysis name> Same as option S above. This option analyzes a specific subset of times of the files in the archive directory and produces a report. This option is used together with the -B and -E options
-START
<filename>Used with the analysis option to specify the first file located in the oswvmstat directory to analyze.
-STOP
<filename>Used with the analysis option to specify the last file located in the oswvmstat directory to analyze.
-P
<profile name> User specified name of the html profile generated by OSWbba. This overrides the oswbba automatic naming convention for html profiles. All profiles whether user specified named or auto generated named will be located in the /profile directory.
-B
<begin time> Same as option T from the menu. The begin time will allow the user to select a begin time from within the archive of files to graph/profile. This overrides the default start time which is the earliest time entry in the archive directory. The format of the start time is Mon DD HH:MM:SS YYYY. (Example :Jul 25 11:58:01 2007). An invalid begin time will result in using a default value of the first timestamp in your archive.
-E
<end time> Same as option T from the menu. The end time will allow the user to select an end time from within the archive of files to graph/profile. This overrides the default end time which is the latest time entry in the archive directory. The format of the end time is Mon DD HH:MM:SS YYYY. (Example :Jul 25 11:58:01 2007).An invalid end time will result in using a default value of the last timestamp in your archive. .
-F
<filename> Filename of a text file containing a list of options. The user can script as many options as desired by using this option. If the -F option is entered on the command line all other options are ignored and commands are only allowed through the file interface. See a sample file named oswbba_input.txt in the src directory.
-NO_IOSTAT
<filename> Ignores files in the oswiostat directory from analysis.
-NO_TOP
<filename> Ignores files in the oswtop directory from analysis.
-NO_PS
<filename> Ignores files in the oswps directory from analysis.
-NO_NETSTAT
<filename> Ignores files in the oswnetstat directory from analysis.
-NO_LINUX
<filename> Ignores files in the oswmeminfo directory from analysis.
-MEM_ALL
<filename> Analyzes virtual and resident memory allocation for all processes. This is very resource intensive.
好了,这个工具日常的用法就给大家介绍到这里,这个工具不怎么占资源的,大家可以放心使用。 版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!