+

CN111782471A - Method and system for monitoring memory overflow of JVM (JAVA virtual machine) of cloud system JAVA container - Google Patents

Method and system for monitoring memory overflow of JVM (JAVA virtual machine) of cloud system JAVA container Download PDF

Info

Publication number
CN111782471A
CN111782471A CN202010610318.7A CN202010610318A CN111782471A CN 111782471 A CN111782471 A CN 111782471A CN 202010610318 A CN202010610318 A CN 202010610318A CN 111782471 A CN111782471 A CN 111782471A
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.)
Granted
Application number
CN202010610318.7A
Other languages
Chinese (zh)
Other versions
CN111782471B (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

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/815Virtual
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 invention provides a method and a system for monitoring memory overflow of a cloud system JAVA container JVM (Java virtual machine), 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 a POD of a cloud system; determining whether memory overflow information which represents memory overflow exists in the JVM log information; if yes, an alarm message is formed according to the memory overflow information to feed back to operation and maintenance personnel, and the method and the system can realize quick and accurate monitoring of memory overflow of the JAVA application container on the cloud system.

Description

Method and system for monitoring memory overflow of JVM (JAVA virtual machine) of cloud system JAVA container
Technical Field
The invention relates to the technical field of cloud platform monitoring and alarming, in particular to a method and a system for monitoring memory overflow of a JAVA container JVM (Java virtual machine) of a cloud system.
Background
The JAVA application relies on a JVM virtual machine to realize dynamic allocation and recovery of memory, and when the memory of the accumulated application exceeds the maximum memory limit and cannot be recovered and released, the application program interrupts the whole service due to the overflow of the JVM memory. If the JVM memory overflow reason is not located and repaired in time, the service is continuously interrupted after being restarted for a period of time, and the experience of operation and maintenance personnel is greatly influenced.
For a conventional non-cloud JAVA application, that is, a JAVA application not set on a cloud system, the industry generally adopts two methods to monitor the memory overflow of the JVM: 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, but the overflow is not represented when the memory use condition is high, so that a certain false alarm probability exists; 2) monitoring whether the application process exists or not, if not, alarming to inform operation and maintenance personnel to analyze the JVM running log, and if java. Both of the above two monitoring methods involve deployment of monitoring tools, but a single container generally only allows one process to run due to security and isolation requirements of a JAVA application container in the cloud. Meanwhile, the method 1) has the defect that the memory overflow of the JVM cannot be accurately sensed, and the method 2) depends on an artificial analysis mechanism, but the container on the cloud is rapidly destroyed along with the process exit, so that sufficient analysis time cannot be provided for operation and maintenance personnel.
Therefore, how to provide a monitoring scheme for JVM memory overflow of a container on the cloud, which not only meets the non-invasive requirement of a single process of single-container operation, but also can accurately detect and alarm JVM memory overflow events, becomes a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a method for monitoring memory overflow of a JAVA container JVM (JAVA virtual machine) of a cloud system, which can realize quick and accurate monitoring of the memory overflow of the JAVA application container on the cloud system. Another object of the present invention is to provide a system for monitoring memory overflow of a JAVA container JVM in a cloud system. It is a further object of this invention to provide such a computer apparatus. It is a further object of this invention to provide such a readable medium.
In order to achieve the above object, in one aspect, the present invention discloses a method for monitoring memory overflow of a JAVA container JVM in a cloud system, including:
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 a POD of a cloud system;
determining whether memory overflow information which represents memory overflow exists in the JVM log information;
and if so, forming an alarm message according to the memory overflow information to feed back to operation and maintenance personnel.
Preferably, the obtaining of the 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 a mirror image file of a JVM log file from a shared storage position of a JAVA application container and a monitoring container through the monitoring container according to JVM log storage information;
and reading JVM log information from the image file.
Preferably, the method further comprises the step of previously setting the monitoring container and the JAVA application container in one POD.
Preferably, the previously 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 a POD;
and setting the JVM log storage information, the JAVA application information and the memory overflow information sending information in an environment configuration file.
Preferably, the determining whether the memory overflow information indicating the 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;
and if so, forming memory overflow information according to the keywords, the JAVA application information and the cloud system information.
Preferably, the forming an alarm message according to the memory overflow information to feed back to the operation and maintenance staff specifically includes:
acquiring newly-added memory overflow information in a monitoring container;
extracting keywords in the memory overflow information, and obtaining early warning information according to the keywords;
and forming an alarm message according to the early warning information, the JAVA application information and the cloud system information and feeding the alarm message back to operation and maintenance personnel.
The invention also discloses a system for monitoring memory overflow of the cloud system JAVA container JVM, which comprises:
the system comprises a log information acquisition module, a log information acquisition module and a processing module, wherein the log information acquisition module is used for acquiring JVM log information of a JAVA application container through a monitoring container, and the monitoring container and the JAVA application container are arranged in a POD of a cloud system;
an overflow information determining module, configured to determine whether memory overflow information indicating memory overflow exists in the JVM log information;
and the alarm feedback module is used for forming an 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 obtaining 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 a mirror image file of the JVM log file from the shared storage positions of the JAVA application container and the monitoring container through the monitoring container according to the JVM log storage information;
and the log information reading unit is used for reading the JVM log information from the mirror image file.
Preferably, the system further comprises a container arrangement setting module, configured to previously set the monitoring container and the JAVA application container in one POD.
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;
and the environment variable configuration unit is used for setting the JVM log storage information, the JAVA application information and the memory overflow information sending information in an environment configuration file.
The invention 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 invention also discloses a computer-readable medium, having stored thereon a computer program,
which when executed by a processor implements the method as described above.
In order to solve the problem that the existing JVM memory overflow monitoring method cannot be applied to a JAVA application container on the cloud, the monitoring container and the JAVA application container are arranged in a POD of a cloud system, so that the monitoring container can acquire JVM log information of the JAVA application container in a POD storage and sharing mode. And analyzing the obtained JVM log information to determine whether memory overflow information indicating memory overflow exists in the JVM log information, and if so, forming an alarm message in time and feeding back the alarm message to operation and maintenance personnel. Therefore, detection and alarm of memory overflow of the JVM can be automatically and accurately finished on the premise of not invading single-process operation of the JAVA application container, and a foundation is laid for problem analysis and positioning.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for monitoring memory overflow of a JAVA container JVM in a cloud system according to an embodiment of the present invention;
fig. 2 is a flowchart of an embodiment S100 of a method for monitoring memory overflow of a JAVA container JVM in a cloud system according to the present invention;
fig. 3 is a flowchart of an embodiment S000 of a method for monitoring memory overflow of a JAVA container JVM in a cloud system according to the present invention;
fig. 4 to fig. 7 are schematic diagrams illustrating container arrangement configuration pages in a specific example of a monitoring method for memory overflow of a JAVA container JVM in a cloud system according to the present invention;
fig. 8 is a flowchart of an embodiment S200 of a method for monitoring memory overflow of a JAVA container JVM in a cloud system according to the present invention;
fig. 9 is a flowchart of an embodiment S300 of a method for monitoring memory overflow of a JAVA container JVM in a cloud system according to the present invention;
FIG. 10 is a diagram illustrating the structure of an embodiment of a monitoring system for memory overflow of a cloud system JAVA container JVM according to the present invention;
FIG. 11 is a diagram illustrating a structure of a log information obtaining module according to an embodiment of the present invention;
FIG. 12 is a diagram illustrating the structure of a monitoring system for memory overflow of a JAVA container JVM in a cloud system according to an embodiment of the present invention;
FIG. 13 is a diagram illustrating a container arrangement module according to an embodiment of the present invention for monitoring system memory overflow of a JAVA container JVM in a cloud system;
FIG. 14 illustrates a schematic block diagram of a computer device suitable for use in implementing embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of this application and the above-described drawings, 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, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In one or more embodiments of the invention, a Pod is made up of one or more containers (e.g., Docker containers) and has the capability to share storage/network/UTS/PIDs, as well as specifications to run the containers. And in kubernets Pod is the smallest atomic unit that can be scheduled. In colloquial, a Pod is a collection of containers, and containers within the Pod share a network/store (Kubernets implements a shared set of Namespace to replace each container's respective NS, to achieve this capability), so they can communicate internally via Localhost. Although network storage is shared, the CPU and Memory are not. There may be Cgroup among multiple containers that belong to themselves, that is, we may individually limit the use of resources (MEM/CPU) for containers in a Pod.
According to one aspect of the invention, the embodiment discloses a method for monitoring memory overflow of a JAVA container JVM of a cloud system. As shown in fig. 1, in this embodiment, the method includes:
s100: 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 a POD of a cloud system.
S200: and determining whether memory overflow information which represents memory overflow exists in the JVM log information.
S300: and if so, forming an alarm message according to the memory overflow information to feed back to operation and maintenance personnel.
In order to solve the problem that the existing JVM memory overflow monitoring method cannot be applied to a JAVA application container on the cloud, the monitoring container and the JAVA application container are arranged in a POD of a cloud system, so that the monitoring container can acquire JVM log information of the JAVA application container in a POD storage and sharing mode. And analyzing the obtained JVM log information to determine whether memory overflow information indicating memory overflow exists in the JVM log information, and if so, forming an alarm message in time and feeding back the alarm message to operation and maintenance personnel. Therefore, detection and alarm of memory overflow of the JVM can be automatically and accurately finished on the premise of not invading single-process operation of the JAVA application container, and a foundation is laid for problem analysis and positioning.
In a preferred embodiment, as shown in fig. 2, the acquiring, in S100, the JVM log information of the JAVA application container through the monitoring container 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 positions of the JAVA application container and the monitoring container through the monitoring container according to the JVM log storage information.
S130: and reading JVM log information 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 may 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 operate independently, and the storage contents of the JAVA application container and the monitoring container may 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, the JVM log storage information of the JAVA application container may be stored in the environment configuration file in advance, and the JVM log storage information may include a storage address and an encoding format of the JVM log, and the like. And uploading the JVM log storage information to a monitoring container in the form of an environment configuration file, and then setting the monitoring container, so that the monitoring container can obtain a shared storage position according to the JVM log storage information, can acquire a mirror image file of the JVM log file from the shared storage position, and can further read the JVM log information from the mirror image file.
In a preferred embodiment, the method further comprises the step S000 of previously setting the monitoring container and the JAVA application container in one POD. It should be noted that, a person skilled in the art may set 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 again. The JAVA application container and the monitoring container are arranged in one POD, so that the two containers can be arranged together, and the JVM log information of the JAVA application container can be acquired by the monitoring container by utilizing the storage sharing function provided by the POD so as to analyze whether the memory overflow condition exists or not.
In a preferred embodiment, as shown in fig. 3, the step S000 of previously 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 the JVM log storage information, the JAVA application information and the memory overflow information sending information in an environment configuration file.
It is understood that in the preferred embodiment, the JVM log storage information, the JAVA application information, and the memory overflow information sending information may be set in an environment configuration file, and uploaded to the monitoring container in the form of environment variables for the monitoring container to call. The JVM log storage information may include information such as a JVM log directory and a JVM log encoding format that are stored in a shared manner, 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 to which the memory overflow information is sent.
In one specific example, the cloud system employs a Kubernets open source orchestration component and the monitoring container employs a fluent open source component. Two containers are arranged in one Pod through shared log directory storage, and except that a fluent container can read a JVM log directory file of a JAVA application container, the application container and a monitoring container run independently. The layout configuration pages are shown in fig. 4 to 7.
In a preferred embodiment, as shown in fig. 8, the determining in S200 whether the memory overflow information indicating the memory overflow exists in the JVM log information may specifically include:
s210: and matching the JVM log information according to preset keywords according to preset memory overflow keywords to obtain whether keywords exist or not.
S220: and if so, forming memory overflow information according to the keywords, the JAVA application information and the cloud system information.
It is understood that the JVM log information can be obtained by reading the image file of the JVM log file line by line. When memory overflow occurs in the JVM, a keyword of "java. Therefore, whether keywords exist in the JVM log information can be determined by performing keyword matching on the obtained JVM log information and determining whether keywords of java. If the keywords exist, the memory overflow condition is indicated, and memory overflow information can be formed according to the keywords, JAVA application information and 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 open source component, fluent is a relatively general log collection tool at present, supports the collection of log files under a configuration directory line by line, filters collected contents, and sends the filtered collected contents to a destination server. The monitoring container can realize the collection, analysis and storage of JVM log information through the following programs:
Figure BDA0002561860560000081
Figure BDA0002561860560000091
Figure BDA0002561860560000101
the source part collects mirror image files of JVM log files of messages.log, and the encoding format of the JVM log files is UTF-8. The filter part filters the collected content, and filters out alarm information of the OutOfMemory, namely, the alarm information is used for keyword matching. After the keywords are obtained through matching, application information such as application names can be added for identification. The match part can send the obtained memory overflow information to a data storage module of an ElasticSearch server for storage so as to alarm. Preferably, the data storage module may receive the data query request, and return the matched memory overflow information to the calling party to implement output of the memory overflow information. Furthermore, the time can be preset so as to delete the expired data regularly according to the preset time and prevent the storage occupation from being overlarge.
In a preferred embodiment, as shown in fig. 9, the step S300 of forming an alarm message according to the memory overflow information to feed back to the operation and maintenance staff may specifically include:
s310: and acquiring newly-added memory overflow information in the monitoring container.
S320: and extracting keywords in the memory overflow information, and obtaining early warning information according to the keywords.
S330: and forming an alarm message according to the early warning information, the JAVA application information and the cloud system information and feeding the alarm message back to operation and maintenance personnel.
It can be understood that, in the preferred embodiment, after the monitoring container sends the memory overflow information to the ElasticSearch server for storage. Whether newly added memory overflow information exists at the ElasticSearch server side can be further determined, and if yes, early warning information can be formed according to the key word. In order to further warn operation and maintenance personnel, JAVA application information and cloud system information can be added, for example, an application name, a system node name and the early warning information are formed into an alarm message and fed back to the operation and maintenance personnel, so that the operation and maintenance personnel can timely perform troubleshooting on the JAVA application container. Preferably, the alarm message can be sent to the mailbox of the operation and maintenance personnel in a mail transmission mode.
Based on the same principle, the embodiment also discloses a monitoring system for memory overflow of the cloud system JAVA container JVM. As shown in fig. 10, in this embodiment, the system includes a log information obtaining module 11, an overflow information determining module 12, and an alarm feedback module 13.
The log information acquiring module 11 is configured to acquire JVM log information of a JAVA application container through a monitoring container, where the monitoring container and the JAVA application container are disposed in a POD of a cloud system;
the overflow information determining module 12 is configured to determine whether memory overflow information indicating memory overflow exists in the JVM log information;
the alarm feedback module 13 is configured to form an alarm message according to the memory overflow information if the memory overflow information exists, so as to feed back the alarm message to the operation and maintenance staff.
In a preferred embodiment, as shown in fig. 11, the log information acquisition module 11 includes a storage information determination unit 111, a log file acquisition unit 112, and a log information reading unit 113.
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 the 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 orchestration setting module 10. The container arrangement setting module 10 is configured to previously set the monitoring container and the JAVA application container in one POD.
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.
The container setting unit 101 is configured to set a monitoring container and a JAVA application container on a 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 sending 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 word to obtain whether the key word exists, and if so, form memory overflow information according to the key word, JAVA application information, and cloud system information.
In a preferred embodiment, the alarm feedback module 13 is specifically configured to acquire 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 an alarm message according to the early warning information, JAVA application information, and cloud system information, and feed the alarm message back to the operation and maintenance staff.
Since the principle of the system for solving the problem is similar to the above method, the implementation of the system can refer to the implementation of the method, and the detailed description is omitted here.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. 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 device comprises in particular a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the method as described above.
Referring now to FIG. 14, shown is a schematic block 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 necessary for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via 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, a mouse, and the like; an output section 607 including a Cathode Ray Tube (CRT), a liquid crystal feedback (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 driver 610 is also connected to the I/O interface 606 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted as necessary on the storage section 608.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention 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 illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, 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.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

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 a POD of a cloud system;
determining whether memory overflow information which represents memory overflow exists in the JVM log information;
and if so, forming an alarm message according to the memory overflow information to feed back to operation and maintenance personnel.
2. The method for monitoring memory overflow of the JAVA container JVM of the cloud system of claim 1, wherein the obtaining the JVM log information of the JAVA application container through the monitoring container specifically comprises:
determining JVM log storage information of the JAVA application container according to the environment configuration file of the monitoring container;
acquiring a mirror image file of a JVM log file from a shared storage position of a JAVA application container and a monitoring container through the monitoring container according to JVM log storage information;
and reading JVM log information from the image file.
3. The method for monitoring memory overflow of a JAVA container JVM in a cloud system as claimed in claim 1, further comprising the step of placing said monitoring container and said JAVA application container in a POD in advance.
4. The method for monitoring memory overflow of a JAVA container JVM in a cloud system of claim 3, wherein the pre-setting the monitoring container and the JAVA application container in a 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 a POD;
and setting the JVM log storage information, the JAVA application information and the memory overflow information sending information in an environment configuration file.
5. The method for monitoring memory overflow of the JAVA container JVM of the cloud system of claim 1, wherein the determining whether the memory overflow information indicating the memory overflow exists in the JVM log information specifically comprises:
matching the JVM log information according to preset keywords according to preset memory overflow keywords to obtain whether keywords exist or not;
and if so, forming memory overflow information according to the keywords, the JAVA application information and the cloud system information.
6. The method for monitoring memory overflow of the cloud system JAVA container JVM of claim 5, wherein the forming an alarm message according to the memory overflow information to feed back to the operation and maintenance staff specifically comprises:
acquiring newly-added memory overflow information in a monitoring container;
extracting keywords in the memory overflow information, and obtaining early warning information according to the keywords;
and forming an alarm message according to the early warning information, the JAVA application information and the cloud system information and feeding the alarm message back to operation and maintenance personnel.
7. A monitoring system for memory overflow of a cloud system JAVA container JVM (JVM) is characterized by comprising:
the system comprises a log information acquisition module, a log information acquisition module and a processing module, wherein the log information acquisition module is used for acquiring JVM log information of a JAVA application container through a monitoring container, and the monitoring container and the JAVA application container are arranged in a POD of a cloud system;
an overflow information determining module, configured to determine whether memory overflow information indicating memory overflow exists in the JVM log information;
and the alarm feedback module is used for forming an alarm message according to the memory overflow information to feed back to operation and maintenance personnel if the memory overflow information exists.
8. The system for monitoring memory overflow of the cloud system JAVA container JVM of claim 7, wherein the log information obtaining module comprises:
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 a mirror image file of the JVM log file from the shared storage positions of the JAVA application container and the monitoring container through the monitoring container according to the JVM log storage information;
and the log information reading unit is used for reading the JVM log information from the mirror image file.
9. The cloud system JAVA container JVM memory overflow monitoring system of claim 7, further comprising a container arrangement setting module for setting said monitoring container and said JAVA application container in a POD in advance.
10. The cloud system JAVA container JVM memory overflow monitoring system of claim 9, wherein the container arrangement 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;
and the environment variable configuration unit is used for setting the JVM log storage information, the JAVA application information and the memory overflow information sending information in an environment configuration file.
11. 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 of any of claims 1-6.
12. A computer-readable medium, having stored thereon a computer program,
the program when executed by a processor implementing the method according to any one of claims 1-6.
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 true CN111782471A (en) 2020-10-16
CN111782471B 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)

Cited By (1)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140068610A1 (en) * 2012-09-06 2014-03-06 Marek Baluch Method and system for adjusting the operating memory used by a java virtual machine during runtime
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140068610A1 (en) * 2012-09-06 2014-03-06 Marek Baluch Method and system for adjusting the operating memory used by a java virtual machine during runtime
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN111782471B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
KR101825023B1 (en) Risk early warning method and device
CN110543512B (en) Information synchronization method, device and system
CN113911872B (en) Fault processing method and system and early warning rescue system
CN111932046A (en) Method for processing risk in service scene, computer equipment and storage medium
CN114490272A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN112953952A (en) Industrial security situation awareness method, platform, electronic device and storage medium
CN114153646B (en) Operation and maintenance fault handling method and device, storage medium and processor
CN113392153A (en) Data synchronization method and device, electronic equipment and computer storage medium
CN110784377A (en) Method for uniformly managing cloud monitoring data in multi-cloud environment
CN111782471B (en) Monitoring method and system for cloud system JAVA container JVM memory overflow
CN110677271A (en) Big data alarm method, device, equipment and storage medium based on ELK
CN115174353A (en) Fault root cause determination method, device, equipment and medium
CN109697638A (en) Passenger flow management method, device, electronic equipment and computer readable storage medium
CN112668744A (en) Data processing method and device
CN112950125A (en) Method and device for obtaining safety state data of distributed resources and electronic equipment
CN112802610A (en) Passenger information big data intelligent processing method and device
CN117997715A (en) Alarm processing method, device, equipment, storage medium and program product
CN117319174A (en) Terminal monitoring method and system based on intelligent bank broadcasting control system
CN115567563A (en) Comprehensive transportation hub monitoring and early warning system based on end edge cloud and control method thereof
CN114416560A (en) Program crash analysis aggregation method and system
CN109918222B (en) Dump analysis method and system for application program
CN113726779A (en) Rule false alarm test method and device, electronic equipment and computer storage medium
CN110020263A (en) Monitoring method and device, the monitoring device of closed system
CN113934744A (en) Data sharing method and device
CN113014585A (en) Industrial security threat monitoring method, platform, electronic device and storage medium

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载