CN108874624A - Server, the method and storage medium for monitoring Java process - Google Patents

Server, the method and storage medium for monitoring Java process Download PDF

Info

Publication number
CN108874624A
CN108874624A CN201810550030.8A CN201810550030A CN108874624A CN 108874624 A CN108874624 A CN 108874624A CN 201810550030 A CN201810550030 A CN 201810550030A CN 108874624 A CN108874624 A CN 108874624A
Authority
CN
China
Prior art keywords
java process
java
information
virtual machine
server
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
CN201810550030.8A
Other languages
Chinese (zh)
Other versions
CN108874624B (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.)
Kang Keyi Information Technology (shenzhen) Co Ltd
Original Assignee
Kang Keyi Information Technology (shenzhen) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kang Keyi Information Technology (shenzhen) Co Ltd filed Critical Kang Keyi Information Technology (shenzhen) Co Ltd
Priority to CN201810550030.8A priority Critical patent/CN108874624B/en
Publication of CN108874624A publication Critical patent/CN108874624A/en
Application granted granted Critical
Publication of CN108874624B publication Critical patent/CN108874624B/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/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system

Abstract

The present invention relates to a kind of server, the method and storage medium of monitoring Java process, this method includes:After deployment broker program in the server is to server registration, receive start monitoring instruction when, obtain the current Java process list of server based on the instruction and using scheduled order;Each Java process in the Java process list is filtered, the active Java process obtained after filtering in the Java process list is obtained;Scheduled multiple orders in shell script based on Linux acquire each active corresponding load information of Java process and virtual machine information, and the load information for arranging each active Java process and virtual machine information are numbered according to the corresponding process of active Java process each in the Java process list and is reported.The present invention can be realized the monitoring of non-intrusion type java applet operating status, without being embedded in monitor code, and not expose extra interface, reduce by intrusion risk.

Description

