CN111782471B - Monitoring method and system for cloud system JAVA container JVM memory overflow - Google Patents

Monitoring method and system for cloud system JAVA container JVM memory overflow Download PDF

Info

Publication number
CN111782471B
CN111782471B CN202010610318.7A CN202010610318A CN111782471B CN 111782471 B CN111782471 B CN 111782471B CN 202010610318 A CN202010610318 A CN 202010610318A CN 111782471 B CN111782471 B CN 111782471B
Authority
CN
China
Prior art keywords
container
information
jvm
monitoring
memory overflow
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.)
Active
Application number
CN202010610318.7A
Other languages
Chinese (zh)
Other versions
CN111782471A (en
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010610318.7A priority Critical patent/CN111782471B/en
Publication of CN111782471A publication Critical patent/CN111782471A/en
Application granted granted Critical
Publication of CN111782471B publication Critical patent/CN111782471B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a method and a system for monitoring memory overflow of a cloud system JAVA container JVM, wherein the method comprises the following steps: acquiring JVM log information of a JAVA application container through a monitoring container, wherein the monitoring container and the JAVA application container are arranged in one POD of a cloud system; determining whether memory overflow information representing memory overflow exists in the JVM log information; if so, forming a message alarm message according to the memory overflow information to feed back to operation and maintenance personnel, and the application can realize the rapid and accurate monitoring of the memory overflow of the JAVA application container on the cloud system.

Description

Monitoring method and system for cloud system JAVA container JVM memory overflow
Technical Field
The application relates to the technical field of cloud platform monitoring and alarming, in particular to a monitoring method and a monitoring system for memory overflow of a JVM (Java container of a cloud system).
Background
JAVA applications rely on JVM virtual machines to achieve dynamic allocation and reclamation of memory, and when the accumulated application memory exceeds the maximum memory limit and cannot be reclaimed and released, the application program will interrupt the overall service due to JVM memory overflow. If the overflow reason of the JVM memory is not located in time and repaired, the service is interrupted continuously after restarting for a period of time, and the experience of operation and maintenance personnel is greatly affected.
For traditional non-cloud JAVA applications, i.e., JAVA applications that are not installed on cloud systems, two methods are generally used in the industry to monitor JVM memory overflow: 1) Monitoring the memory use condition of the JAVA application program, giving an alarm when the memory use condition is continuously higher than a set threshold value, wherein the memory use condition is not represented that overflow occurs, so that certain false alarm probability exists; 2) Monitoring whether an application process exists or not, if not, alarming to inform an operation staff to analyze a JVM operation log, and if a java. Lang. OutOfMemoryError keyword appears in the log, then the JVM memory overflow occurs. Both of the above monitoring methods involve deployment of monitoring tools, but the cloud-up JAVA application container generally allows only one process to run in a single container due to security and isolation requirements. Meanwhile, the method 1) has the defect that the overflow of the JVM memory cannot be accurately perceived, and the method 2) relies on an artificial analysis mechanism, but a container on the cloud is rapidly destroyed along with the exit of the process, so that sufficient analysis time cannot be provided for operation and maintenance personnel.
Therefore, how to provide a monitoring scheme for the memory overflow of the JVM of the cloud container, which not only meets the non-invasive requirement of single-container operation and single process, but also can accurately detect the memory overflow event of the JVM, and becomes a problem to be solved urgently.
Disclosure of Invention
The application aims to provide a monitoring method for memory overflow of a JVM of a JAVA container of a cloud system, which realizes rapid and accurate monitoring of memory overflow of a JAVA application container on the cloud system. Another object of the present application is to provide a monitoring system for memory overflow of a JAVA container JVM of a cloud system. It is a further object of the application to provide a computer device. It is a further object of the application to provide a readable medium.
In order to achieve the above purpose, the present application discloses a method for monitoring memory overflow of a JVM of a JAVA container of a cloud system, comprising:
acquiring JVM log information of a JAVA application container through a monitoring container, wherein the monitoring container and the JAVA application container are arranged in one POD of a cloud system;
determining whether memory overflow information representing memory overflow exists in the JVM log information;
if yes, forming a message alarm message according to the memory overflow information to feed back to operation and maintenance personnel.
Preferably, the obtaining JVM log information of the JAVA application container by the monitoring container specifically includes:
determining JVM log storage information of the JAVA application container according to the environment configuration file of the monitoring container;
acquiring an image file of the JVM log file from a shared storage position of the JAVA application container and the monitoring container according to JVM log storage information through the monitoring container;
JVM log information is read from the image file.
Preferably, the method further comprises the step of setting the monitoring container and the JAVA application container in one POD in advance.
Preferably, the pre-setting the monitoring container and the JAVA application container in one POD specifically includes:
setting a monitoring container and a JAVA application container on a cloud system, and setting the monitoring container and the JAVA application container in one POD;
and setting JVM log storage information, JAVA application information and memory overflow information sending information in an environment configuration file.
Preferably, the determining whether the JVM log information includes memory overflow information indicating memory overflow specifically includes:
matching the JVM log information according to preset keywords according to preset memory overflow keywords to obtain whether keywords exist or not;
if yes, forming memory overflow information according to the key words, the JAVA application information and the cloud system information.
Preferably, the forming the message alarm message according to the memory overflow information for feeding back to the operation and maintenance personnel specifically includes:
obtaining the memory overflow information newly added in the monitoring container;
extracting keywords in the memory overflow information, and obtaining early warning information according to the keywords;
forming a message alarm message according to the early warning information, the JAVA application information and the cloud system information and feeding back the message alarm message to operation and maintenance personnel.
The application also discloses a monitoring system for the memory overflow of the cloud system JAVA container JVM, which comprises:
the system comprises a log information acquisition module, a monitoring container and a cloud system, wherein the log information acquisition module is used for acquiring JVM log information of a JAVA application container through the monitoring container, and the monitoring container and the JAVA application container are arranged in one POD of the cloud system;
the overflow information determining module is used for determining whether memory overflow information representing memory overflow exists in the JVM log information;
and the alarm feedback module is used for forming a message alarm message according to the memory overflow information to feed back to operation and maintenance personnel if the memory overflow information exists.
Preferably, the log information acquisition module includes:
the storage information determining unit is used for determining JVM log storage information of the JAVA application container according to the environment configuration file of the monitoring container;
the log file acquisition unit is used for acquiring the mirror image file of the JVM log file from the shared storage position of the JAVA application container and the monitoring container according to the JVM log storage information through the monitoring container;
and the log information reading unit is used for reading JVM log information from the image file.
Preferably, the container arrangement setting module is further configured to set the monitoring container and the JAVA application container in one POD in advance.
Preferably, the container arrangement setting module includes:
a container setting unit for setting the monitoring container and the JAVA application container on the cloud system and setting the monitoring container and the JAVA application container in one POD;
the environment variable configuration unit is used for setting JVM log storage information, JAVA application information and memory overflow information sending information in an environment configuration file.
The application also discloses a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor,
the processor, when executing the program, implements the method as described above.
The application also discloses a computer readable medium, on which a computer program is stored,
the program, when executed by a processor, implements the method as described above.
The application aims to solve the problem that the existing JVM memory overflow monitoring method cannot be applied to a JAVA application container on a cloud, and the monitoring container and the JAVA application container are arranged in one POD of a cloud system, so that the monitoring container can acquire JVM log information of the JAVA application container in a POD storage sharing mode. Analyzing the obtained JVM log information can determine whether memory overflow information representing memory overflow exists in the JVM log information, and if so, a message alarm message can be formed in time and fed back to operation and maintenance personnel. Therefore, detection and alarm of JVM memory overflow can be automatically and accurately completed on the premise of not invading the single-process operation of the JAVA application container, and a foundation is laid for analyzing and positioning the problems.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of one embodiment of a method for monitoring memory overflow in a JVM of a cloud system JAVA container according to the present application;
FIG. 2 is a flowchart of a method S100 for monitoring memory overflow in a JVM of a cloud system JAVA container according to one embodiment of the present application;
FIG. 3 is a flowchart of one embodiment S000 of a method for monitoring memory overflow in a JVM of a cloud system JAVA container according to the present application;
FIGS. 4-7 are schematic diagrams illustrating a container layout configuration page in a specific example of a method for monitoring memory overflow of a JVM of a cloud system JAVA container according to the present application;
FIG. 8 is a flowchart of a method S200 for monitoring memory overflow in a JVM of a cloud system JAVA container according to one embodiment of the present application;
FIG. 9 is a flowchart of a method S300 for monitoring memory overflow in a JVM of a cloud system JAVA container according to one embodiment of the present application;
FIG. 10 is a block diagram of one embodiment of a monitoring system for memory overflow from a cloud system JAVA container JVM;
FIG. 11 is a block diagram of a log information acquisition module of an embodiment of the monitoring system for memory overflow in a JVM of a cloud system JAVA container according to the present application;
FIG. 12 is a block diagram illustrating a monitoring system for memory overflow in a cloud system JAVA container JVM of the present application in which one embodiment includes a container orchestration settings module;
FIG. 13 is a block diagram of a container orchestration settings module according to one embodiment of the present application for a cloud system JAVA container JVM memory overflow monitoring system;
fig. 14 shows a schematic structural diagram of a computer device suitable for use in implementing embodiments of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It is noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present application and in the foregoing figures, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In one or more embodiments of the application, a Pod is made up of one or more containers (e.g., docker containers) and has the ability to share storage/network/UTS/PIDs, as well as running container specifications. And in Kubernetes Pod is the smallest atomic unit that can be scheduled. In colloquial terms, pod is a collection of containers that share a network/storage within Pod (Kubernetes implements a shared set of namespaces to replace each container's respective NS to implement this capability), so they can communicate internally through Localhost. Although network storage is shared, the CPU and Memory are not. There may be a Cgroup between the multiple containers that is to say we can individually restrict the use of resources (MEM/CPU) for the containers in Pod.
According to one aspect of the application, the embodiment discloses a method for monitoring memory overflow of a JVM (Java container of a cloud system). As shown in fig. 1, in this embodiment, the method includes:
s100: JVM log information of a JAVA application container is obtained through a monitoring container, wherein the monitoring container and the JAVA application container are arranged in one POD of a cloud system.
S200: and determining whether memory overflow information representing memory overflow exists in the JVM log information.
S300: if yes, forming a message alarm message according to the memory overflow information to feed back to operation and maintenance personnel.
The application aims to solve the problem that the existing JVM memory overflow monitoring method cannot be applied to a JAVA application container on a cloud, and the monitoring container and the JAVA application container are arranged in one POD of a cloud system, so that the monitoring container can acquire JVM log information of the JAVA application container in a POD storage sharing mode. Analyzing the obtained JVM log information can determine whether memory overflow information representing memory overflow exists in the JVM log information, and if so, a message alarm message can be formed in time and fed back to operation and maintenance personnel. Therefore, detection and alarm of JVM memory overflow can be automatically and accurately completed on the premise of not invading the single-process operation of the JAVA application container, and a foundation is laid for analyzing and positioning the problems.
In a preferred embodiment, as shown in fig. 2, the obtaining, by the monitoring container, JVM log information of the JAVA application container in S100 may specifically include:
s110: and determining JVM log storage information of the JAVA application container according to the environment configuration file of the monitoring container.
S120: and acquiring the mirror image file of the JVM log file from the shared storage position of the JAVA application container and the monitoring container according to the JVM log storage information through the monitoring container.
S130: JVM log information is read from the image file.
It can be understood that when the JAVA application container is set on the cloud, the JAVA application container and the monitoring container can be arranged together by using the POD function provided by the cloud system, that is, the JAVA application container and the monitoring container are set in one POD, the two containers respectively and independently operate, and the storage contents of the JAVA application container and the monitoring container can be shared. The monitoring container can acquire JVM log information of the JAVA application container in the same POD through a storage sharing function provided by the cloud system.
Specifically, in the preferred embodiment, JVM log storage information of the JAVA application container may be pre-stored in the environment configuration file, and the JVM log storage information may include storage addresses and encoding formats of the JVM log, and the like. And the JVM log storage information is sent to the monitoring container in the form of an environment configuration file, so that the monitoring container can be set, a shared storage position can be obtained by the monitoring container according to the JVM log storage information, an image file of the JVM log file can be obtained from the shared storage position, and the JVM log information can be further read from the image file.
In a preferred embodiment, the method further includes a step S000 of previously setting the monitoring container and the JAVA application container in one POD. It should be noted that, those skilled in the art may set up and form the JAVA application container and the monitoring container according to the functional requirements of the JAVA application container and the monitoring container, which are not described herein. By arranging the JAVA application container and the monitoring container in one POD, the two containers can be arranged together, and JVM log information of the JAVA application container can be acquired through the monitoring container by utilizing the storage sharing function provided by the POD so as to analyze whether memory overflow exists.
In a preferred embodiment, as shown in fig. 3, the S000 pre-setting the monitoring container and the JAVA application container in one POD may specifically include:
s010: the monitoring container and the JAVA application container are provided on the cloud system, and the monitoring container and the JAVA application container are provided in one POD.
S020: and setting JVM log storage information, JAVA application information and memory overflow information sending information in an environment configuration file.
It will be appreciated that in the preferred embodiment, the JVM log store information, JAVA application information, and memory overflow information send information may be provided in an environment configuration file, and uploaded to the monitoring container in the form of an environment variable for the monitoring container to call. The JVM log storage information may include information such as a JVM log directory and JVM log coding format which are shared and stored, the JAVA application information may include information such as an application name, and the memory overflow information sending information may include information such as a destination address of the memory overflow information sending.
In one specific example, the cloud system employs a Kubernetes open source orchestration component and the monitoring container employs a Fluentd open source component. Two containers are arranged in one Pod through the shared log directory storage, and the application container and the monitoring container independently operate except that the Fluentd container can read JVM log directory files of the JAVA application container. The layout configuration page is shown in fig. 4 to 7.
In a preferred embodiment, as shown in fig. 8, determining whether the JVM log information includes memory overflow information indicating memory overflow in S200 may specifically include:
s210: and matching the JVM log information according to a preset memory overflow keyword to obtain whether a keyword exists or not.
S220: if yes, forming memory overflow information according to the key words, the JAVA application information and the cloud system information.
It will be appreciated that the JVM log information may be obtained by reading the image file of the JVM log file row by row. When the JVM overflows, a keyword of 'java. Lang. OutOfMemoryError' appears in the JVM log file. Therefore, by carrying out keyword matching on the obtained JVM log information, whether a keyword of 'java. Land. OutOfMemoryError' exists in the JVM log information or not is determined, and whether the keyword exists in the JVM log information or not can be determined. If the key word exists, the condition that the memory overflows is indicated, and the memory overflow information can be formed according to the key word, the JAVA application information and the cloud system information so as to feed back the memory overflow condition to operation and maintenance personnel.
In a specific example, the monitoring container adopts a fluent d open source component, fluent d is a current relatively universal log collection tool, supports line-by-line collection of log files under a configuration directory, filters collected content and sends the collected content to a target server. The monitoring container can collect, analyze and store JVM log information through the following procedures:
the source part collects image files of JVM log file messages.log, and the coding format of the JVM log file is UTF-8. The filter part filters the acquired content and filters out alarm information of the OutOfmemory, namely, the alarm information is used for keyword matching. After the keywords are obtained by matching, application information such as application names can be added for easy identification. The match section may send the obtained memory overflow information to a data storage module, such as an elastic search server, for storage, so as to alert. Preferably, the data storage module can receive the data query request and return the matched memory overflow information to the calling party so as to realize the output of the memory overflow information. Furthermore, the time can be preset, so that the expiration data can be deleted periodically according to the preset time, and the excessive storage occupation is prevented.
In a preferred embodiment, as shown in fig. 9, the step S300 of forming a message alert according to the memory overflow information for feedback to the operation and maintenance personnel may specifically include:
s310: and obtaining the memory overflow information newly added in the monitoring container.
S320: and extracting keywords in the memory overflow information, and obtaining early warning information according to the keywords.
S330: forming a message alarm message according to the early warning information, the JAVA application information and the cloud system information and feeding back the message alarm message to operation and maintenance personnel.
It will be appreciated that in the preferred embodiment, the monitoring container sends the memory overflow information to the elastic search server for storage. Whether the newly added memory overflow information exists at the elastic search server can be further determined, and if so, early warning information can be formed according to the keywords. In order to further warn the operation and maintenance personnel, JAVA application information and cloud system information can be added, for example, an application name, a system node name and early warning information are formed into a message alarm message together and fed back to the operation and maintenance personnel, so that the operation and maintenance personnel can conveniently and timely troubleshoot the JAVA application container. Preferably, the alarm message can be sent to the mailbox of the operation and maintenance personnel in the form of mail transmission.
Based on the same principle, the embodiment also discloses a monitoring system for the memory overflow of the cloud system JAVA container JVM. As shown in fig. 10, in the present embodiment, the system includes a log information acquisition module 11, an overflow information determination module 12, and an alarm feedback module 13.
The log information obtaining module 11 is configured to obtain JVM log information of a JAVA application container through a monitoring container, where the monitoring container and the JAVA application container are disposed in one POD of a cloud system;
the overflow information determining module 12 is configured to determine whether memory overflow information that indicates memory overflow exists in the JVM log information;
the alarm feedback module 13 is configured to form a message alarm message according to the memory overflow information if the memory overflow information exists, so as to feed back the message alarm message to the operation and maintenance personnel.
In a preferred embodiment, as shown in fig. 11, the log information acquisition module 11 includes a stored information determination unit 111, a log file acquisition unit 112, and a log information reading unit 113.
Wherein the storage information determining unit 111 is configured to determine JVM log storage information of the JAVA application container according to the environment configuration file of the monitoring container.
The log file obtaining unit 112 is configured to obtain, by the monitoring container, an image file of the JVM log file from a shared storage location of the JAVA application container and the monitoring container according to the JVM log storage information.
The log information reading unit 113 is configured to read JVM log information from the image file.
In a preferred embodiment, as shown in fig. 12, the system further comprises a container arrangement setting module 10. The container arrangement setting module 10 is configured to set the monitoring container and the JAVA application container in one POD in advance.
In a preferred embodiment, as shown in fig. 13, the container arrangement setting module 10 includes a container setting unit 101 and an environment variable configuration unit 102.
Wherein the container setting unit 101 is configured to set the monitoring container and the JAVA application container on the cloud system, and set the monitoring container and the JAVA application container in one POD.
The environment variable configuration unit 102 is configured to set JVM log storage information, JAVA application information, and memory overflow information transmission information in an environment configuration file.
In a preferred embodiment, the overflow information determining module 12 is specifically configured to match the JVM log information according to a preset key to obtain whether a key exists according to a preset memory overflow key, and if yes, form memory overflow information according to the key, JAVA application information and cloud system information.
In a preferred embodiment, the alarm feedback module 13 is specifically configured to obtain the memory overflow information newly added in the monitoring container, extract a keyword in the memory overflow information, obtain early warning information according to the keyword, form a message alarm message according to the early warning information, JAVA application information and cloud system information, and feed back the message alarm message to the operation and maintenance personnel.
Since the principle of solving the problem of the system is similar to that of the above method, the implementation of the system can be referred to the implementation of the method, and will not be repeated here.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer device, which may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
In a typical example the computer apparatus comprises in particular a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the method as described above when said program is executed.
Referring now to FIG. 14, there is illustrated a schematic diagram of a computer device 600 suitable for use in implementing embodiments of the present application.
As shown in fig. 14, the computer apparatus 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate works and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM)) 603. In the RAM603, various programs and data required for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a liquid crystal feedback device (LCD), and the like, and a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 606 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on drive 610 as needed, so that a computer program read therefrom is mounted as needed as storage section 608.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A monitoring method for memory overflow of a cloud system JAVA container JVM is characterized by comprising the following steps:
acquiring JVM log information of a JAVA application container through a monitoring container, wherein the monitoring container and the JAVA application container are arranged in one POD of a cloud system;
determining whether memory overflow information representing memory overflow exists in the JVM log information;
if yes, forming a message alarm message according to the memory overflow information to feed back to operation and maintenance personnel;
the obtaining JVM log information of the JAVA application container by the monitoring container specifically includes:
determining JVM log storage information of the JAVA application container according to the environment configuration file of the monitoring container;
acquiring an image file of the JVM log file from a shared storage position of the JAVA application container and the monitoring container according to JVM log storage information through the monitoring container;
JVM log information is read from the image file.
2. The method for monitoring memory overflow of JAVA container JVM of cloud system according to claim 1, further comprising the step of pre-setting said monitoring container and said JAVA application container in one POD.
3. The method for monitoring the memory overflow of the JVM of the JAVA container of the cloud system according to claim 2, wherein the pre-setting the monitoring container and the JAVA application container in one POD specifically comprises:
setting a monitoring container and a JAVA application container on a cloud system, and setting the monitoring container and the JAVA application container in one POD;
and setting JVM log storage information, JAVA application information and memory overflow information sending information in an environment configuration file.
4. The method for monitoring memory overflow of a JAVA container JVM of a cloud system according to claim 1, wherein the determining whether memory overflow information indicating memory overflow exists in the JVM log information specifically includes:
matching the JVM log information according to preset keywords according to preset memory overflow keywords to obtain whether keywords exist or not;
if yes, forming memory overflow information according to the key words, the JAVA application information and the cloud system information.
5. The method for monitoring memory overflow of a JAVA container JVM of a cloud system according to claim 4, wherein forming a message alarm according to the memory overflow information for feedback to an operation and maintenance personnel specifically comprises:
obtaining the memory overflow information newly added in the monitoring container;
extracting keywords in the memory overflow information, and obtaining early warning information according to the keywords;
forming a message alarm message according to the early warning information, the JAVA application information and the cloud system information and feeding back the message alarm message to operation and maintenance personnel.
6. A monitoring system for memory overflow of a JAVA container JVM of a cloud system, comprising:
the system comprises a log information acquisition module, a monitoring container and a cloud system, wherein the log information acquisition module is used for acquiring JVM log information of a JAVA application container through the monitoring container, and the monitoring container and the JAVA application container are arranged in one POD of the cloud system;
the overflow information determining module is used for determining whether memory overflow information representing memory overflow exists in the JVM log information;
the alarm feedback module is used for forming a message alarm message according to the memory overflow information if the memory overflow information exists, and feeding back the message alarm message to operation and maintenance personnel;
the log information acquisition module includes:
the storage information determining unit is used for determining JVM log storage information of the JAVA application container according to the environment configuration file of the monitoring container;
the log file acquisition unit is used for acquiring the mirror image file of the JVM log file from the shared storage position of the JAVA application container and the monitoring container according to the JVM log storage information through the monitoring container;
and the log information reading unit is used for reading JVM log information from the image file.
7. The monitoring system for memory overflow of JAVA container JVM of cloud system according to claim 6, further comprising a container arrangement setting module for setting said monitoring container and said JAVA application container in one POD in advance.
8. The cloud system JAVA container JVM memory overflow monitoring system of claim 7, wherein said container orchestration setting module comprises:
a container setting unit for setting the monitoring container and the JAVA application container on the cloud system and setting the monitoring container and the JAVA application container in one POD;
the environment variable configuration unit is used for setting JVM log storage information, JAVA application information and memory overflow information sending information in an environment configuration file.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that,
the processor implementing the method according to any of claims 1-5 when executing the program.
10. A computer readable medium having a computer program stored thereon, characterized in that,
the program, when executed by a processor, implements the method of any of claims 1-5.
CN202010610318.7A 2020-06-30 2020-06-30 Monitoring method and system for cloud system JAVA container JVM memory overflow Active CN111782471B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010610318.7A CN111782471B (en) 2020-06-30 2020-06-30 Monitoring method and system for cloud system JAVA container JVM memory overflow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010610318.7A CN111782471B (en) 2020-06-30 2020-06-30 Monitoring method and system for cloud system JAVA container JVM memory overflow

