CN107797901A - A kind of storehouse analysis and the implementation method of mail Realtime Alerts - Google Patents

A kind of storehouse analysis and the implementation method of mail Realtime Alerts Download PDF

Info

Publication number
CN107797901A
CN107797901A CN201711014787.7A CN201711014787A CN107797901A CN 107797901 A CN107797901 A CN 107797901A CN 201711014787 A CN201711014787 A CN 201711014787A CN 107797901 A CN107797901 A CN 107797901A
Authority
CN
China
Prior art keywords
mail
implementation method
java virtual
realtime alerts
storehouse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711014787.7A
Other languages
Chinese (zh)
Inventor
李波
岳永胜
孙小波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201711014787.7A priority Critical patent/CN107797901A/en
Publication of CN107797901A publication Critical patent/CN107797901A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/073Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a memory management context, e.g. virtual memory or cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2033Failover techniques switching over of hardware resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/815Virtual
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Abstract

The invention discloses a kind of analysis of storehouse and the implementation method of mail Realtime Alerts, below scheme is included:A. the process number and stack information of java virtual machines are obtained in real time using jps orders;B. the information data got is substituted into ad-hoc location in default shell-command script, and analyzes the information data got, determine whether to enter alert status;Early warning mail is sent to the addressee of default early warning mail when C. entering alert status, obtains and analyzes java virtual machine operational factors, and switch to standby server.A kind of storehouse analysis of the present invention and the implementation method of mail Realtime Alerts, whether predictable system is possible to that exception occurs, and the real time data got is sent to system operation maintenance personnel in the case where being likely to occur exception, it is automatic in the case where exception occurs in system to perform the shell-command for restarting system, and alternative scheme is triggered automatically, reduce influence of the system exception to enterprise operation.

Description