Server, the method and storage medium for monitoring Java process
Technical field
The present invention relates to field of communication technology more particularly to a kind of server, monitors the method for Java process and store Jie Matter.
Background technique
Currently, can be monitored to Java process when carrying out performance pressure test to server, traditional Java process prison Control is monitored there are two types of mode, the first is to be embedded in monitor code in Java process to be monitored;Second is tested Java applet is opened remote monitoring end mouth RMI and is monitored.First way not only breaks up the integrality of tested program, can also increase Add the risk invaded;The second way is due to opening monitoring port RMI, so the performance of tested code is influenced greatly, Port is exposed to also will increase the risk invaded outside.No matter which kind of mode is used, is tested java applet and real running environment Difference is too big, and test cannot react truth.
Summary of the invention
The purpose of the present invention is to provide a kind of servers, the method and storage medium of monitoring Java process, it is intended to realize The monitoring of non-intrusion type java applet operating status.
To achieve the above object, the present invention provides a kind of server, the server include memory and with the storage The processor of device connection, is stored with the processing system that can be run on the processor, the processing system in the memory Following steps are realized when being executed by the processor:
After deployment broker program in the server is to server registration, receive start monitoring instruction when, be based on This starts monitoring and instructs and obtain the current Java process list of server using scheduled order;
Each Java process in the Java process list is filtered based on preset filtering rule, obtain the Java into The active Java process obtained after being filtered in Cheng Liebiao;
Scheduled multiple orders in shell script based on Linux acquire each active corresponding load information of Java process And virtual machine information, it is arranged according to the corresponding process number of active Java process each in the Java process list each active The load information and virtual machine information of Java process are simultaneously reported to controller, with the IP address by the controller according to book server And process number summarizes the load information and virtual machine information as major key, and stores into database, for carrying out performance pressure It surveys.
It is preferably, described that each Java process in the Java process list is filtered based on preset filtering rule, The step of obtaining the active Java process obtained after filtering in the Java process list, specifically includes:
The process title of each Java process in the Java process list is obtained, based on scheduled key character to each process Title carries out first time filtering, and non-traffic correlation Java process is filtered, business correlation Java process is obtained;
Analyze whether each business correlation Java process is Java process used in pressure survey process, and it is related to analyze each business Whether Java process is the Java process in silent status;
If having business correlation Java process is that pressure surveys the Java process not used in the process, and the business correlation Java process It for the Java process in silent status, then carries out filtering for second, survey will be pressed not use in the process and in silent status Java process be filtered, obtain active Java process.
Preferably, the load information includes CPU use information, memory usage amount information, network traffic information and disk Reading writing information, the virtual machine information is including old age for memory garbage reclamation information, youth for memory garbage reclamation information and line Journey abnormal state information when the processing system is executed by the processor, also realizes following steps:
Capacity planning information is generated based on current every load information and virtual machine information, and by the capacity planning information It is shown or is sent to scheduled terminal.
Preferably, when the processing system is executed by the processor, following steps are also realized:It is negative to generate current items Information carrying breath and the corresponding monitoring chart of virtual machine information, analyze current every load information and virtual machine information whether occur it is different Normal situation, and when having load information or unusual condition occurs in virtual machine information, carry out alarming processing.
To achieve the above object, the present invention also provides a kind of method for monitoring Java process, the monitoring Java processes Method includes:
S1, after deployment broker program in the server is to server registration, receive start monitoring instruction when, base Start the Java process list that monitoring instructs and utilizes scheduled order acquisition server current in this;
S2 is filtered each Java process in the Java process list based on preset filtering rule, and obtaining should The active Java process obtained after being filtered in Java process list;
S3, scheduled multiple orders in the shell script based on Linux acquire each active corresponding load of Java process Information and virtual machine information arrange each active according to the corresponding process number of active Java process each in the Java process list Java process load information and virtual machine information and be reported to controller, with the IP by the controller according to book server Location and process number are used as major key to summarize the load information and virtual machine information, and store into database, for carrying out performance Pressure is surveyed.
Preferably, the step S2, specifically includes:
The process title of each Java process in the Java process list is obtained, based on scheduled key character to each process Title carries out first time filtering, and non-traffic correlation Java process is filtered, business correlation Java process is obtained;
Analyze whether each business correlation Java process is Java process used in pressure survey process, and it is related to analyze each business Whether Java process is the Java process in silent status;
If having business correlation Java process is that pressure surveys the Java process not used in the process, and the business correlation Java process It for the Java process in silent status, then carries out filtering for second, survey will be pressed not use in the process and in silent status Java process be filtered, obtain active Java process.
Preferably, the load information includes CPU use information, memory usage amount information, network traffic information and disk Reading writing information, the virtual machine information is including old age for memory garbage reclamation information, youth for memory garbage reclamation information and line Journey abnormal state information, this method further include:
Capacity planning information is generated based on current every load information and virtual machine information, and by the capacity planning information It is shown or is sent to scheduled terminal.
Preferably, this method further includes:
Current every load information and the corresponding monitoring chart of virtual machine information are generated, current every load letter is analyzed Whether breath and virtual machine information there is unusual condition, and when having load information or unusual condition occurs in virtual machine information, carry out Alarming processing.
Preferably, the scheduled order for acquiring load information includes dstat order, iostat order and free order, is adopted The order for collecting virtual machine information includes jstat order and jstack order.
The present invention also provides a kind of computer readable storage medium, processing is stored on the computer readable storage medium The step of system, the processing system realizes the method for above-mentioned monitoring Java process when being executed by processor.
The beneficial effects of the invention are as follows:The present invention passes through agency by disposing broker program in the server surveyed by pressure Program monitors multiple Java processes, is filtered to obtain active Java process to the Java process of Java process list, collects The load information and virtual machine information of multiple active Java processes, and the load information of collection and virtual machine information are converged Total arrange is reported, and realizes the monitoring of non-intrusion type java applet operating status, is not needed insertion monitor code, is not being changed The code and running environment of system under test (SUT) can monitor the data of Java process, while not expose extra interface, and reduction is entered Blepharoptosis danger.
Detailed description of the invention
Fig. 1 is the schematic diagram of the hardware structure of one embodiment of server of the present invention;
Fig. 2 is the flow diagram of the method first embodiment of present invention monitoring Java process;
Fig. 3 is the flow diagram of the method second embodiment of present invention monitoring Java process;
Fig. 4 is the flow diagram of the method 3rd embodiment of present invention monitoring Java process.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
As shown in fig.1, being the schematic diagram of the hardware structure of one embodiment of server of the present invention.Server 1 is a kind of energy Enough according to the instruction for being previously set or storing, the automatic equipment for carrying out numerical value calculating and/or information processing.The server 1 It can be computer, be also possible to single network server, the server group of multiple network servers composition or based on cloud The cloud being made of a large amount of hosts or network server calculated, wherein cloud computing is one kind of distributed computing, loose by a group One super virtual computer of the computer set composition of coupling.
In the present embodiment, server 1 may include, but be not limited only to, and depositing for connection can be in communication with each other by system bus Reservoir 11, processor 12, network interface 13, memory 11 are stored with the processing system that can be run on the processor 12.It needs to refer to Out, Fig. 1 illustrates only the server 1 with component 11-13, it should be understood that being not required for implementing all show Component, the implementation that can be substituted is more or less component.
Wherein, memory 11 includes the readable storage medium storing program for executing of memory and at least one type.Inside save as the operation of server 1 Caching is provided;Readable storage medium storing program for executing can be for if flash memory, hard disk, multimedia card, card-type memory are (for example, SD or DX memory Deng), random access storage device (RAM), static random-access memory (SRAM), read-only memory (ROM), electric erasable can compile Journey read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc. it is non-volatile Storage medium.In some embodiments, readable storage medium storing program for executing can be the internal storage unit of server 1, such as the server 1 Hard disk;In further embodiments, which is also possible to the External memory equipment of server 1, such as The plug-in type hard disk being equipped on server 1, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..In the present embodiment, the readable storage medium storing program for executing of memory 11 is commonly used in Storage is installed on the processing system in the operating system and types of applications software of server 1, such as storage one embodiment of the invention Program code (i.e. broker program) etc..In addition, memory 11 can be also used for temporarily storing and export or will be defeated Various types of data out.
The processor 12 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 12 is commonly used in the control clothes The overall operation of business device 1, such as execute control relevant to other equipment progress data interaction or communication and processing etc..This reality It applies in example, the processor 12 is used to run the program code stored in the memory 11 or processing data, such as runs Processing system etc..
The network interface 13 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the server 1 and other electronic equipments.
The processing system is stored in memory 11, is stored in including at least one computer-readable in memory 11 It instructs (the broker program agent disposed on the server), which can be by processor device 12 It executes, the method to realize each embodiment of the application;And at least one computer-readable instruction is real according to its each section institute Existing function is different, can be divided into different logic modules.
In one embodiment, following steps are realized when above-mentioned processing system is executed by the processor 12:
After deployment broker program in the server is to server registration, receive start monitoring instruction when, be based on This starts monitoring and instructs and obtain the current Java process list of server using scheduled order;
Wherein, broker program is deployed on the server for needing to be monitored, which on startup can be using certainly The RPC communication function of body is registered on the server, receive start monitoring instruction after, can be based on the software of Java language Development kit JDK included jps order obtains running Java process list on current server.It is arranged in the Java process Table includes the process title of process number PID and the Java process of each Java process.
Each Java process in the Java process list is filtered based on preset filtering rule, obtain the Java into The active Java process obtained after being filtered in Cheng Liebiao;
Due to only having active Java process just to need to be monitored, the present embodiment is filtered Java process To active Java process, and the process in addition to active Java process is not needed to be monitored.
In a preferred embodiment, each Java process in the Java process list is carried out based on preset filtering rule Filtering obtains the active Java process obtained after filtering in the Java process list, including:
The process title of each Java process in the Java process list is obtained, based on scheduled key character to each process Title carries out first time filtering, and non-traffic correlation Java process is filtered, business correlation Java process is obtained;Analysis is each Whether business correlation Java process is Java process used in pressure survey process, and analyze each business correlation Java process whether be Java process in silent status;If having business correlation Java process is the Java process not used during pressure is surveyed, and should Business correlation Java process is the Java process in silent status, then carries out second and filter, will press does not make during surveying It is filtered with and in the Java process of silent status, obtains active Java process.
Wherein, scheduled key character is, for example, Service, Main, Manager etc., by these key characters to each Process title carries out first time filtering, and non-traffic correlation Java process is filtered, includes keyword for example including some The Java process of symbol Service is not belonging to Java process, such as:Monitoring process, middleware etc. can filter this out, final To be all business correlation Java process.
Since part Java process will not be called to when pressing and surveying, some Java processes are in silent status, do not need It is monitored, therefore analyze whether each business correlation Java process is Java process used in pressure survey process, and analyze each business Whether related Java process is the Java process in silent status, surveys the Java process not used in the process if pressure and to locate It in the Java process of silent status, then carries out filtering for second, will not use and the Java process in silent status carries out Filtering, obtains active Java process.
Scheduled multiple orders in shell script based on Linux acquire each active corresponding load information of Java process And virtual machine information, it is arranged according to the corresponding process number of active Java process each in the Java process list each active The load information and virtual machine information of Java process are simultaneously reported to controller, with the IP address by the controller according to book server And process number summarizes the load information and virtual machine information as major key, and stores into database.
Wherein, the scheduled order for acquiring load information includes dstat order, iostat order, free order:dstat Order is for obtaining the service conditions such as cpu, disk, network, IO, memory;Iostat order can check cpu usage, net Card information, disk service condition etc.;Free order can show the not used and used memory number of current system, may be used also To show the core buffer used by kernel;The order for acquiring virtual machine information includes jstat order, jstack order: Jstat order (virtual machine statistical information adviser tool), the instruction built-in to utilization JAVA virtual machine is to java application Resource and performance carry out the monitoring of real-time order line, include to Heap size virutal machine memory and garbage reclamation situation Monitoring;Jstack order is to print given java process ID or core file or the Java heap of remote debugging service Stack information etc..
In the present embodiment, load information includes CPU use information (utilization rate percentage, CPU waiting, cpu load), memory Usage amount information (usage amount, surplus, virtual memory swapace), network traffic information (traffic volume, reception amount) and disk Reading writing information (writing speed, reading speed), the virtual machine information include old for memory garbage reclamation information, in young generation Deposit garbage reclamation information and thread abnormal state information.
It is corresponding according to active Java process each in the Java process list after acquisition load information and virtual machine information Process number arrange the load information of each active Java process and virtual machine information and be reported to controller, by the controller Uniformly summarized arrangement as major key according to IP address and the process number of book server, summarizes the load information and virtual machine Information, and store into database, it is surveyed for carrying out performance pressure.
Compared with prior art, the present invention passes through broker program by disposing broker program in the server surveyed by pressure Multiple Java processes are monitored, the Java process of Java process list is filtered to obtain active Java process, is collected multiple The load information and virtual machine information of active Java process, and the load information of collection and virtual machine information summarize whole Reason is reported, and realizes the monitoring of non-intrusion type java applet operating status, does not need insertion monitor code, tested not changing The code and running environment of system can monitor the data of Java process, while not expose extra interface, and reduction is entered blepharoptosis Danger.
In a preferred embodiment, on the basis of the above embodiments, the processing system is executed by the processor When, also realize following steps:Capacity planning information is generated based on current every load information and virtual machine information, and by the appearance Amount planning information is shown or is sent to scheduled terminal.
The present embodiment generates capacity planning information based on current every load information and virtual machine information:According to acquisition Load information and virtual machine information are calculated automatically when server is under this pressure, and how many file, CPU can be written in hard disk Consume how many, whether memory is enough etc.;When pressure is more than a certain threshold value, it is slack-off to will result in system response time, needs Dilatation etc. is carried out to server resource;The minimum and maximum value of hard disk usage amount is subtracted each other into increment during can obtaining this, Again divided by length of testing speech, the growth rate etc. of hard disk usage amount is just obtained;Situation on reference line, so that it may acquire:Work as system When pressure persistently keeps current state, the daily disk increment of aol server is how many;When the number of transactions of processing each second When reaching some point, cpu quantity of dilatation server etc. is needed.Finally this capacity planning information is shown or is sent To scheduled terminal, referred to for tester.
In a preferred embodiment, on the basis of the above embodiments, the processing system is executed by the processor When, also realize following steps:Current every load information and the corresponding monitoring chart of virtual machine information are generated, is analyzed current Whether every load information and virtual machine information there is unusual condition, and are having load information or virtual machine information abnormal shape occur When condition, alarming processing is carried out.
Wherein it is possible to generate the current corresponding monitoring chart of every load information and virtual machine information, such as it is converted into Patterned form, such as curve graph etc. being capable of more intuitively display data.
Wherein, the auto-alarming when noting abnormalities situation, such as CPU usage is excessively high, OS has used SWAP memory, hard disk Write-in data volume is excessive, network flow is more than threshold value, a large amount of Blocked states of Java thread appearance etc..
Specifically, can pre-establish each single item monitoring information upper limit value, passage capacity pressure survey gauging system can Scalability and performance, determine where problem and optimization system performance, the receiving limit of the information by knowing each monitoring, so as to Preferably configure system.Such as server, setting CPU usage is 80%, memory consumption 85%, disk utilization rate are 50% etc., when CPU usage reach 80% perhaps memory consumption reach 85% or disk utilization rate reach 50% when, analysis Whether analysis is current due to CPU usage or memory consumption or disk utilization rate there are abnormal conditions, if do not gone out It is now abnormal, then further the upper limit value of these status informations can be raised, such as adjustment CPU usage is 85%, memory Consumption is 90%, disk utilization rate is 60% etc., using upper limit value adjusted as performance bottleneck value, for reaching the property in next time Early warning can be issued when bottleneck value;If there is exception, then further the upper limit value of these status informations can be lowered, such as Adjustment CPU usage is 75%, memory consumption 80%, disk utilization rate are 45% etc., using upper limit value adjusted as property Energy bottleneck value, for issuing early warning when reaching the performance bottleneck value next time.
As shown in Fig. 2, Fig. 2 is the flow diagram of one embodiment of method of present invention monitoring Java process, the monitoring The method of Java process includes the following steps:
Step S1 starts monitoring instruction receiving after deployment broker program in the server is to server registration When, the Java process list that monitoring instructs and utilizes scheduled order acquisition server current is started based on this;
Wherein, broker program is deployed on the server for needing to be monitored, which on startup can be using certainly The RPC communication function of body is registered on the server, receive start monitoring instruction after, can be based on the software of Java language Development kit JDK included jps order obtains running Java process list on current server.It is arranged in the Java process Table includes the process title of process number PID and the Java process of each Java process.
Step S2 is filtered each Java process in the Java process list based on preset filtering rule, obtains The active Java process obtained after being filtered in the Java process list;
Due to only having active Java process just to need to be monitored, the present embodiment is filtered Java process To active Java process, and the process in addition to active Java process is not needed to be monitored.
In a preferred embodiment, each Java process in the Java process list is carried out based on preset filtering rule Filtering obtains the active Java process obtained after filtering in the Java process list, including:
The process title of each Java process in the Java process list is obtained, based on scheduled key character to each process Title carries out first time filtering, and non-traffic correlation Java process is filtered, business correlation Java process is obtained;Analysis is each Whether business correlation Java process is Java process used in pressure survey process, and analyze each business correlation Java process whether be Java process in silent status;If having business correlation Java process is the Java process not used during pressure is surveyed, and should Business correlation Java process is the Java process in silent status, then carries out second and filter, will press does not make during surveying It is filtered with and in the Java process of silent status, obtains active Java process.
Wherein, scheduled key character is, for example, Service, Main, Manager etc., by these key characters to each Process title carries out first time filtering, and non-traffic correlation Java process is filtered, includes keyword for example including some The Java process of symbol Service is not belonging to Java process, such as:Monitoring process, middleware etc. can filter this out, final To be all business correlation Java process.
Since part Java process will not be called to when pressing and surveying, some Java processes are in silent status, do not need It is monitored, therefore analyze whether each business correlation Java process is Java process used in pressure survey process, and analyze each business Whether related Java process is the Java process in silent status, surveys the Java process not used in the process if pressure and to locate It in the Java process of silent status, then carries out filtering for second, will not use and the Java process in silent status carries out Filtering, obtains active Java process.
Step S3, it is corresponding that scheduled multiple orders in the shell script based on Linux acquire each active Java process Load information and virtual machine information arrange each according to the corresponding process number of active Java process each in the Java process list The load information and virtual machine information of active Java process are simultaneously reported to controller, with by the controller according to book server IP address and process number are used as major key to summarize the load information and virtual machine information, and store into database, for carrying out Performance pressure is surveyed.
Wherein, the scheduled order for acquiring load information includes dstat order, iostat order, free order:dstat Order is for obtaining the service conditions such as cpu, disk, network, IO, memory;Iostat order can check cpu usage, net Card information, disk service condition etc.;Free order can show the not used and used memory number of current system, may be used also To show the core buffer used by kernel;The order for acquiring virtual machine information includes jstat order, jstack order: Jstat order (virtual machine statistical information adviser tool), the instruction built-in to utilization JAVA virtual machine is to java application Resource and performance carry out the monitoring of real-time order line, include to Heap size virutal machine memory and garbage reclamation situation Monitoring;Jstack order is to print given java process ID or core file or the Java heap of remote debugging service Stack information etc..
In the present embodiment, load information includes CPU use information (utilization rate percentage, CPU waiting, cpu load), memory Usage amount information (usage amount, surplus, virtual memory swapace), network traffic information (traffic volume, reception amount) and disk Reading writing information (writing speed, reading speed), the virtual machine information include old for memory garbage reclamation information, in young generation Deposit garbage reclamation information and thread abnormal state information.
It is corresponding according to active Java process each in the Java process list after acquisition load information and virtual machine information Process number arrange the load information of each active Java process and virtual machine information and be reported to controller, by the controller Uniformly summarized arrangement as major key according to IP address and the process number of book server, summarizes the load information and virtual machine Information, and store into database.
Compared with prior art, the present invention passes through broker program by disposing broker program in the server surveyed by pressure Multiple Java processes are monitored, the Java process of Java process list is filtered to obtain active Java process, is collected multiple The load information and virtual machine information of active Java process, and the load information of collection and virtual machine information summarize whole Reason is reported, and realizes the monitoring of non-intrusion type java applet operating status, does not need insertion monitor code, tested not changing The code and running environment of system can monitor the data of Java process, while not expose extra interface, and reduction is entered blepharoptosis Danger.
In a preferred embodiment, on the basis of the above embodiments, as shown in figure 3, this method further includes:Step S4 generates capacity planning information based on current every load information and virtual machine information, and the capacity planning information is carried out Show or be sent to scheduled terminal.
The present embodiment generates capacity planning information based on current every load information and virtual machine information:According to acquisition Load information and virtual machine information are calculated automatically when server is under this pressure, and how many file, CPU can be written in hard disk Consume how many, whether memory is enough etc.;When pressure is more than a certain threshold value, it is slack-off to will result in system response time, needs Dilatation etc. is carried out to server resource;The minimum and maximum value of hard disk usage amount is subtracted each other into increment during can obtaining this, Again divided by length of testing speech, the growth rate etc. of hard disk usage amount is just obtained;Situation on reference line, so that it may acquire:Work as system When pressure persistently keeps current state, the daily disk increment of aol server is how many;When the number of transactions of processing each second When reaching some point, cpu quantity of dilatation server etc. is needed.Finally this capacity planning information is shown or is sent To scheduled terminal, referred to for tester.
In a preferred embodiment, on the basis of the above embodiments, as shown in figure 4, this method further includes:Step S5 generates the current corresponding monitoring chart of every load information and virtual machine information, analyze current every load information and Whether virtual machine information there is unusual condition, and when having load information or unusual condition occurs in virtual machine information, is alerted Processing.
Wherein it is possible to generate the current corresponding monitoring chart of every load information and virtual machine information, such as it is converted into Patterned form, such as curve graph etc. being capable of more intuitively display data.
Wherein, the auto-alarming when noting abnormalities situation, such as CPU usage is excessively high, OS has used SWAP memory, hard disk Write-in data volume is excessive, network flow is more than threshold value, a large amount of Blocked states of Java thread appearance etc..
Specifically, can pre-establish each single item monitoring information upper limit value, passage capacity pressure survey gauging system can Scalability and performance, determine where problem and optimization system performance, the receiving limit of the information by knowing each monitoring, so as to Preferably configure system.Such as server, setting CPU usage is 80%, memory consumption 85%, disk utilization rate are 50% etc., when CPU usage reach 80% perhaps memory consumption reach 85% or disk utilization rate reach 50% when, analysis Whether analysis is current due to CPU usage or memory consumption or disk utilization rate there are abnormal conditions, if do not gone out It is now abnormal, then further the upper limit value of these status informations can be raised, such as adjustment CPU usage is 85%, memory Consumption is 90%, disk utilization rate is 60% etc., using upper limit value adjusted as performance bottleneck value, for reaching the property in next time Early warning can be issued when bottleneck value;If there is exception, then further the upper limit value of these status informations can be lowered, such as Adjustment CPU usage is 75%, memory consumption 80%, disk utilization rate are 45% etc., using upper limit value adjusted as property Energy bottleneck value, for issuing early warning when reaching the performance bottleneck value next time.
The present invention also provides a kind of computer readable storage medium, processing is stored on the computer readable storage medium The step of system, the processing system realizes the method for above-mentioned monitoring Java process when being executed by processor.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of server, which is characterized in that the server includes memory and the processor that connect with the memory, institute The processing system for being stored with and being run in memory on the processor is stated, when the processing system is executed by the processor Realize following steps:
After deployment broker program in the server is to server registration, receive start monitoring instruction when, opened based on this Begin to monitor and instructs and obtain the current Java process list of server using scheduled order;
Each Java process in the Java process list is filtered based on preset filtering rule, obtains Java process column The active Java process obtained after being filtered in table;
Scheduled multiple orders in shell script based on Linux acquire each active corresponding load information of Java process and void Quasi- machine information, according to the corresponding process number of active Java process each in the Java process list arrange each active Java into The load information and virtual machine information of journey are simultaneously reported to controller, with the IP address and process by the controller according to book server Number summarizes the load information and virtual machine information as major key, and stores into database, surveys for carrying out performance pressure.
2. server according to claim 1, which is characterized in that described to be based on preset filtering rule to the Java process Each Java process in list is filtered, and obtains the step of the active Java process obtained after filtering in the Java process list Suddenly, it specifically includes:
The process title of each Java process in the Java process list is obtained, based on scheduled key character to each process title First time filtering is carried out, non-traffic correlation Java process is filtered, business correlation Java process is obtained;
Analyze whether each business correlation Java process is Java process used in pressure survey process, and analyzes each business correlation Java Whether process is the Java process in silent status;
If having business correlation Java process is the Java process not used during pressure is surveyed, and the business correlation Java process is place In the Java process of silent status, then filters for second of progress, will press and not used during surveying and be in silent status Java process is filtered, and obtains active Java process.
3. server according to claim 1 or 2, which is characterized in that the load information includes CPU use information, interior Usage amount information, network traffic information and disk read-write information are deposited, the virtual machine information includes old age for memory garbage reclamation Information, youth are for memory garbage reclamation information and thread abnormal state information, when the processing system is executed by the processor, Also realize following steps:
Capacity planning information is generated based on current every load information and virtual machine information, and the capacity planning information is carried out Show or be sent to scheduled terminal.
4. server according to claim 3, which is characterized in that when the processing system is executed by the processor, also Realize following steps:Current every load information and the corresponding monitoring chart of virtual machine information are generated, current items are analyzed Whether load information and virtual machine information there is unusual condition, and are having load information or virtual machine information unusual condition occur When, carry out alarming processing.
5. it is a kind of monitor Java process method, which is characterized in that it is described monitoring Java process method include:
S1, after deployment broker program in the server is to server registration, receive start monitoring instruction when, based on should Start monitoring to instruct and obtain the current Java process list of server using scheduled order;
S2 is filtered each Java process in the Java process list based on preset filtering rule, obtain the Java into The active Java process obtained after being filtered in Cheng Liebiao;
S3, scheduled multiple orders in the shell script based on Linux acquire each active corresponding load information of Java process And virtual machine information, it is arranged according to the corresponding process number of active Java process each in the Java process list each active The load information and virtual machine information of Java process are simultaneously reported to controller, with the IP address by the controller according to book server And process number summarizes the load information and virtual machine information as major key, and stores into database, for carrying out performance pressure It surveys.
6. the method for monitoring Java process according to claim 5, which is characterized in that the step S2 is specifically included:
The process title of each Java process in the Java process list is obtained, based on scheduled key character to each process title First time filtering is carried out, non-traffic correlation Java process is filtered, business correlation Java process is obtained;
Analyze whether each business correlation Java process is Java process used in pressure survey process, and analyzes each business correlation Java Whether process is the Java process in silent status;
If having business correlation Java process is the Java process not used during pressure is surveyed, and the business correlation Java process is place In the Java process of silent status, then filters for second of progress, will press and not used during surveying and be in silent status Java process is filtered, and obtains active Java process.
7. the method for monitoring Java process according to claim 5 or 6, which is characterized in that the load information includes CPU Use information, memory usage amount information, network traffic information and disk read-write information, the virtual machine information include in old generation Garbage reclamation information, youth, which are deposited, for memory garbage reclamation information and thread abnormal state information, this method further includes:
Capacity planning information is generated based on current every load information and virtual machine information, and the capacity planning information is carried out Show or be sent to scheduled terminal.
8. the method for monitoring Java process according to claim 7, which is characterized in that this method further includes:
Generate current every load information and the corresponding monitoring chart of virtual machine information, analyze current every load information and Whether virtual machine information there is unusual condition, and when having load information or unusual condition occurs in virtual machine information, is alerted Processing.
9. the method for monitoring Java process according to claim 7, which is characterized in that acquire the scheduled life of load information Enable include dstat order, iostat order and free order, acquire virtual machine information order include jstat order and Jstack order.
10. a kind of computer readable storage medium, which is characterized in that be stored with processing system on the computer readable storage medium System realizes the side of the monitoring Java process as described in any one of claim 5 to 9 when the processing system is executed by processor The step of method.
CN201810550030.8A 2018-05-31 2018-05-31 Server, method for monitoring Java process and storage medium Active CN108874624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810550030.8A CN108874624B (en) 2018-05-31 2018-05-31 Server, method for monitoring Java process and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810550030.8A CN108874624B (en) 2018-05-31 2018-05-31 Server, method for monitoring Java process and storage medium

