blob: bfdf910b6b210c4b64f5141f3d618d5f99fd51dc [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[501],{899:function(t,e,a){"use strict";a.r(e);var s=a(29),r=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h2",{attrs:{id:"监控工具"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#监控工具"}},[t._v("#")]),t._v(" 监控工具")]),t._v(" "),e("h3",{attrs:{id:"系统监控"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#系统监控"}},[t._v("#")]),t._v(" 系统监控")]),t._v(" "),e("p",[t._v("当前用户可以使用 Java 的 JConsole 工具对正在运行的 IoTDB 进程进行系统状态监控,或使用 IoTDB 为用户开放的接口查看数据统计量。")]),t._v(" "),e("h4",{attrs:{id:"系统状态监控"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#系统状态监控"}},[t._v("#")]),t._v(" 系统状态监控")]),t._v(" "),e("p",[t._v("进入 Jconsole 监控页面后,首先看到的是 IoTDB 各类运行情况的概览。在这里,您可以看到堆内存信息、线程信息、类信息以及服务器的 CPU 使用情况。")]),t._v(" "),e("h4",{attrs:{id:"jmx-mbean-监控"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#jmx-mbean-监控"}},[t._v("#")]),t._v(" JMX MBean 监控")]),t._v(" "),e("p",[t._v('通过使用 JConsole 工具并与 JMX 连接,您可以查看一些系统统计信息和参数。\n本节描述如何使用 JConsole 的 "Mbean" 选项卡来监视 IoTDB 的一些系统配置、写入数据统计等等。 连接到 JMX 后,您可以通过 "MBeans" 标签找到名为 "org.apache.iotdb.service" 的 "MBean",如下图所示。')]),t._v(" "),e("p",[e("img",{staticStyle:{width:"100%","max-width":"800px","max-height":"600px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://user-images.githubusercontent.com/46039728/149951720-707f1ee8-32ee-4fde-9252-048caebd232e.png"}}),t._v(" "),e("br")]),t._v(" "),e("h4",{attrs:{id:"系统监控框架监控"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#系统监控框架监控"}},[t._v("#")]),t._v(" 系统监控框架监控")]),t._v(" "),e("p",[e("RouterLink",{attrs:{to:"/zh/UserGuide/Master/Maintenance-Tools/Metric-Tool.html"}},[t._v("监控工具")])],1),t._v(" "),e("h3",{attrs:{id:"性能监控"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#性能监控"}},[t._v("#")]),t._v(" 性能监控")]),t._v(" "),e("h4",{attrs:{id:"介绍"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#介绍"}},[t._v("#")]),t._v(" 介绍")]),t._v(" "),e("p",[t._v("性能监控模块用来监控 IOTDB 每一个操作的耗时,以便用户更好的了解数据库的整体性能。此模块会统计每一种操作的平均耗时,以及耗时在一定时间区间内(1ms,4ms,16ms,64ms,256ms,1024ms,以上)的操作的比例。输出文件在 log_measure.log 中。输出样例如下:")]),t._v(" "),e("img",{staticStyle:{width:"100%","max-width":"800px","max-height":"600px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://user-images.githubusercontent.com/13203019/60937461-14296f80-a303-11e9-9602-a7bed624bfb3.png"}}),t._v(" "),e("h4",{attrs:{id:"配置参数"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#配置参数"}},[t._v("#")]),t._v(" 配置参数")]),t._v(" "),e("p",[t._v("配置文件位置:conf/iotdb-datanode.properties")]),t._v(" "),e("center",[e("p",[e("strong",[t._v("表 -配置参数以及描述项")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"left"}},[t._v("参数")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("默认值")]),t._v(" "),e("th",{staticStyle:{"text-align":"left"}},[t._v("描述")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"left"}},[t._v("enable_performance_stat")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("false")]),t._v(" "),e("td",{staticStyle:{"text-align":"left"}},[t._v("是否开启性能监控模块")])])])])]),t._v(" "),e("h3",{attrs:{id:"cache-命中率统计"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#cache-命中率统计"}},[t._v("#")]),t._v(" cache 命中率统计")]),t._v(" "),e("h4",{attrs:{id:"概述"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#概述"}},[t._v("#")]),t._v(" 概述")]),t._v(" "),e("p",[t._v("为了提高查询性能,IOTDB 对 ChunkMetaData 和 TsFileMetaData 进行了缓存。用户可以通过 debug 级别的日志以及 MXBean 两种方式来查看缓存的命中率,并根据缓存命中率以及系统内存来调节缓存所使用的内存大小。使用 MXBean 查看缓存命中率的方法为:")]),t._v(" "),e("ol",[e("li",[t._v("通过端口 31999 连接 jconsole,并在上方菜单项中选择‘MBean’.")]),t._v(" "),e("li",[t._v("展开侧边框并选择 'org.apache.iotdb.db.service'. 将会得到如下图所示结果:")])]),t._v(" "),e("img",{staticStyle:{width:"100%","max-width":"800px","max-height":"600px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://user-images.githubusercontent.com/19167280/112426760-73e3da80-8d73-11eb-9a8f-9232d1f2033b.png"}}),t._v(" "),e("h2",{attrs:{id:"系统日志"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#系统日志"}},[t._v("#")]),t._v(" 系统日志")]),t._v(" "),e("p",[t._v("IoTDB 支持用户通过修改日志配置文件的方式对 IoTDB 系统日志(如日志输出级别等)进行配置,系统日志配置文件默认位置在$IOTDB_HOME/conf 文件夹下,默认的日志配置文件名为 logback.xml。用户可以通过增加或更改其中的 xml 树型节点参数对系统运行日志的相关配置进行修改。详细配置说明参看本文日志文件配置说明。")]),t._v(" "),e("p",[t._v("同时,为了方便在系统运行过程中运维人员对系统的调试,我们为系统运维人员提供了动态修改日志配置的 JMX 接口,能够在系统不重启的前提下实时对系统的 Log 模块进行配置。详细使用方法参看动态系统日志配置说明)。")]),t._v(" "),e("h3",{attrs:{id:"动态系统日志配置说明"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#动态系统日志配置说明"}},[t._v("#")]),t._v(" 动态系统日志配置说明")]),t._v(" "),e("h4",{attrs:{id:"连接-jmx"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#连接-jmx"}},[t._v("#")]),t._v(" 连接 JMX")]),t._v(" "),e("p",[t._v("本节以 Jconsole 为例介绍连接 JMX 并进入动态系统日志配置模块的方法。启动 Jconsole 控制页面,在新建连接处建立与 IoTDB Server 的 JMX 连接(可以选择本地进程或给定 IoTDB 的 IP 及 PORT 进行远程连接,IoTDB 的 JMX 服务默认运行端口为 31999),如下图使用远程进程连接 Localhost 下运行在 31999 端口的 IoTDB JMX 服务。")]),t._v(" "),e("img",{staticStyle:{width:"100%","max-width":"800px","max-height":"600px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://user-images.githubusercontent.com/13203019/51577195-f94d7500-1ef3-11e9-999a-b4f67055d80e.png"}}),t._v(" "),e("p",[t._v("连接到 JMX 后,您可以通过 MBean 选项卡找到名为"),e("code",[t._v("ch.qos.logback.classic")]),t._v("的"),e("code",[t._v("MBean")]),t._v(",如下图所示。")]),t._v(" "),e("img",{staticStyle:{width:"100%","max-width":"800px","max-height":"600px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://user-images.githubusercontent.com/13203019/51577204-fe122900-1ef3-11e9-9e89-2eb1d46e24b8.png"}}),t._v(" "),e("p",[t._v("在"),e("code",[t._v("ch.qos.logback.classic")]),t._v("的 MBean 操作(Operations)选项中,可以看到当前动态系统日志配置支持的 6 种接口,您可以通过使用相应的方法,来执行相应的操作,操作页面如图。")]),t._v(" "),e("img",{staticStyle:{width:"100%","max-width":"800px","max-height":"600px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://user-images.githubusercontent.com/13203019/51577216-09fdeb00-1ef4-11e9-9005-542ad7d9e9e0.png"}}),t._v(" "),e("h4",{attrs:{id:"动态系统日志接口说明"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#动态系统日志接口说明"}},[t._v("#")]),t._v(" 动态系统日志接口说明")]),t._v(" "),e("ul",[e("li",[t._v("reloadDefaultConfiguration 接口")])]),t._v(" "),e("p",[t._v("该方法为重新加载默认的 logback 配置文件,用户可以先对默认的配置文件进行修改,然后调用该方法将修改后的配置文件重新加载到系统中,使其生效。")]),t._v(" "),e("ul",[e("li",[t._v("reloadByFileName 接口")])]),t._v(" "),e("p",[t._v("该方法为加载一个指定路径的 logback 配置文件,并使其生效。该方法接受一个名为 p1 的 String 类型的参数,该参数为需要指定加载的配置文件路径。")]),t._v(" "),e("ul",[e("li",[t._v("getLoggerEffectiveLevel 接口")])]),t._v(" "),e("p",[t._v("该方法为获取指定 Logger 当前生效的日志级别。该方法接受一个名为 p1 的 String 类型的参数,该参数为指定 Logger 的名称。该方法返回指定 Logger 当前生效的日志级别。")]),t._v(" "),e("ul",[e("li",[t._v("getLoggerLevel 接口")])]),t._v(" "),e("p",[t._v("该方法为获取指定 Logger 的日志级别。该方法接受一个名为 p1 的 String 类型的参数,该参数为指定 Logger 的名称。该方法返回指定 Logger 的日志级别。")]),t._v(" "),e("p",[t._v("需要注意的是,该方法与"),e("code",[t._v("getLoggerEffectiveLevel")]),t._v("方法的区别在于,该方法返回的是指定 Logger 在配置文件中被设定的日志级别,如果用户没有对该 Logger 进行日志级别的设定,则返回空。按照 Logback 的日志级别继承机制,如果一个 Logger 没有被显示地设定日志级别,其将会从其最近的祖先继承日志级别的设定。这时,调用"),e("code",[t._v("getLoggerEffectiveLevel")]),t._v("方法将返回该 Logger 生效的日志级别;而调用本节所述方法,将返回空。")]),t._v(" "),e("ul",[e("li",[t._v("setLoggerLevel 接口")])]),t._v(" "),e("p",[t._v("该方法为设置指定 Logger 的日志级别。该方法接受一个名为 p1 的 String 类型的参数和一个名为 p2 的 String 类型的参数,分别指定 Logger 的名称和目标的日志等级。")])],1)}),[],!1,null,null,null);e.default=r.exports}}]);