TDengine 系列四 常用操作

[root@taos192 TDengine-server-2.1.2.0]# docker exec -it taos192 taosd -C
taos global config:
==================================
 serverPort:             6030 
 arbitrator:              
 numOfMnodes:            3 
 vnodeBak:               1 
 telemetryReporting:     1 
 balance:                1 
 balanceInterval:        300 
 maxTmrCtrl:             512 
 offlineThreshold:       864000(s)
 statusInterval:         1(s)
 minSlidingTime:         10(ms)
 minIntervalTime:        10(ms)
 maxStreamCompDelay:     20000(ms)
 maxFirstStreamCompDelay:10000(ms)
 retryStreamCompDelay:   10000(ms)
 streamCompDelayRatio:   0.100000 
 maxVgroupsPerDb:        0 
 maxTablesPerVnode:      1000000 
 minTablesPerVnode:      1000 
 tableIncStepPerVnode:   1000 
 cache:                  16(Mb)
 blocks:                 6 
 days:                   10 
 keep:                   3650 
 minRows:                100 
 maxRows:                4096 
 comp:                   2 
 walLevel:               1 
 fsync:                  3000 
 replica:                1 
 partitions:             4 
 quorum:                 1 
 update:                 0 
 compressMsgSize:        -1 
 maxSQLLength:           1048576(byte)
 maxNumOfOrderedRes:     100000 
 queryBufferSize:        -1(byte)
 retrieveBlockingModel:  0 
 keepColumnName:         0 
 timezone:                
 locale:                  
 charset:                 
 maxShellConns:          50000 
 maxConnections:         5000 
 minimalLogDirGB:        1.000000(GB)
 minimalTmpDirGB:        1.000000(GB)
 minimalDataDirGB:       2.000000(GB)
 mnodeEqualVnodeNum:     4 
 flowctrl:               1 
 slaveQuery:             1 
 adjustMaster:           1 
 http:                   1 
 mqtt:                   0 
 monitor:                1 
 stream:                 1 
 telegrafUseFieldNum:    0 
 gitinfo:                2019939bcc5567212d6e07af557c2c4ea540c091 
 gitinfoOfInternal:      NULL 
 buildinfo:              Built at 2021-06-07 14:27 
 version:                2.1.2.0 

taos local config:
==================================
 firstEp:                 
 secondEp:                
 fqdn:                    
 configDir:              /etc/taos 
 logDir:                 /var/log/taos 
 scriptDir:              /etc/taos 
 numOfThreadsPerCore:    1.000000 
 numOfCommitThreads:     4 
 ratioOfQueryCores:      1.000000 
 role:                   0 
 monitorInterval:        30(s)
 rpcTimer:               300(ms)
 rpcForceTcp:            0 
 rpcMaxTime:             600(s)
 shellActivityTimer:     3(s)
 httpEnableRecordSql:    0 
 httpMaxThreads:         2 
 restfulRowLimit:        10240 
 numOfLogLines:          10000000 
 logKeepDays:            0 
 asyncLog:               1 
 debugFlag:              0 
 mDebugFlag:             131 
 dDebugFlag:             135 
 sDebugFlag:             135 
 wDebugFlag:             135 
 sdbDebugFlag:           131 
 rpcDebugFlag:           131 
 tmrDebugFlag:           131 
 cDebugFlag:             131 
 jniDebugFlag:           131 
 odbcDebugFlag:          131 
 uDebugFlag:             131 
 httpDebugFlag:          131 
 mqttDebugFlag:          131 
 monDebugFlag:           131 
 qDebugFlag:             131 
 vDebugFlag:             135 
 tsdbDebugFlag:          131 
 cqDebugFlag:            131 
 enableRecordSql:        0 
 enableCoreFile:         0 
 maxBinaryDisplayWidth:  30 
 tempDir:                /tmp/ 

 