Publications (2)

Publication Number Publication Date
CN108874624A true CN108874624A (en) 2018-11-23
CN108874624B CN108874624B (en) 2023-03-28

Family

ID=64335163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810550030.8A Active CN108874624B (en) 2018-05-31 2018-05-31 Server, method for monitoring Java process and storage medium

Country Status (1)

Country Link
CN (1) CN108874624B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726082A (en) * 2019-01-03 2019-05-07 中国银行股份有限公司 A kind of early-warning processing method and system
CN109726078A (en) * 2018-12-28 2019-05-07 广东亿迅科技有限公司 A kind of method and device without intrusion JVM thread storehouse acquisition
CN109800124A (en) * 2018-12-15 2019-05-24 中国平安人寿保险股份有限公司 CPU usage monitoring method, device, electronic equipment and storage medium
CN109828885A (en) * 2018-12-15 2019-05-31 中国平安人寿保险股份有限公司 RocketMQ internal memory monitoring method, device, electronic equipment and storage medium
CN109840179A (en) * 2018-12-15 2019-06-04 中国平安人寿保险股份有限公司 RocketMQ Thread Count monitoring method, device, electronic equipment and storage medium
CN109918305A (en) * 2019-03-07 2019-06-21 北京奇艺世纪科技有限公司 A kind of online service monitoring system and method
CN110990173A (en) * 2019-12-18 2020-04-10 北京三快在线科技有限公司 Method, device, equipment and storage medium for calling service
CN111355795A (en) * 2020-02-26 2020-06-30 北京思特奇信息技术股份有限公司 Method, system, medium and equipment for remotely acquiring Linux host data
CN111625463A (en) * 2020-05-28 2020-09-04 北京达佳互联信息技术有限公司 Program state detection method and device
CN111625428A (en) * 2020-04-20 2020-09-04 中国建设银行股份有限公司 Method, system, device and storage medium for monitoring running state of Java application program
CN112486765A (en) * 2020-11-25 2021-03-12 山东中创软件商用中间件股份有限公司 Java application interface management method, system and device and computer readable storage medium
CN112948127A (en) * 2021-03-30 2021-06-11 北京滴普科技有限公司 Cloud platform container average load monitoring method, terminal device and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6457142B1 (en) * 1999-10-29 2002-09-24 Lucent Technologies Inc. Method and apparatus for target application program supervision
CN103440161A (en) * 2013-08-15 2013-12-11 北京京东尚科信息技术有限公司 Java virtual machine internal object monitoring method, device and system
CN106776212A (en) * 2016-12-09 2017-05-31 中电科华云信息技术有限公司 The supervisory systems and method of container clustered deploy(ment) multi-process application

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6457142B1 (en) * 1999-10-29 2002-09-24 Lucent Technologies Inc. Method and apparatus for target application program supervision
CN103440161A (en) * 2013-08-15 2013-12-11 北京京东尚科信息技术有限公司 Java virtual machine internal object monitoring method, device and system
CN106776212A (en) * 2016-12-09 2017-05-31 中电科华云信息技术有限公司 The supervisory systems and method of container clustered deploy(ment) multi-process application

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109840179A (en) * 2018-12-15 2019-06-04 中国平安人寿保险股份有限公司 RocketMQ Thread Count monitoring method, device, electronic equipment and storage medium
CN109828885B (en) * 2018-12-15 2023-02-07 中国平安人寿保险股份有限公司 RocketMQ memory monitoring method and device, electronic equipment and storage medium
CN109800124A (en) * 2018-12-15 2019-05-24 中国平安人寿保险股份有限公司 CPU usage monitoring method, device, electronic equipment and storage medium
CN109828885A (en) * 2018-12-15 2019-05-31 中国平安人寿保险股份有限公司 RocketMQ internal memory monitoring method, device, electronic equipment and storage medium
CN109726078B (en) * 2018-12-28 2022-12-06 广东亿迅科技有限公司 Method and device for non-invasive JVM thread stack acquisition
CN109726078A (en) * 2018-12-28 2019-05-07 广东亿迅科技有限公司 A kind of method and device without intrusion JVM thread storehouse acquisition
CN109726082A (en) * 2019-01-03 2019-05-07 中国银行股份有限公司 A kind of early-warning processing method and system
CN109918305A (en) * 2019-03-07 2019-06-21 北京奇艺世纪科技有限公司 A kind of online service monitoring system and method
CN110990173A (en) * 2019-12-18 2020-04-10 北京三快在线科技有限公司 Method, device, equipment and storage medium for calling service
CN111355795A (en) * 2020-02-26 2020-06-30 北京思特奇信息技术股份有限公司 Method, system, medium and equipment for remotely acquiring Linux host data
CN111355795B (en) * 2020-02-26 2023-03-21 北京思特奇信息技术股份有限公司 Method, system, medium and device for remotely acquiring Linux host data
CN111625428A (en) * 2020-04-20 2020-09-04 中国建设银行股份有限公司 Method, system, device and storage medium for monitoring running state of Java application program
CN111625463A (en) * 2020-05-28 2020-09-04 北京达佳互联信息技术有限公司 Program state detection method and device
CN111625463B (en) * 2020-05-28 2024-02-13 北京达佳互联信息技术有限公司 Program state detection method and device
CN112486765A (en) * 2020-11-25 2021-03-12 山东中创软件商用中间件股份有限公司 Java application interface management method, system and device and computer readable storage medium
CN112948127A (en) * 2021-03-30 2021-06-11 北京滴普科技有限公司 Cloud platform container average load monitoring method, terminal device and readable storage medium
CN112948127B (en) * 2021-03-30 2023-11-10 北京滴普科技有限公司 Cloud platform container average load monitoring method, terminal equipment and readable storage medium

