把測(cè)試代碼ServerAio.class,ClientAio.class打包成jar,丟給linux系統(tǒng)跑server,window跑client
其中添加兩個(gè)shell文件,因?yàn)樵到y(tǒng)裝有java6,建立個(gè)sh不同版本java共存
java8.sh
/down/jdk1.8.0_131/bin/java $@
systeminfo.sh
echo "系統(tǒng)"head -n 1 /etc/issueecho cpucat /proc/cpuinfo |grep "model name" && cat /proc/cpuinfo |grep "physical id"echo "內(nèi)存"cat /proc/meminfo |grep MemTotal | awk 'BEGIN{sum=0} !/^d/{sum=$2} END{print "Memtotal is:",sum/1024,"M"}'
jdk:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
system:
系統(tǒng)
CentOS release 5.5 (Final)
cpu
model name : Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
model name : Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
model name : Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
model name : Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
內(nèi)存
Memtotal is: 7983.66 M
首次測(cè)試時(shí)出現(xiàn)異常:java.io.IOException: Too many open files
網(wǎng)友評(píng)論