之前写过《
使用字符的话,就需要调用 ./charbench ,有效的参数如下:
[oracle@db50 bin]$ ./charbench -h usage: parameters: -D <variable=value> use value for given environment variable -a run automatically -be <stopafter> end recording statistics after. Value is in the form hh:mm -bg indicate that charbench will be run in the background -bs <startafter> start recording statistics after. Value is in the form hh:mm -c <filename> specify config file -co <hostname> specify/override coordinator in configuration file. -com <comment> specify comment for this benchmark run (in double quotes) -cpuloc <hostname > specify/overide location/hostname of the cpu monitor. -cpupass specify/overide os password of the user used to monitor cpu. -cpuuser specify/overide os username of the user used to monitor cpu. -cs <connectstring> override connect string in configuration file -debug turn on debugging. Written to standard out -debugf turn on debugging. Witten to debug.log. -debugfine turn on finest level of debugging -di <shortname(s)> disable transactions(s) by short name, comma separated -dt <drivertype> override driver type in configuration file (thin, oci, ttdirect, ttclient) -dumptx output transaction response times to file -dumptxdir <directory name> directory for transaction response times files -en <shortname(s)> enable transactions(s) by short name, comma separated -env display environment configuration -f force data collection and run termination regardless of state -g <groupID> distributed group identifier -h,--help print this message -i run interactively (default) -intermax <milliseconds> override minimum inter transaction sleep time (default = 0) -intermin <milliseconds> override minimum inter transaction sleep time (default = 0) -ld <milliseconds> specify/overide the logon delay (milliseconds) -max <milliseconds> override maximum intra transaction think time in configuration file -min <milliseconds> override minimum intra transaction think time in configuration file -p <password> override password in configuration file -r <filename> specify results file -rr specify/overide refresh rate for charts in secs -rt <runtime> specify/overide run time for the benchmark. Value is in the form hh:mm -s run silent -stats <stats level> specify level result stats detail (full or simple) -u <username> override username in configuration file -uc <user count> override user count in configuration file. -v <options> display run statistics (vmstat/sar like output), options include (comma separated no spaces). trans|cpu|disk|dml|errs|tpm|tps|users|resp|vresp -vo <verboseOutput> output file for verbose output (defaults to stdout) [oracle@db50 bin]$ 而最重要的xml配置文件如果手动编辑就更是很苦恼的一件事,同样利用技巧,图形调用后配置好各参数然后另存为导出一份xml配置即可。
比如导出的xml配置文件是模拟的2000并发的OLTP类型业务,文件名取为oltp2000.xml
那么字符测试就可以直接调用:
--简单的只看事物量 [oracle@db50 bin]$ ./charbench -c oltp2000.xml --指定其中一台机器登陆信息,同时看到这台机器的CPU和I/O负载情况,以及响应时间 [oracle@db50 bin]$ ./charbench -c oltp2000.xml -cpuloc db50 -cpuuser oracle -cpupass oracle -v 'users,cpu,disk,tpm,tps,resp' > oltp2000_load50.log [oracle@db50 bin]$ ./charbench -c oltp2000.xml -cpuloc db52 -cpuuser oracle -cpupass oracle -v 'users,cpu,disk,tpm,tps,resp' > oltp2000_load52.log --准生产的数据当时没有留存,这里就用我实验环境的数据(50并发)简单说明下: [oracle@db50 bin]$ tail -20f oltp2000_load50.log Author : Dominic Giles Version : 2.5.0.971 Results will be written to results.xml. Hit Return to Terminate Run... Time Users User System Wait Idle Bi Bo TPM TPS Response 23:19:30 [0/50] 0 0 0 0 0 0 0 0 0 23:19:33 [0/50] 0 0 0 0 0 0 0 0 0 23:19:34 [0/50] 11 22 2 65 19