[root@taos192 TDengine-server-2.1.2.0]# docker exec -it taos192 tail -f  /var/log/taos/taosdlog.0
06/18 06:18:18.234749 00000028 MND stable:0.pdas.dw_reportimsi, is created in sdb, uid:309103292896523030
06/18 06:18:23.236948 00000025 MND user:root login from 10.60.100.192, result:success
06/18 06:18:23.237437 00000023 MND msg:0x7f2dbc00ba40, app:0x4 table:0.pdas.dw_reportimsi, start to drop stable, uid:309103292896523030, numOfChildTables:0, sizeOfVgList:0
06/18 06:18:23.237449 00000023 MND msg:0x7f2dbc00ba40, app:0x4 stable:0.pdas.dw_reportimsi will be dropped, hash:(nil) sizeOfVgList:0
06/18 06:18:23.237456 00000023 MND stable:0.pdas.dw_reportimsi uid:309103292896523030, all child tables:0 will be dropped from sdb
06/18 06:18:23.239027 00000023 MND stable:0.pdas.dw_reportimsi, all child tables:0 is dropped from sdb
06/18 06:18:23.253328 00000028 MND msg:0x7f2dbc00ba40, app:0x4 stable:0.pdas.dw_reportimsi, is dropped from sdb
06/18 06:18:50.562164 00000024 MND user:root login from 10.60.100.192, result:success
06/18 06:19:05.666374 00000025 MND user:root login from 10.60.100.192, result:success
06/18 06:19:05.694857 00000028 MND stable:0.pdas.dw_reportimsi, is created in sdb, uid:309899375990027765

  taos -s "CREATE DATABASE pdas KEEP 365 DAYS 10 BLOCKS 4 UPDATE 1;"

 taos -d pdas -f onetable.txt

 


CREATE STABLE dw_reportimsi( \
  ts timestamp,\
  id bigint, \
  device_name nchar(60),\
  equip_id nchar(60), \
   imsi nchar(60),\
   imei nchar(60),\
   source_tac bigint, \
   cell_no bigint,\
   mcc bigint,\
   mnc bigint, \
   equip_longitude nchar(60),\
   equip_latitude nchar(60), \
   belong nchar(60),\
   address nchar(60),\
   rssi nchar(60),\
   phone_num nchar(60)  \
)tags(location binary(64),  groupdId int);

 taos -d pdas -s "describe dw_reportimsi";

 

taos> describe dw_reportimsi
             Field              |         Type         |   Length    |   Note   |
=================================================================================
 ts                             | TIMESTAMP            |           8 |          |
 id                             | BIGINT               |           8 |          |
 device_name                    | NCHAR                |          60 |          |
 equip_id                       | NCHAR                |          60 |          |
 imsi                           | NCHAR                |          60 |          |
 imei                           | NCHAR                |          60 |          |
 source_tac                     | BIGINT               |           8 |          |
 cell_no                        | BIGINT               |           8 |          |
 mcc                            | BIGINT               |           8 |          |
 mnc                            | BIGINT               |           8 |          |
 equip_longitude                | NCHAR                |          60 |          |
 equip_latitude                 | NCHAR                |          60 |          |
 belong                         | NCHAR                |          60 |          |
 address                        | NCHAR                |          60 |          |
 rssi                           | NCHAR                |          60 |          |
 phone_num                      | NCHAR                |          60 |          |
 location                       | BINARY               |          64 | TAG      |
 groupdid                       | INT                  |           4 | TAG      |
Query OK, 18 row(s) in set (0.004082s)

select server_version();

select client_version();

 

create table  dw_reportimsi_1 using dw_reportimsi tags('shanghai.songjiang',1);

taos> create table  dw_reportimsi_1 using dw_reportimsi tags('shanghai.songjiang',1);
Query OK, 0 of 0 row(s) in database (0.144069s)

taos> show tables;
           table_name           |      created_time       | columns |          stable_name           |          uid          |     tid     |    vgId     |
==========================================================================================================================================================
 dw_reportimsi_1                | 2021-06-18 15:20:18.696 |      16 | dw_reportimsi                  |      1970324853766386 |           1 |           7 |
Query OK, 1 row(s) in set (0.004911s)

taos> show stables;
              name              |      created_time       | columns |  tags  |   tables    |
============================================================================================
 dw_reportimsi                  | 2021-06-18 14:19:05.667 |      16 |      2 |           1 |
Query OK, 1 row(s) in set (0.001165s)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

dualven_in_csdn

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值