上篇最后提到了jstat,jstat可以查看统计JVM内存信息,那么结合Zabbix,就可以监控多实例的JVM内存了。

1、下面两个脚本部署在被监控主机:

vm.py

用于JVM实例PID查找,ps命令亦可以换成jdk自带的jps工具:

#!/usr/bin.python
#
import os
import json data = {}
tcp_list = []
port_list = []
command = "ps -ef | grep weblogic.Server | grep -v \"grep web\" | awk '{print $2}'"
lines = os.popen(command).readlines()
for line in lines:
port=line.strip('\n')
# port = line.split(':')[1]
port_list.append(port) for port in list(set(port_list)):
port_dict = {}
port_dict['{#PID}'] = port
tcp_list.append(port_dict) data['data'] = tcp_list
jsonStr = json.dumps(data, sort_keys=True, indent=4)
print jsonStr

getvm.sh

统计内存使用情况脚本,需修改JAVA_HOME环境变量:

#!/bin/bash
#
JAVA_HOME="/u01/Middleware/jdk1.6.0_45"
javapid=$2 #S0
function s0 {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $1}')
} #S1
function s1 {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $2}')
} #Eden
function eden {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $3}')
} #Old
function old {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $4}')
}
#Perm
function perm {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $5}')
}
#YGC
function ygc {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $6}')
}
#YGCT
function ygct {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $7}')
} #FGC
function fgc {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $8}')
}
#FGCT
function fgct {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $9}')
}
#GCT
function gct {
echo $(sudo -u weblogic ${JAVA_HOME}/bin/jstat -gccause $javapid | awk '{if(NR!=1) print $10}')
} $1 exit $?

2、增加被监控主机zabbix_agentd配置文件

/etc/zabbix/zabbix_agentd.d下添加配置文件,jvm.conf

根据脚本实际目录配置:

UserParameter=java.pid,/home/weblogic/zabbix/vm.py

UserParameter=java.memory[*],/home/weblogic/zabbix/getvm.sh $1 $2

3、 为zabbix运行脚本授权

zabbix      ALL=(user)     NOPASSWD: /u01/Middleware/jdk1.6.0_45/bin/jstat,/usr/bin/python

Defaults    !requiretty

4、 zabbix server端测试

./zabbix_get -s 192.168.1.109 -p 10050 -k 'java.pid'

{

    "data": [

        {

            "{#PID}": "8817"

        },

        {

            "{#PID}": "9041"

        },

        {

            "{#PID}": "3929"

        },

        {

            "{#PID}": "8620"

        }

    ]

}

./zabbix_get -s 192.168.1.109 -p 10050 -k 'java.memory[old,8817]'

5.83

5、zabbix导入模板(在最后),监控即可,如果要自己配置自动发现,参考前面文章Zabbix添加自定义监控项(一)

