stream_on_sys.sim 1.9 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3

system sh/deploy.sh -n dnode1 -i 1
H
hjxilinx 已提交
4
system sh/cfg.sh -n dnode1 -c walLevel -v 0
S
slguan 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
system sh/cfg.sh -n dnode1 -c monitor       -v 1
system sh/cfg.sh -n dnode1 -c monitorInterval     -v 1
system sh/exec.sh -n dnode1 -s start

sleep 3000
sql connect
print ======================== stream_on_sys.sim

$db = log
$tb = tb
$mt = mt
$strm = strm
$tbNum = 10
$rowNum = 20
$totalNum = 200

$i = 0

sql use $db

sql create table cpustrm as select count(*), avg(cpu_taosd), max(cpu_taosd), min(cpu_taosd), avg(cpu_system), max(cpu_cores), min(cpu_cores), last(cpu_cores) from log.dn_192_168_0_1 interval(4s) sliding(2s)
sql create table memstrm as select count(*), avg(mem_taosd), max(mem_taosd), min(mem_taosd), avg(mem_system), first(mem_total), last(mem_total) from log.dn_192_168_0_1 interval(4s) sliding(2s)
sql create table diskstrm as select count(*), avg(disk_used), last(disk_used), avg(disk_total), first(disk_total) from log.dn_192_168_0_1 interval(4s) sliding(2s)
sql create table bandstrm as select count(*), avg(band_speed), last(band_speed) from log.dn_192_168_0_1 interval(4s) sliding(2s)
sql create table reqstrm as select count(*), avg(req_http), last(req_http), avg(req_select), last(req_select), avg(req_insert), last(req_insert) from log.dn_192_168_0_1 interval(4s) sliding(2s)
sql create table iostrm as select count(*), avg(io_read), last(io_read), avg(io_write), last(io_write) from log.dn_192_168_0_1 interval(4s) sliding(2s)
sleep 20000
sql select * from cpustrm
if $rows <= 0 then
  return -1
endi

sql select * from memstrm
if $rows <= 0 then
  return -1
endi

sql select * from diskstrm
if $rows <= 0 then
  return -1
endi

sql select * from bandstrm
if $rows <= 0 then
  return -1
endi

sql select * from reqstrm
if $rows <= 0 then
  return -1
endi

sql select * from iostrm
if $rows <= 0 then
  return -1
endi
S
scripts  
Shengliang Guan 已提交
61 62

system sh/exec.sh -n dnode1 -s stop -x SIGINT