system sh/stop_dnodes.sh
system sh/ip.sh -i 1 -s up
system sh/ip.sh -i 2 -s up
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2

system sh/cfg.sh -n dnode1 -c commitLog           -v 0
system sh/cfg.sh -n dnode2 -c commitLog           -v 0
system sh/cfg.sh -n dnode1 -c httpMaxThreads      -v 2
system sh/cfg.sh -n dnode2 -c httpMaxThreads      -v 2
system sh/cfg.sh -n dnode1 -c monitor             -v 1
system sh/cfg.sh -n dnode2 -c http          -v 1
system sh/cfg.sh -n dnode1 -c enableHttp          -v 1
system sh/cfg.sh -n dnode2 -c monitor             -v 1
system sh/cfg.sh -n dnode1 -c monitorInterval     -v 1
system sh/cfg.sh -n dnode2 -c monitorInterval     -v 1

system sh/cfg.sh -n dnode1 -c maxVnodeConnections -v 30000
system sh/cfg.sh -n dnode2 -c maxVnodeConnections -v 30000
system sh/cfg.sh -n dnode1 -c maxMgmtConnections  -v 30000
system sh/cfg.sh -n dnode2 -c maxMgmtConnections  -v 30000
system sh/cfg.sh -n dnode1 -c maxMeterConnections -v 30000
system sh/cfg.sh -n dnode2 -c maxMeterConnections -v 30000
system sh/cfg.sh -n dnode1 -c maxShellConns       -v 30000
system sh/cfg.sh -n dnode2 -c maxShellConns       -v 30000

system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect

sql create database testdb
sql use testdb
sql create table meter1 (ts timestamp, val int)

$x = 0
$v = -100
while $x < 30
    $v = $v + 1
	$ms = $v . m 
	sql insert into meter1 values (now  $ms , $x ) 
	$x = $x + 1
endw 

sleep 3000
system sh/exec.sh -n dnode2 -s start
sql create dnode 192.168.0.2

sleep 20000
sql select * from log.dn_192_168_0_1
print ===>rows $rows
print $data00 $data01 $data02
print $data10 $data11 $data12
print $data20 $data21 $data22
if $rows < 20 then
  return -1
endi

#sql create table sys.st as select avg(taosd), avg(system) from sys.cpu interval(30s)