xml模板:

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>3.2</version>
<date>2017-06-13T05:25:25Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>JVM Memory</template>
<name>JVM Memory</name>
<description/>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<items/>
<discovery_rules>
<discovery_rule>
<name>Get weblogic pid</name>
<type>0</type>
<snmp_community/>
<snmp_oid/>
<key>java.pid</key>
<delay>60</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<delay_flex/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<filter>
<evaltype>0</evaltype>
<formula/>
<conditions/>
</filter>
<lifetime>7</lifetime>
<description/>
<item_prototypes>
<item_prototype>
<name>JVM EDEN MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[eden,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>%</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>Heap上的 Eden space 区已使用空间的百分比</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM FGC MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[fgc,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>次</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>从应用程序启动到采样时发生 Full GC 的次数</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM FGCT MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[fgct,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>s</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>从应用程序启动到采样时 Full GC 所用的时间(单位秒)</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM GCT MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[gct,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>s</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>从应用程序启动到采样时用于垃圾回收的总时间(单位秒)</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM OLD MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[old,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>%</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>Heap上的 Old space 区已使用空间的百分比</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM PERM MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[perm,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>%</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>Perm space 区已使用空间的百分比</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM S0 MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[s0,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>%</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>s0区内存大小</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM S1 MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[s1,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>%</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>s1区内存大小</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM YGC MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[ygc,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>次</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>从应用程序启动到采样时发生 Young GC 的次数</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
<item_prototype>
<name>JVM YGCT MEMORY USED ON PID {#PID}</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>java.memory[ygct,{#PID}]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>s</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>从应用程序启动到采样时 Young GC 所用的时间(单位秒)</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>JVM</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<application_prototypes/>
</item_prototype>
</item_prototypes>
<trigger_prototypes/>
<graph_prototypes>
<graph_prototype>
<name>JVM GC FREQUENCY ON {#PID}</name>
<width>900</width>
<height>200</height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period>1</show_work_period>
<show_triggers>1</show_triggers>
<type>0</type>
<show_legend>1</show_legend>
<show_3d>0</show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1>0</ymin_type_1>
<ymax_type_1>0</ymax_type_1>
<ymin_item_1>0</ymin_item_1>
<ymax_item_1>0</ymax_item_1>
<graph_items>
<graph_item>
<sortorder>0</sortorder>
<drawtype>0</drawtype>
<color>1A7C11</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[fgc,{#PID}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>0</drawtype>
<color>F63100</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[ygc,{#PID}]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
<graph_prototype>
<name>JVM GC TIME ON {#PID}</name>
<width>900</width>
<height>200</height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period>1</show_work_period>
<show_triggers>1</show_triggers>
<type>0</type>
<show_legend>1</show_legend>
<show_3d>0</show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1>0</ymin_type_1>
<ymax_type_1>0</ymax_type_1>
<ymin_item_1>0</ymin_item_1>
<ymax_item_1>0</ymax_item_1>
<graph_items>
<graph_item>
<sortorder>0</sortorder>
<drawtype>1</drawtype>
<color>1A7C11</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[fgct,{#PID}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>1</drawtype>
<color>F63100</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[gct,{#PID}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<drawtype>1</drawtype>
<color>2774A4</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[ygct,{#PID}]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
<graph_prototype>
<name>JVM MEMORY USED PID {#PID}</name>
<width>900</width>
<height>200</height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period>1</show_work_period>
<show_triggers>1</show_triggers>
<type>0</type>
<show_legend>1</show_legend>
<show_3d>0</show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1>1</ymin_type_1>
<ymax_type_1>1</ymax_type_1>
<ymin_item_1>0</ymin_item_1>
<ymax_item_1>0</ymax_item_1>
<graph_items>
<graph_item>
<sortorder>0</sortorder>
<drawtype>0</drawtype>
<color>1A7C11</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[old,{#PID}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>0</drawtype>
<color>F63100</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[perm,{#PID}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<drawtype>0</drawtype>
<color>2774A4</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[eden,{#PID}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>3</sortorder>
<drawtype>0</drawtype>
<color>A54F10</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[s0,{#PID}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>4</sortorder>
<drawtype>0</drawtype>
<color>FC6EA3</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>JVM Memory</host>
<key>java.memory[s1,{#PID}]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
<host_prototypes/>
</discovery_rule>
</discovery_rules>
<httptests/>
<macros/>
<templates/>
<screens/>
</template>
</templates>
</zabbix_export>

Zabbix监控JVM内存的更多相关文章

  1. 监控JVM内存使用情况,剩余空间小于2M时报警

    一个简单的类,用来监控JVM内存使用情况,剩余空间小于2M时报警. import java.lang.management.ManagementFactory; import java.lang.ma ...

  2. Tomcat 常规配置并通过zabbix 监控 jvm状态

    一:jdk和tomcat基础 apache有两种方式运行php,一是使用模块,二是使用fastcgi nginx也可以通过fastcgi处理动态请求,也可以转发至tomcat tomcat监控主要是监 ...

  3. 使用jconsole监控JVM内存

    首先声明:此篇博文分析的是JDK1.8. JVM内存区域总体分两类:heap区和非heap区.Jconsole中对内存划分为同样的结构,如下: heap区又分为:  - Eden Space(伊甸园) ...

  4. jvmstat监控jvm内存

    1.下载jvmstat-3_0.zip: 2.配置环境变量JVMSTAT_JAVA_HOME为jdk目录E:\Program Files\Java\jdk1.5.0_12 3.监控本机:  jps查看 ...

  5. zabbix监控linux内存

    通过free -m查看当前内存 可用内存:Available memory=free+buffers+cached,即31068=759+66+30243 已用内存:Used memory=used- ...

  6. zabbix监控java内存的脚本

    #!/bin/bash # 截取java的pid号 java_pid=`netstat -lnpt |grep |awk -F '/' '{print $1'}` # 截取$jstat命令的位置 js ...

  7. zabbix 监控jvm

    tomcat 机器配置: [root@wx03 lib]# pwd /usr/local/apache-tomcat-7.0.55/lib [root@wx03 lib]# ls -ltr *jmx* ...

  8. jstat监控JVM内存使用、GC回收情况

    jstat -gcutil 2388 3000 6 每隔3秒打印一次pid为2388的堆内存的使用情况,共打印6次 S0— Heap上的 Survivor space 0 区已使用空间的百分比 S1  ...

  9. zabbix监控一个机器上的多个java进程的jvm

    一.监控安装部署 1.1 JVM端口配置 (/bqhexin/tomcat/bin/catalina.sh)在安装的tomcat路径,找到catalina.sh文件. vim编辑并添加: catali ...

随机推荐

  1. POJ 3678 Katu Puzzle (经典2-Sat)

    Katu Puzzle Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6553   Accepted: 2401 Descr ...

  2. 微信支付HTTPS服务器证书验证指引

    1. 背景介绍 2. 常见问题 3. 验证证书 4. 安装证书 背景介绍 微信支付使用HTTPS来保证通信安全, 在HTTPS服务器上部署了由权威机构签发的证书, 用于证明微信支付平台的真实身份. 商 ...

  3. Docker 构建Hadoop环境

    参考如下文章: Docker安装Hadoop Docker在本地搭建Hadoop分布式集群 Docker快速搭建Hadoop测试环境 从0开始用docker搭建 hadoop分布式环境 Docker- ...

  4. 【C语言】练习2-8

     题目来源:<The C programming language>中的习题P38  练习2-1:  编写一个函数rightrot(x,n),该函数返回将x循环右移(即从最右端移除的位将从 ...

  5. tp数据库表大写命名的一些问题

    在使用thinkphp时,如果数据库表命名有大写,会被转换成小写加下划线(可以使用$model->_sql())来查看实际执行的sql是什么 这个问题,看了一下源代码,在 Thinkphp/Co ...

  6. Android lrucache 实现与使用(Android内存优化)

    什么是LruCache? LruCache实现原理是什么? 这两个问题其实可以作为一个问题来回答,知道了什么是 LruCache,就只然而然的知道 LruCache 的实现原理:Lru的全称是Leas ...

  7. javascript some()函数用法详解

    参数说明callback: 要对每个数组元素执行的回调函数.thisObject : 在执行回调函数时定义的this对象. 功能说明对数组中的每个元素都执行一次指定的函数(callback),直到此函 ...

  8. 一个将java事物的非常好的栗子

    地址:http://www.cnblogs.com/davenkin/archive/2013/02/16/java-tranaction-1.html

  9. Java 8 – Convert Instant to LocalDateTime

    Java 8 examples to show you how to convert from Instant to LocalDateTime 1. Instant -> LocalDateT ...

  10. VB的一些项目中常用的通用方法-一般用于验证类

    1.VB的一些项目中常用的通用方法: ' 设置校验键盘输入值,数字 Public Function kyd(key As Integer) As Integer Dim mychar mychar = ...