Faban的一些问题

1.JAVA_HOME位置:/usr/jdk1.7.0_21;Netbeans位置:/opt/netbeans;Faban位置:/opt/faban.

export JAVA_HOME=/usr/jdk1.7.0_21

export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=
.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar


2.开始faban:/opt/faban/master/bin/startup.sh
3.安装ssh:sudo apt-get install openssh-server。
4.1.ssh无密码访问:shu@tom:~$ ssh-keygen -t rsa。然后:cp id_rsa.pub authorized_keys

4.2.将/etc/ssh/ssh_config文件中的这条信息做如下更改:

StrictHostKeyChecking no :“StrictHostKeyChecking”如果设置成“yes”,ssh就不会自动把计算机的密匙加入

4.3.Exception in thread "main" java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:

5.问题:faban要求是最新的,否则会出错。

6.需要使用到mpstat来搜集cpu信息,安装命令是sudo apt-get install sysstat。

7.机器必须是可以使用ping命令访问其他网址的,公司内部网一般不行。

8.目前的一个问题是:java.io.IOException: Cannot run program "/opt/faban/bin/Linux/vmstat-post": error=2, ?????????。这个vmstat-post是一个脚本,存在的,不过不知道为什么不能运行。

是不是因为jdk是1.7,而不是1.6的缘故?

9.安装apache2,使用sudo apt-get install apache2.有个DocumentRoot directory,这个是/var/www.下载samplewebapp之后mv到/var/www里面,然后通过http://localhost/samplewebapp/home就可有访问.

10.把corehttp中的maxth改成1000后就失败了。

11.运行sampleweb时提示SampleWebAgent[0]: Rampup too short. Could not run calibration. Please increase rampup by at least 7 seconds.要修改rampup时间。但是run.xml里面已经是20s了。runconfig的单位是以s为单位的。

12.在apache的日志文件/var/log/apache2中保存着日志文件access.log,日志记录形式:

127.0.0.1 - - [15/May/2013:20:36:31 +0800] "GET /samplewebapp/contacts.html HTTP/1.1" 200 1267 "-" "Jakarta Commons-HttpClient/3.1"
127.0.0.1 - - [15/May/2013:20:36:31 +0800] "GET /samplewebapp/home.html HTTP/1.1" 200 1004 "-" "Jakarta Commons-HttpClient/3.1"
127.0.0.1 - - [15/May/2013:20:36:31 +0800] "GET /samplewebapp/products.html HTTP/1.1" 200 1115 "-" "Jakarta Commons-HttpClient/3.1"
127.0.0.1 - - [15/May/2013:20:36:31 +0800] "GET /samplewebapp/home.html HTTP/1.1" 200 1004 "-" "Jakarta Commons-HttpClient/3.1"

即%h %l %u %t %r %>s %b %{Referer}i %{User-Agent}i

如果没有信息用-表示。因此可以写个程序分析这个日志文件,提取出每个时间段的访问量。

13.按照google group中的方法把config中的配置更改为FINEST,就会在log中记录很多的操作,不过这个log太大了,有400M,根本没有办法在网页中找到分析。或许可以把log文件提取出来用脚本分析。

14.那天看了python,据说比较适合做跨平台的脚本来分析文件。这个可以看下。

15.增大rampup时间,还有load变化文件中每段的持续时间,30s可能太短了。

16.

Linux系统为Ubuntu

一、Start Apache 2 Server /启动apache服务

# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start

二、 Restart Apache 2 Server /重启apache服务

# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart

三、Stop Apache 2 Server /停止apache服务

# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop

17.远程桌面链接到linux。在实验室的机器上安装了vnc,链接信息如下:


New 'ubuntu:1 (lmp)' desktop is ubuntu:1

Creating default startup script /home/lmp/.vnc/xstartup
Starting applications specified in /home/lmp/.vnc/xstartup
Log file is /home/lmp/.vnc/ubuntu:1.log

猜你喜欢

转载自summerli.iteye.com/blog/1869441