cache.sim 1.4 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3 4 5


system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
S
slguan 已提交
6

S
scripts  
Shengliang Guan 已提交
7 8
system sh/cfg.sh -n dnode1 -c walLevel            -v 0
system sh/cfg.sh -n dnode2 -c walLevel            -v 0
S
slguan 已提交
9 10 11
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
S
scripts  
Shengliang Guan 已提交
12 13
system sh/cfg.sh -n dnode1 -c monitor             -v 2
system sh/cfg.sh -n dnode2 -c http                -v 1
S
slguan 已提交
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
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/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
S
slguan 已提交
38
sql create dnode $hostname2
S
slguan 已提交
39

S
scripts  
Shengliang Guan 已提交
40 41 42 43 44 45 46 47 48

sleep 10000

sql show log.tables;
if $rows != 5 then
  return -1
endi

sql select * from log.dn1
S
slguan 已提交
49 50 51 52
print ===>rows $rows
print $data00 $data01 $data02
print $data10 $data11 $data12
print $data20 $data21 $data22
S
scripts  
Shengliang Guan 已提交
53
if $rows < 10 then
S
slguan 已提交
54 55 56 57
  return -1
endi

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