A kind of storehouse analysis and the implementation method of mail Realtime Alerts
Technical field
The present invention relates to system O&M technical field, more particularly to a kind of storehouse analysis and the realization of mail Realtime Alerts Method.
Background technology
Software systems have applied to all trades and professions of social production, and software project also becomes increasingly complex.In daily life, When software systems go wrong, simplest processing method is to restart software, or restarts computer.This processing method Although simple, the problem of actually hiding, is not well solved still.Especially merchandised in financial, online store etc. System aspects, such mistake are often fatal.
In the prior art, although having there is various instruments to be provided which to check system operational parameters, such as real time inspection operation Heap memory size, GC running situations, CPU running situations etc..But so many parameter is faced, it is high only to analyze personnel ability Where Shi Caineng is accurately positioned problem, in general people can not orientation problem, the problem of can not confirming to cause system slow exists Where, the reduction of its operating efficiency brought, it is undoubtedly again in increase operation cost for enterprise.
The content of the invention
The purpose of the present invention is to overcome deficiency in above-mentioned background technology, there is provided a kind of storehouse analysis and mail Realtime Alerts Implementation method, by this method energy real-time acquisition system operational factor, and system occur it is abnormal when can trigger automatically it is standby Scheme, reduce influence of the system exception to enterprise operation.
In order to reach above-mentioned technique effect, the present invention takes following technical scheme:
A kind of storehouse analysis and the implementation method of mail Realtime Alerts, include below scheme:
A. the process number and stack information of java virtual machines are obtained in real time using jps orders;
B. the information data got is substituted into ad-hoc location in default shell-command script, and analyzes and get Information data, determine whether to enter alert status;
Early warning mail is sent to the addressee of default early warning mail when C. entering alert status, obtains and analyzes java void Plan machine operational factor, and switch to standby server.
Further, the step A is specially:
A1. the jdk command-line tools carried using java:Jps obtains the java application processes number in java virtual machines;
A2. timed task, the stack information of timing acquisition java virtual machines are added in cron.
Further, the order that the timed task performs is:Jstat-gcutil [java process numbers].
Further, the step B is specially:
B1. data supplementing timed task obtained is into the text of shell-command script;
B2. the internal memory Distribution Value in java virtual machine Zhong Ge areas is analyzed according to the data message preserved in the text;
B3. by the internal memory Distribution Value got compared with default secure threshold, when the internal memory Distribution Value exceedes the peace During full threshold value, judge RAM leakage occurs in the java virtual machines, and enter alert status.
Further, the step C is specially:
When C1. entering alert status, java virtual machine operational factors are obtained by jstat first, and by the operation of acquisition Parameter sends to analysis program, analysis program and the operational factor received is carried out writing analysis using awk;
C2. by current stack information dump into file, and it is switched to standby server;
C3. file dump gone out is sent in the mailbox of the addressee of default early warning mail.
Further, in the step C1, specially using Linux pipelines mode by the operational factor of acquisition send to Analysis program.
Further, eden areas and survivor areas are comprised at least in the java virtual machines.
The present invention compared with prior art, has following beneficial effect:
A kind of storehouse analysis of the present invention and the implementation method of mail Realtime Alerts, the order line work provided by java Tool obtains the parameter of java virtual machines operation in real time, and the various parameters index in storehouse is analyzed, so as to which forecasting system is It is no to be possible to that exception occurs, and the real time data got is sent to system O&M in the case where being possible to exception occur Personnel, meanwhile, it is automatic in the case where exception occurs in system to perform the shell-command for restarting system, can be in real time by this method System operational parameters are obtained, and alternative scheme can be triggered automatically when system occurs abnormal, reduce system exception to enterprise operation Influence.
Brief description of the drawings
Fig. 1 is a kind of analysis of storehouse and the implementation method schematic flow sheet of mail Realtime Alerts of the present invention.
Embodiment
With reference to embodiments of the invention, the invention will be further elaborated.
Embodiment:
As shown in figure 1, the implementation method of a kind of storehouse analysis and mail Realtime Alerts, its principle is to be determined by shell The operational factor of java virtual machines is obtained when former pragmatic, the working condition of java virtual machines is carried out by analyzing operational factor Analysis, its main analytical mathematics is that special parameter index is judged, is analyzed when parameter runs more than normal value It is possible that it is abnormal, and further determine whether to trigger automatic transmission mail, and it is switched to a series of behaviour such as standby server Make.
It is specifically comprised the steps of:
The first step, the jdk command-line tools carried using java:Jps obtains the java application processes in java virtual machines Number.
Second step, timed task is added in cron, obtain the stack information of a virtual machine at regular intervals, its In, the order that timed task performs is:Jstat-gcutil [java process numbers].
3rd step, the data supplementing for obtaining timed task are into the text of shell-command script, in the present embodiment The data of acquisition are specific as follows:
4th step, the internal memory distribution according to the data message analysis java virtual machine Zhong Ge areas preserved in the text It is worth, the eden areas, survivor areas etc. after being analyzed in the data got from the 3rd step at regular intervals in java virtual machines The EMS memory occupation situation in of new generation and old generation, and the situation of change of garbage reclamation.
5th step, by the internal memory Distribution Value got compared with default secure threshold, when the internal memory Distribution Value exceedes institute When stating secure threshold, judge RAM leakage occurs in the java virtual machines, and enter alert status, specifically can be according to jvm When a certain parameter value reaches certain threshold values RAM leakage inherently occurs for the micro-judgment of internal memory distribution.
6th step, into alert status when, java virtual machine operational factors are obtained by jstat first, and by acquisition Operational factor sends to analysis program, analysis program and the operational factor received is carried out writing analysis using awk, in practice, Parameter variation tendency can be analyzed, as long as can trigger early warning when parameter value reaches and is preset to threshold values answers other side Case.
7th step is when occurring RAM leakage triggering early warning counte-rplan, first by current stack information dump to file In, and standby server is switched to, so as to avoid server from interrupting for a long time, and the file that dump is gone out uses the form of annex It is sent in the mailbox of the addressee of default early warning mail, the problem of analysis wherein for software maintenance staff.
It is understood that the principle that embodiment of above is intended to be merely illustrative of the present and the exemplary implementation that uses Mode, but the invention is not limited in this.For those skilled in the art, the essence of the present invention is not being departed from In the case of refreshing and essence, various changes and modifications can be made therein, and these variations and modifications are also considered as protection scope of the present invention.

Claims (7)