Also Published As

Publication number Publication date
CN108874624B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN108874624A (en) Server, the method and storage medium for monitoring Java process
US8584098B2 (en) Component statistics for application profiling
CN109656779A (en) Internal memory monitoring method, device, terminal and storage medium
US20110138366A1 (en) Profiling Data Snapshots for Software Profilers
CN110232010A (en) A kind of alarm method, alarm server and monitoring server
CN108566314A (en) The acquisition methods and storage medium of status information under electronic device, cluster environment
CN106610892A (en) Memory leak detecting method and device
CN109460343A (en) System exception monitoring method, device, equipment and storage medium based on log
US20140208083A1 (en) Multi-threaded logging
CN108319543A (en) A kind of asynchronous processing method and its medium, system of computer log data
CN108874559A (en) electronic device, distributed system service link analysis method and storage medium
CN103399781B (en) Cloud Server and virtual machine management method thereof
CN110290190A (en) A kind of method, monitored device and monitoring server acquiring data
CN109933504B (en) Hard disk delay test method, device, terminal and storage medium
CN110515795A (en) A kind of monitoring method of big data component, device, electronic equipment
CN112214388A (en) Memory monitoring method, device, equipment and computer readable storage medium
CN106528293A (en) Database access method and apparatus
CN112202628A (en) WiFi module serial port protocol automatic test system and method
CN112527600A (en) Monitoring log processing method, device, equipment and storage medium
CN108427634A (en) Electronic device, the method for test and computer readable storage medium
CN116755891B (en) Event queue processing method and system based on multithreading
CN111399999A (en) Computer resource processing method and device, readable storage medium and computer equipment
CN109491822A (en) A kind of system reboot detection method, device, terminal and storage medium
CN107656849A (en) A kind of software system performance positioning problems method and device
CN113986537A (en) Middleware management method and device

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