monitor.h 1.6 KB
Newer Older
H
hzcheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
 *
 * This program is free software: you can use, redistribute, and/or modify
 * it under the terms of the GNU Affero General Public License, version 3
 * or later ("AGPL"), as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

S
dnode  
slguan 已提交
16 17
#ifndef TDENGINE_MONITOR_H
#define TDENGINE_MONITOR_H
H
hzcheng 已提交
18

S
dnode  
slguan 已提交
19 20 21
#ifdef __cplusplus
extern "C" {
#endif
H
hzcheng 已提交
22

S
dnode  
slguan 已提交
23
#include <stdint.h>
S
slguan 已提交
24

S
slguan 已提交
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
typedef struct {
  char *  acctId;
  int64_t currentPointsPerSecond;
  int64_t maxPointsPerSecond;
  int64_t totalTimeSeries;
  int64_t maxTimeSeries;
  int64_t totalStorage;
  int64_t maxStorage;
  int64_t totalQueryTime;
  int64_t maxQueryTime;
  int64_t totalInbound;
  int64_t maxInbound;
  int64_t totalOutbound;
  int64_t maxOutbound;
  int64_t totalDbs;
  int64_t maxDbs;
  int64_t totalUsers;
  int64_t maxUsers;
  int64_t totalStreams;
  int64_t maxStreams;
  int64_t totalConns;
  int64_t maxConns;
  int8_t  accessState;
} SAcctMonitorObj;

S
dnode  
slguan 已提交
50 51
int32_t monitorInitSystem();
int32_t monitorStartSystem();
S
slguan 已提交
52 53 54 55 56
void    monitorStopSystem();
void    monitorCleanUpSystem();
void    monitorSaveAcctLog(SAcctMonitorObj *pMonObj);
void    monitorSaveLog(int32_t level, const char *const format, ...);
void    monitorExecuteSQL(char *sql);
S
dnode  
slguan 已提交
57 58 59 60 61 62

#ifdef __cplusplus
}
#endif

#endif