Java Management Extensions(JMX)提供有关在JVM中运行的Java虚拟机和软件的信息. JMX连接器用于查询Presto服务器中的JMX信息.
因为我们已经在"etc/catalog下启用了"jmx.properties"文件"目录.现在连接Perst CLI以启用JMX插件.
$ ./presto --server localhost:8080 --catalog jmx --schema jmx
您将收到以下回复.
presto:jmx>
要列出"jmx"中的所有模式,请输入以下查询.
presto:jmx> show schemas from jmx;
Schema -------------------- information_schema current
要查看"当前"模式中的表,请使用以下命令.
presto:jmx> show tables from jmx.current;
Table ------------------------------------------------------------------------------ com.facebook.presto.execution.scheduler:name = nodescheduler com.facebook.presto.execution:name = queryexecution com.facebook.presto.execution:name = querymanager com.facebook.presto.execution:name = remotetaskfactory com.facebook.presto.execution:name = taskexecutor com.facebook.presto.execution:name = taskmanager com.facebook.presto.execution:type = queryqueue,name = global,expansion = global ……………… ……………….
presto:jmx> select * from jmx.current."java.lang:type = compilation";
node | compilationtimemonitoringsupported | name | objectname | totalcompilationti --------------------------------------+------------------------------------+--------------------------------+----------------------------+------------------- ffffffff-ffff-ffff-ffff-ffffffffffff | true | HotSpot 64-Bit Tiered Compilers | java.lang:type=Compilation | 1276
presto:jmx> select * from jmx.current."com.facebook.presto.server:name = taskresource";
node | readfromoutputbuffertime.alltime.count | readfromoutputbuffertime.alltime.max | readfromoutputbuffertime.alltime.maxer --------------------------------------+---------------------------------------+--------------------------------------+--------------------------------------- ffffffff-ffff-ffff-ffff-ffffffffffff | 92.0 | 1.009106149 |