Publications (2)

Publication Number Publication Date
CN111782471A CN111782471A (en) 2020-10-16
CN111782471B true CN111782471B (en) 2023-10-13

Family

ID=72760951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010610318.7A Active CN111782471B (en) 2020-06-30 2020-06-30 Monitoring method and system for cloud system JAVA container JVM memory overflow

Country Status (1)

Country Link
CN (1) CN111782471B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312109B (en) * 2023-11-28 2024-02-09 本溪钢铁(集团)信息自动化有限责任公司 Memory early warning method for java dynamic array

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168844A (en) * 2016-03-07 2017-09-15 中国移动通信集团河南有限公司 A kind of method and device of performance monitoring
CN109597676A (en) * 2018-10-25 2019-04-09 平安科技(深圳)有限公司 Monitoring and early warning method, apparatus and storage medium based on JVM
CN110661657A (en) * 2019-09-23 2020-01-07 中国—东盟信息港股份有限公司 Network security monitoring method and system for Kubernetes cloud native application

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9753846B2 (en) * 2012-09-06 2017-09-05 Red Hat, Inc. Adjusting the operating memory used by a virtual machine during runtime

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168844A (en) * 2016-03-07 2017-09-15 中国移动通信集团河南有限公司 A kind of method and device of performance monitoring
CN109597676A (en) * 2018-10-25 2019-04-09 平安科技(深圳)有限公司 Monitoring and early warning method, apparatus and storage medium based on JVM
CN110661657A (en) * 2019-09-23 2020-01-07 中国—东盟信息港股份有限公司 Network security monitoring method and system for Kubernetes cloud native application