1. a kind of storehouse analysis and the implementation method of mail Realtime Alerts, it is characterised in that comprise the steps of:
A. the process number and stack information of java virtual machines are obtained in real time using jps orders;
B. the information data got is substituted into ad-hoc location in default shell-command script, and analyzes the letter got Data are ceased, determine whether to enter alert status;
Early warning mail is sent to the addressee of default early warning mail when C. entering alert status, obtains and analyzes java virtual machines Operational factor, and switch to standby server.
2. a kind of storehouse analysis according to claim 1 and the implementation method of mail Realtime Alerts, it is characterised in that institute Stating step A is specially:
A1. the jdk command-line tools carried using java:Jps obtains the java application processes number in java virtual machines;
A2. timed task, the stack information of timing acquisition java virtual machines are added in cron.
3. a kind of storehouse analysis according to claim 2 and the implementation method of mail Realtime Alerts, it is characterised in that institute Stating the order that timed task performs is:Jstat-gcutil [java process numbers].
4. a kind of storehouse analysis according to claim 2 and the implementation method of mail Realtime Alerts, it is characterised in that institute Stating step B is specially:
B1. data supplementing timed task obtained is into the text of shell-command script;
B2. the internal memory Distribution Value in java virtual machine Zhong Ge areas is analyzed according to the data message preserved in the text;
B3. by the internal memory Distribution Value got compared with default secure threshold, when the internal memory Distribution Value exceedes the safety threshold During value, judge RAM leakage occurs in the java virtual machines, and enter alert status.
5. a kind of storehouse analysis according to claim 3 and the implementation method of mail Realtime Alerts, it is characterised in that institute Stating step C is specially:
When C1. entering alert status, java virtual machine operational factors are obtained by jstat first, and by the operational factor of acquisition Send to analysis program, analysis program and the operational factor received is carried out writing analysis using awk;
C2. by current stack information dump into file, and it is switched to standby server;
C3. file dump gone out is sent in the mailbox of the addressee of default early warning mail.
6. a kind of storehouse analysis according to claim 4 and the implementation method of mail Realtime Alerts, it is characterised in that institute State in step C1, specially sent the operational factor of acquisition to analysis program using the mode of Linux pipelines.
7. a kind of storehouse analysis according to claim 3 and the implementation method of mail Realtime Alerts, it is characterised in that institute State and eden areas and survivor areas are comprised at least in java virtual machines.
CN201711014787.7A 2017-10-25 2017-10-25 A kind of storehouse analysis and the implementation method of mail Realtime Alerts Pending CN107797901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711014787.7A CN107797901A (en) 2017-10-25 2017-10-25 A kind of storehouse analysis and the implementation method of mail Realtime Alerts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711014787.7A CN107797901A (en) 2017-10-25 2017-10-25 A kind of storehouse analysis and the implementation method of mail Realtime Alerts

Publications (1)

Publication Number Publication Date
CN107797901A true CN107797901A (en) 2018-03-13

Family

ID=61547890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711014787.7A Pending CN107797901A (en) 2017-10-25 2017-10-25 A kind of storehouse analysis and the implementation method of mail Realtime Alerts

Country Status (1)

