cache.sim 1.5 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

7 8
system sh/cfg.sh -n dnode1 -c walLevel            -v 1
system sh/cfg.sh -n dnode2 -c walLevel            -v 1
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
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
H
Haojun Liao 已提交
20
sleep 2000
S
slguan 已提交
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
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 

H
Haojun Liao 已提交
36
sleep 2000
S
slguan 已提交
37
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

sleep 10000

sql show log.tables;
G
Ganlin Zhao 已提交
44
if $rows > 20 then
S
scripts  
Shengliang Guan 已提交
45 46 47 48
  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
G
Ganlin Zhao 已提交
53
if $rows < 9 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)
58 59 60 61 62 63 64 65

sql show log.vgroups
if $data05 != master then
  return -1
endi
if $data15 != master then
  return -1
endi