Also Published As

Publication number Publication date
CN111782471A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
KR101825023B1 (en) Risk early warning method and device
CN110109998B (en) Intelligent data transaction integration system
CN110865997A (en) Online identification method for hidden danger of power system equipment and application platform thereof
CN111538563A (en) Event analysis method and device for Kubernetes
CN110708212A (en) Method and device for tracking call link in distributed system
CN111782471B (en) Monitoring method and system for cloud system JAVA container JVM memory overflow
CN110784377A (en) Method for uniformly managing cloud monitoring data in multi-cloud environment
CN111625418A (en) Process monitoring method and device
CN113911872B (en) Fault processing method and system and early warning rescue system
CN108337100B (en) Cloud platform monitoring method and device
CN115174353A (en) Fault root cause determination method, device, equipment and medium
CN112802610A (en) Passenger information big data intelligent processing method and device
CN111711534B (en) Network service quality analysis method, device, system, equipment and storage medium
CN112953952A (en) Industrial security situation awareness method, platform, electronic device and storage medium
CN112491650A (en) Method for dynamically analyzing call loop condition between services and related equipment
CN110336731B (en) User matching method and device in group
CN109522349B (en) Cross-type data calculation and sharing method, system and equipment
CN116095107A (en) Cloud edge cooperative system and cloud edge cooperative method for intelligent concrete production and control
CN110020263B (en) Monitoring method and device of closed system and monitoring equipment
CN113900905A (en) Log monitoring method and device, electronic equipment and storage medium
CN113449886A (en) Data processing method, processing device, equipment and storage medium
CN113726779A (en) Rule false alarm test method and device, electronic equipment and computer storage medium
CN111352795A (en) Method and device for monitoring mobile service
CN118277409A (en) Method and device for processing operation log, storage medium and electronic equipment
CN109918222B (en) Dump analysis method and system for application program

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
GR01 Patent grant
GR01 Patent grant