#! /Bin/sh # get_current_time pay special attention to the following: manual extraction is required. the manual execution time is different from the execution environment in crontab-e. exportJAVA_HOME/opt/jdk1.6.0 _ 10/exportPATH $ JAVA_HOME/bin: $ PATHexportCLASSPATH.: $ JA...
#! /Bin/sh
# Get_current_time pay special attention to the following items which must be extracted manually. the environment for manual execution is different from that for crontab-e execution.
Export JAVA_HOME =/opt/jdk1.6.0 _ 10/
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/lib/dt. jar: $ CLASSPATH
Date = 'date "+ % Y-% m-% d-% H: % M: % S "'
Root = "/data/dxm /"
Jmapends = $ Root $ date "_jmap.txt"
Jstackends = $ Root $ date "_jstack.txt"
Jstateends = $ Root $ date "_jstate.txt"
# Start to register the jmap message
Echo "start to register the jmap to" $ jmapends
Jmap-histo: live 'jps | grep Resin | awk 'NR = 1' | awk' {print $1} ''> $ jmapends
Sleep 2
# Start to register the jtack message
Echo "start to register the jstack to" $ jstackends
Jstack-l 'jps | grep Resin | awk 'NR = 1' | awk' {print $1} ''> $ jstackends
Sleep 2
# Start to register the jstate message
Echo "start to register the jstate message to" $ jstateends
Jstat-gcutil-t-h20 'jps | grep Resin | awk 'NR = 1' | awk '{print $1}' 1000 20> $ jstateends
Author: "Wolf dream --- aiwuwuwuwu"