Country Link
CN (1) CN107797901A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597676A (en) * 2018-10-25 2019-04-09 平安科技(深圳)有限公司 Monitoring and early warning method, apparatus and storage medium based on JVM
CN109726078A (en) * 2018-12-28 2019-05-07 广东亿迅科技有限公司 A kind of method and device without intrusion JVM thread storehouse acquisition
CN109918222A (en) * 2019-03-14 2019-06-21 携程计算机技术(上海)有限公司 The dump analysis method and system of application program
CN113064762A (en) * 2021-04-09 2021-07-02 上海新炬网络信息技术股份有限公司 Service self-recovery method based on multiple detection

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615143A (en) * 2008-06-27 2009-12-30 国际商业机器公司 The method and apparatus that is used for diagnosing memory leak
CN102684936A (en) * 2011-03-11 2012-09-19 北京千橡网景科技发展有限公司 Method, equipment and system for monitoring running status of server
CN103106134A (en) * 2011-11-10 2013-05-15 阿里巴巴集团控股有限公司 Detecting method, device and system for performance deficiency
CN103440161A (en) * 2013-08-15 2013-12-11 北京京东尚科信息技术有限公司 Java virtual machine internal object monitoring method, device and system
CN103677759A (en) * 2013-11-08 2014-03-26 国家电网公司 Objectification parallel computing method and system for information system performance improvement
CN103942063A (en) * 2013-11-08 2014-07-23 国家电网公司 Centralized configuration and remote deployment method for Java Web application
CN104346255A (en) * 2014-10-21 2015-02-11 浪潮集团有限公司 Method for automatically monitoring service conditions of process memories in cloud computation
CN104991853A (en) * 2015-07-22 2015-10-21 北京京东尚科信息技术有限公司 Method and apparatus for outputting early warning information
CN105224433A (en) * 2014-06-23 2016-01-06 阿里巴巴集团控股有限公司 A kind of internal memory monitoring method and server
CN105511963A (en) * 2015-11-30 2016-04-20 Tcl集团股份有限公司 Memory optimization method and system based on Android system
US20160179655A1 (en) * 2014-12-18 2016-06-23 Red Hat, Inc. Automatic Switch To Debugging Mode
CN106250292A (en) * 2016-08-11 2016-12-21 上海泛微网络科技股份有限公司 A kind of office management system performance monitoring platform
CN107168875A (en) * 2017-05-15 2017-09-15 南京大学 A kind of Activity component leakage detection methods based on Android application multiple entry characteristic

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615143A (en) * 2008-06-27 2009-12-30 国际商业机器公司 The method and apparatus that is used for diagnosing memory leak
CN102684936A (en) * 2011-03-11 2012-09-19 北京千橡网景科技发展有限公司 Method, equipment and system for monitoring running status of server
CN103106134A (en) * 2011-11-10 2013-05-15 阿里巴巴集团控股有限公司 Detecting method, device and system for performance deficiency
CN103440161A (en) * 2013-08-15 2013-12-11 北京京东尚科信息技术有限公司 Java virtual machine internal object monitoring method, device and system
CN103677759A (en) * 2013-11-08 2014-03-26 国家电网公司 Objectification parallel computing method and system for information system performance improvement
CN103942063A (en) * 2013-11-08 2014-07-23 国家电网公司 Centralized configuration and remote deployment method for Java Web application
CN105224433A (en) * 2014-06-23 2016-01-06 阿里巴巴集团控股有限公司 A kind of internal memory monitoring method and server
CN104346255A (en) * 2014-10-21 2015-02-11 浪潮集团有限公司 Method for automatically monitoring service conditions of process memories in cloud computation
US20160179655A1 (en) * 2014-12-18 2016-06-23 Red Hat, Inc. Automatic Switch To Debugging Mode
CN104991853A (en) * 2015-07-22 2015-10-21 北京京东尚科信息技术有限公司 Method and apparatus for outputting early warning information
CN105511963A (en) * 2015-11-30 2016-04-20 Tcl集团股份有限公司 Memory optimization method and system based on Android system
CN106250292A (en) * 2016-08-11 2016-12-21 上海泛微网络科技股份有限公司 A kind of office management system performance monitoring platform
CN107168875A (en) * 2017-05-15 2017-09-15 南京大学 A kind of Activity component leakage detection methods based on Android application multiple entry characteristic

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
单向街的夏天: "Java虚拟机的深入研究(堆内存-栈内存的分配浅析)", 《HTTPS://BLOG.CSDN.NET/WENBINGOON/ARTICLE/DETAILS/9293115》 *
蒋朝惠 等: "《信息安全原理与技术》", 31 May 2009, 中国铁道出版社 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597676A (en) * 2018-10-25 2019-04-09 平安科技(深圳)有限公司 Monitoring and early warning method, apparatus and storage medium based on JVM
CN109726078A (en) * 2018-12-28 2019-05-07 广东亿迅科技有限公司 A kind of method and device without intrusion JVM thread storehouse acquisition
CN109918222A (en) * 2019-03-14 2019-06-21 携程计算机技术(上海)有限公司 The dump analysis method and system of application program
CN109918222B (en) * 2019-03-14 2022-09-06 携程计算机技术(上海)有限公司 Dump analysis method and system for application program
CN113064762A (en) * 2021-04-09 2021-07-02 上海新炬网络信息技术股份有限公司 Service self-recovery method based on multiple detection
CN113064762B (en) * 2021-04-09 2024-02-23 上海新炬网络信息技术股份有限公司 Service self-recovery method based on various detection

Similar Documents

Publication Publication Date Title
CN107797901A (en) A kind of storehouse analysis and the implementation method of mail Realtime Alerts
CN101470426B (en) Fault detection method and system
CN105306272B (en) Information system fault scenes formation gathering method and system
CN105337765A (en) Distributed hadoop cluster fault automatic diagnosis and restoration system
CN110094843B (en) Method and device for controlling air conditioner based on refrigerant shortage grade
US20230053944A1 (en) Method of predictively maintaining equipment by means of distribution map
CN108599977B (en) System and method for monitoring system availability based on statistical method
CN103324565B (en) Daily record monitoring method
CN105243004A (en) Failure resource detection method and apparatus
CN104038373A (en) Information early warning and self repairing system and method
CN103927305B (en) It is a kind of that the method and apparatus being controlled is overflowed to internal memory
CN106713048A (en) Fault response method and system
CN109884475A (en) A kind of electric network fault detection method, device, system and storage medium
US20230060002A1 (en) Method for predictive maintenance of equipment via distribution chart
CN103701655A (en) Fault self-diagnosis and self-recovery method and system for interchanger
CN108204331B (en) Fault processing method and device for wind generating set
CN103701651A (en) Disaster recovery device and method for application service under domestic environment
CN106121980A (en) Determination method, device and the refrigeration system of a kind of compressor extent of deterioration
US7823029B2 (en) Failure recognition, notification, and prevention for learning and self-healing capabilities in a monitored system
CN104763576B (en) A kind of pump-storage generator protection auxiliary signal anomalous discrimination and modification method
CN111124818B (en) Monitoring method, device and equipment for Expander
CN109783921A (en) Heat affected area appraisal procedure, device and the computer equipment of pipe-line
CN104408059A (en) Fault processing method and device
CN112883253A (en) Data processing method, device, equipment and readable storage medium
KR20220032336A (en) Predictive maintenance method of equipment through cumulative waveform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180313