WO2019169765A1 - 电子装置、集群环境下状态信息的获取方法、系统及存储介质 - Google Patents

电子装置、集群环境下状态信息的获取方法、系统及存储介质 Download PDF

Info

Publication number
WO2019169765A1
WO2019169765A1 PCT/CN2018/089459 CN2018089459W WO2019169765A1 WO 2019169765 A1 WO2019169765 A1 WO 2019169765A1 CN 2018089459 W CN2018089459 W CN 2018089459W WO 2019169765 A1 WO2019169765 A1 WO 2019169765A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
java virtual
server
virtual machine
state information
Prior art date
Application number
PCT/CN2018/089459
Other languages
English (en)
French (fr)
Inventor
王静
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019169765A1 publication Critical patent/WO2019169765A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • H04L43/045Processing captured monitoring data, e.g. for logfile generation for graphical visualisation of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/20Arrangements for monitoring or testing data switching networks the monitoring system or the monitored elements being virtualised, abstracted or software-defined entities, e.g. SDN or NFV
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/40Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Definitions

  • the present application relates to the field of communications technologies, and in particular, to an electronic device, a method, system, and storage medium for acquiring state information in a cluster environment.
  • the purpose of the present application is to provide an electronic device, a method, a system, and a storage medium for acquiring state information in a cluster environment, which are intended to conveniently obtain various state information through a client, thereby providing a powerful guarantee for quickly solving a sudden failure.
  • the present application provides an electronic device including a memory and a processor coupled to the memory, the memory storing a processing system operable on the processor, the processing The system implements the following steps when executed by the processor:
  • the connecting step after the client connects to one or more servers, displays each server, database, and/or JAVA virtual machine for the user to select on the client interface;
  • the displaying step returns the obtained status information of the server, the status information of the database, and/or the status information of the JAVA virtual machine to the client interface for display.
  • the present application further provides a method for obtaining state information in a cluster environment, where the method for obtaining state information in the cluster environment includes:
  • the present application further provides a system for acquiring state information in a cluster environment, where the system for obtaining state information in the cluster environment includes:
  • a display module configured to display, on the client interface, each server, database, and/or JAVA virtual machine selected by the user after the client connects to one or more servers;
  • An obtaining module configured to determine a server, a database, and/or a JAVA virtual machine selected by the user on the client interface, and according to the selected database and/or the JAVA virtual machine, calling a predetermined corresponding tool, and calling the predetermined corresponding response based on the selected server Command, based on the tool and/or command, obtaining status information of the server, status information of the database, and/or status information of the JAVA virtual machine;
  • the returning module is configured to return the acquired state information of the server, the state information of the database, and/or the state information of the JAVA virtual machine to the client interface for display.
  • the present application further provides a computer readable storage medium having a processing system stored thereon, the processing system being executed by a processor to implement the steps of the method for acquiring state information in the cluster environment.
  • the utility model has the beneficial effects that: the application uses one client to connect one or more servers at a time, and the client sends a command to the server by calling a LINUX command and/or a JAVA tool, and receives the status information and database of the returned server of the server.
  • the status information and/or the status information of the JAVA virtual machine are displayed.
  • the status information of the server, the status information of the database, and/or the status information of the JAVA virtual machine can be quickly and comprehensively monitored, and the operation is simple and fast. Sudden failure provides a strong guarantee.
  • FIG. 1 is a schematic diagram of an optional application environment of each embodiment of the present application.
  • FIG. 2 is a schematic flowchart of an embodiment of a method for acquiring state information in a cluster environment of the present application.
  • FIG. 1 is a schematic diagram of an application environment of a preferred embodiment of a method for acquiring state information in a cluster environment of the present application.
  • the application environment diagram includes an electronic device 1 and one or more servers.
  • the electronic device 1 can perform data interaction with one or more servers through a suitable technology such as a network or a near field communication technology, and a database and/or a JAVA virtual machine are installed in each server.
  • the electronic device 1 is an apparatus capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance.
  • the electronic device 1 may be a computer, a single network server, a server group composed of multiple network servers, or a cloud-based cloud composed of a large number of hosts or network servers, where cloud computing is a type of distributed computing.
  • a super virtual computer consisting of a group of loosely coupled computers.
  • the electronic device 1 may include, but is not limited to, a memory 11 communicably connected to each other through a system bus, a processor 12, and a network interface 13, and the memory 11 stores a processing system operable on the processor 12. It should be noted that FIG. 1 only shows the electronic device 1 having the components 11-13, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the memory 11 includes a memory and at least one type of readable storage medium.
  • the memory provides a cache for the operation of the electronic device 1;
  • the readable storage medium may be, for example, a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM).
  • a non-volatile storage medium such as a read only memory (ROM), an electrically erasable programmable read only memory (EEPROM), a programmable read only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, or the like.
  • the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1; in other embodiments, the non-volatile storage medium may also be external to the electronic device 1.
  • a storage device such as a plug-in hard disk equipped with an electronic device 1, a smart memory card (SMC), a Secure Digital (SD) card, a flash card, or the like.
  • the readable storage medium of the memory 11 is generally used to store an operating system and various types of application software installed in the electronic device 1, such as program code for storing a processing system in an embodiment of the present application. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the electronic device 1, such as performing control and processing associated with data interaction or communication with the one or more servers.
  • the processor 12 is configured to run program code or processing data stored in the memory 11, such as a running system or the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 1 and other electronic devices.
  • the network interface 13 is mainly used to connect the electronic device 1 with one or more servers, and establish a data transmission channel and a communication connection between the electronic device 1 and one or more servers.
  • the processing system is stored in the memory 11 and includes at least one computer readable instruction stored in the memory 11, the at least one computer readable instruction being executable by the processor 12 to implement the methods of various embodiments of the present application;
  • the at least one computer readable instruction can be classified into different logic modules depending on the functions implemented by its various parts.
  • the connecting step after the client connects to one or more servers, displays each server, database, and/or JAVA virtual machine for the user to select on the client interface;
  • the client is installed in the electronic device 1. Before the client connects with one or more servers, the login information of one or more servers is input on the login interface of the client, and the login information includes the server IP address, port, and login. User name, login password, etc. After logging in, the client connects to one or more servers and displays the server, database, and/or JAVA virtual machine available to the user on the client interface to obtain the selected server, database, and/or JAVA virtual Status information of the machine.
  • the user may select to view status information of a single server, database, or JAVA virtual machine, or view status information of multiple servers, databases, and/or JAVA virtual machines.
  • the client invokes a predetermined LINUX command and sends the LINUX command to the server.
  • the receiving server returns status information of the server based on the predetermined LINUX command, wherein the status information of the server includes at least CPU information, network card information, disk information, and memory consumption information.
  • the predetermined LINUX command includes at least an iostat command, an iotop command, and a pidstat command, wherein the iostat command can be used to check CPU usage, network card information, disk usage, and the like.
  • the iotop command and the pidstat command reflect the server's process-level statistics.
  • the iotop command is a tool for monitoring disk IO usage. It can monitor which program (such as QQ, WeChat) uses disk IO.
  • the Pidstat command is mainly used to monitor the situation in which all or a specified process occupies system resources, such as CPU information, memory consumption, device IO, task switching, and threads.
  • the client receives the status information returned based on the above LINUX command, analyzes and acquires the CPU, network card, disk IO, and memory consumption. If the database is selected, the client calls the Java connection tool JDBC (Java DataBase Connectivity) driver package to connect to the database to determine whether the database can provide normal services. After successfully connecting to the database, the database is sent to the database.
  • the SESSION information command receives the number of applications connected to the database returned according to the SESSION information command.
  • the status information of the database includes at least the number of applications that the database can connect normally and is connected to the database.
  • the monitored database can be one or more, to achieve integration of mainstream databases, such as: ORACLE database, MYSQL database and PG database.
  • the client invokes a predetermined JAVA virtual machine tool to obtain status information of the JAVA virtual machine.
  • the status information of the JAVA virtual machine includes at least a program currently running in the JAVA virtual machine, and a JAVA virtual machine.
  • the parameters and running data, running data including memory data, garbage collection data, load data, JIT compiled data, thread lock data and so on.
  • the predetermined JAVA virtual machine tool includes at least: a jstat virtual machine statistical information monitoring tool for real-time command line monitoring of resources and performance of the Java application by using instructions built into the JAVA virtual machine, including Monitoring the memory and garbage collection status of the Heap size virtual machine; jps virtual machine process status tool to display the current system java process status and its id number; jinfo Java configuration information tool for outputting JAVA system parameters and command line Parameters; jmap Java memory imaging tool, a tool for outputting all in-memory objects; jstack Java stack trace tool: used to print the Java stack information of a given java process ID or core file or remote debugging service.
  • a jstat virtual machine statistical information monitoring tool for real-time command line monitoring of resources and performance of the Java application by using instructions built into the JAVA virtual machine, including Monitoring the memory and garbage collection status of the Heap size virtual machine
  • jps virtual machine process status tool to display the current system java process status and its id number
  • the displaying step returns the obtained status information of the server, the status information of the database, and/or the status information of the JAVA virtual machine to the client interface for display.
  • the client obtains the state information of the server required by the user, the state information of the database, and/or the state information of the JAVA virtual machine by calling a predetermined tool and/or command, and finally the state information of the server.
  • the status information of the database and/or the status information of the JAVA virtual machine are displayed on the client interface for analysis by the user for performance measurement.
  • the status information of the server, the status information of the database and/or can be comprehensively monitored by using a client. Or status information of the JAVA virtual machine.
  • the step of displaying specifically includes: converting status information of the server, status information of the database, and/or status information of the JAVA virtual machine into a graphical form, respectively, and displaying the graphic on the client interface.
  • the graphical form includes a plurality of forms, and may be a single graphical form, or a combination of multiple graphics, including a pie chart, a line chart, a column chart, etc., which can more clearly display the server.
  • Status information, status information of the database, and/or status information of the JAVA virtual machine provide users with an intuitive and effective real-time analysis basis, which provides a powerful guarantee for quickly solving sudden failures.
  • the state information of the graphical server, the state information of the database, and/or the state information of the JAVA virtual machine may be displayed in different colors on the client interface to further provide an intuitive and effective real-time analysis basis.
  • the performance measurement according to the state information of the graphical servers displayed on the client interface, the state information of the database, and/or the state information of the JAVA virtual machine, whether the corresponding preset upper limit value is reached, and When the corresponding preset upper limit value is reached, it is analyzed whether an abnormal situation currently occurs;
  • the upper limit value is adjusted according to the analysis result, and the adjusted upper limit value is used as a performance bottleneck value for providing an early warning when the performance bottleneck value is reached next time.
  • the state information of each server, the state information of the database, and/or the upper limit value of the state information of the JAVA virtual machine may be pre-determined, and the problem is determined by the scalability and performance of the performance pressure measurement system. And optimize system performance, by knowing the server, database, JAVA virtual machine tolerance, in order to better configure the server, database, JAVA virtual machine. For example, for the status information of the server, set the CPU usage rate to 80%, the memory consumption to 85%, the disk usage rate to 50%, etc., when the CPU usage reaches 80%, or the memory consumption reaches 85%, or the disk usage reaches 50%. %, analyze and analyze whether there is an abnormal situation due to CPU usage or memory consumption or disk usage.
  • the upper limit of these status information can be further increased, for example, the CPU usage is adjusted to 85%.
  • the memory consumption is 90%
  • the disk usage rate is 60%, etc.
  • the adjusted upper limit value is used as the performance bottleneck value to provide an early warning when the performance bottleneck value is reached next time; if an abnormality occurs, the status information may be further
  • the upper limit value is lowered, for example, the CPU usage is 75%, the memory consumption is 80%, the disk usage is 45%, etc., and the adjusted upper limit is used as the performance bottleneck value for the performance bottleneck value to be reached next time. An early warning is issued.
  • the present application uses a client to connect one or more servers at a time, and the client sends a command to the server by calling a LINUX command and/or a JAVA tool, and receives the status information and database of the returned server of the server.
  • the status information and/or the status information of the JAVA virtual machine are displayed.
  • the status information of the server, the status information of the database, and/or the status information of the JAVA virtual machine can be quickly and comprehensively monitored, and the operation is simple and fast. Sudden failure provides a strong guarantee.
  • FIG. 2 is a schematic flowchart of a method for acquiring state information in a cluster environment according to an embodiment of the present invention.
  • the method for obtaining state information in the cluster environment includes the following steps:
  • Step S1 after the client connects to one or more servers, display each server, database, and/or JAVA virtual machine selected by the user on the client interface;
  • the client is installed in the electronic device 1. Before the client connects with one or more servers, the login information of one or more servers is input on the login interface of the client, and the login information includes the server IP address, port, and login. User name, login password, etc. After logging in, the client connects to one or more servers and displays the server, database, and/or JAVA virtual machine available to the user on the client interface to obtain the selected server, database, and/or JAVA virtual Status information of the machine.
  • Step S2 determining a server, a database, and/or a JAVA virtual machine selected by the user on the client interface, calling a predetermined corresponding tool based on the selected database and/or the JAVA virtual machine, and calling a predetermined corresponding command based on the selected server.
  • the user may select to view status information of a single server, database, or JAVA virtual machine, or view status information of multiple servers, databases, and/or JAVA virtual machines.
  • the client invokes a predetermined LINUX command and sends the LINUX command to the server.
  • the receiving server returns status information of the server based on the predetermined LINUX command, wherein the status information of the server includes at least CPU information, network card information, disk information, and memory consumption information.
  • the predetermined LINUX command includes at least an iostat command, an iotop command, and a pidstat command, wherein the iostat command can be used to check CPU usage, network card information, disk usage, and the like.
  • the iotop command and the pidstat command reflect the server's process-level statistics.
  • the iotop command is a tool for monitoring disk IO usage. It can monitor which program (such as QQ, WeChat) uses disk IO.
  • the Pidstat command is mainly used to monitor the situation in which all or a specified process occupies system resources, such as CPU information, memory consumption, device IO, task switching, and threads.
  • the client receives the status information returned based on the above LINUX command, analyzes and acquires the CPU, network card, disk IO, and memory consumption.
  • the client calls the Java Connection Tool (JDBC) to connect the database to determine whether the database can provide normal services.
  • JDBC Java Connection Tool
  • the SESSION information command receives the number of applications connected to the database returned based on the SESSION information command.
  • the status information of the database includes at least the number of applications that the database can connect normally and is connected to the database.
  • the monitored database can be one or more, to achieve integration of mainstream databases, such as: ORACLE database, MYSQL database and PG database.
  • the client invokes a predetermined JAVA virtual machine tool to obtain status information of the JAVA virtual machine.
  • the status information of the JAVA virtual machine includes at least a program currently running in the JAVA virtual machine, and a JAVA virtual machine.
  • the parameters and running data, running data including memory data, garbage collection data, load data, JIT compiled data, thread lock data and so on.
  • the predetermined JAVA virtual machine tool includes at least: a jstat virtual machine statistical information monitoring tool for real-time command line monitoring of resources and performance of the Java application by using instructions built into the JAVA virtual machine, including Monitoring the memory and garbage collection status of the Heap size virtual machine; jps virtual machine process status tool to display the current system java process status and its id number; jinfo Java configuration information tool for outputting JAVA system parameters and command line Parameters; jmap Java memory imaging tool, a tool for outputting all in-memory objects; jstack Java stack trace tool: used to print the Java stack information of a given java process ID or core file or remote debugging service.
  • a jstat virtual machine statistical information monitoring tool for real-time command line monitoring of resources and performance of the Java application by using instructions built into the JAVA virtual machine, including Monitoring the memory and garbage collection status of the Heap size virtual machine
  • jps virtual machine process status tool to display the current system java process status and its id number
  • step S3 the acquired state information of the server, the state information of the database, and/or the state information of the JAVA virtual machine are returned to the client interface for display.
  • the client obtains the state information of the server required by the user, the state information of the database, and/or the state information of the JAVA virtual machine by calling a predetermined tool and/or command, and finally the state information of the server.
  • the status information of the database and/or the status information of the JAVA virtual machine are displayed on the client interface for analysis by the user for performance measurement.
  • the status information of the server, the status information of the database and/or can be comprehensively monitored by using a client. Or status information of the JAVA virtual machine.
  • the displaying step specifically includes: converting status information of the server, status information of the database, and/or status information of the JAVA virtual machine into a graphical form, respectively, and displaying the graphic on the client interface.
  • the graphical form includes a plurality of forms, and may be a single graphical form, or a combination of multiple graphics, including a pie chart, a line chart, a column chart, etc., which can more clearly display the server.
  • Status information, status information of the database, and/or status information of the JAVA virtual machine provide users with an intuitive and effective real-time analysis basis, which provides a powerful guarantee for quickly solving sudden failures.
  • the state information of the graphical server, the state information of the database, and/or the state information of the JAVA virtual machine may be displayed in different colors on the client interface to further provide an intuitive and effective real-time analysis basis.
  • the method further includes:
  • the performance measurement according to the state information of the graphical servers displayed on the client interface, the state information of the database, and/or the state information of the JAVA virtual machine, whether the corresponding preset upper limit value is reached, and When the corresponding preset upper limit value is reached, it is analyzed whether an abnormal situation currently occurs;
  • the upper limit value is adjusted according to the analysis result, and the adjusted upper limit value is used as a performance bottleneck value for providing an early warning when the performance bottleneck value is reached next time.
  • the state information of each server, the state information of the database, and/or the upper limit value of the state information of the JAVA virtual machine may be pre-determined, and the problem is determined by the scalability and performance of the performance pressure measurement system. And optimize system performance, by knowing the server, database, JAVA virtual machine tolerance, in order to better configure the server, database, JAVA virtual machine. For example, for the status information of the server, set the CPU usage rate to 80%, the memory consumption to 85%, the disk usage rate to 50%, etc., when the CPU usage reaches 80%, or the memory consumption reaches 85%, or the disk usage reaches 50%. %, analyze and analyze whether there is an abnormal situation due to CPU usage or memory consumption or disk usage.
  • the upper limit of these status information can be further increased, for example, the CPU usage is adjusted to 85%.
  • the memory consumption is 90%
  • the disk usage rate is 60%, etc.
  • the adjusted upper limit value is used as the performance bottleneck value to provide an early warning when the performance bottleneck value is reached next time; if an abnormality occurs, the status information may be further
  • the upper limit value is lowered, for example, the CPU usage is 75%, the memory consumption is 80%, the disk usage is 45%, etc., and the adjusted upper limit is used as the performance bottleneck value for the performance bottleneck value to be reached next time. An early warning is issued.
  • the present application uses a client to connect one or more servers at a time, and the client sends a command to the server by calling a LINUX command and/or a JAVA tool, and receives the status information and database of the returned server of the server.
  • the status information and/or the status information of the JAVA virtual machine are displayed.
  • the status information of the server, the status information of the database, and/or the status information of the JAVA virtual machine can be quickly and comprehensively monitored, and the operation is simple and fast. Sudden failure provides a strong guarantee.
  • the present application further provides a computer readable storage medium having a processing system stored thereon, the processing system being executed by a processor to implement the steps of the method for acquiring state information in the cluster environment.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Environmental & Geological Engineering (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种电子装置、集群环境下状态信息的获取方法、系统及存储介质,能够通过客户端便捷地获取各项状态信息。该方法包括:在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机(S1);确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息(S2);将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示(S3)。

Description

电子装置、集群环境下状态信息的获取方法、系统及存储介质
优先权申明
本申请基于巴黎公约申明享有2017年03月06日递交的申请号为CN201810183495.4、名称为“电子装置、集群环境下状态信息的获取方法及存储介质”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种电子装置、集群环境下状态信息的获取方法、系统及存储介质。
背景技术
目前,运营、测试或开发人员在进行性能压测时,需要获得数据库状态信息、服务器状态信息和/或JAVA虚拟机(JVM)状态信息,例如CPU、网卡、内存、磁盘、数据库状态、线程等的运行情况,此时通常需要登录到相应的服务器,通过命令来逐个查询,获得的信息十分零散,操作较繁琐,无法快速获得全面的状态信息,导致在排查、分析应用问题时耗时耗力,不能快速应对、解决突发故障。
发明内容
本申请的目的在于提供一种电子装置、集群环境下状态信息的获取方法、系统及存储介质,旨在通过客户端便捷地获取各项状态信息,为快速解决突发故障提供有力保障。
为实现上述目的,本申请提供一种电子装置,所述电子装置包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的处理系统,所述处理系统被所述处理器执行时实现如下步骤:
连接步骤,在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
获取步骤,确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
展示步骤,将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
为实现上述目的,本申请还提供一种集群环境下状态信息的获取方法,所述集群环境下状态信息的获取方法包括:
S1,在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
S2,确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
S3,将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
为实现上述目的,本申请还提供一种集群环境下状态信息的获取系统,所述集群环境下状态信息的获取系统包括:
显示模块,用于在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
获取模块,用于确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服 务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
返回模块,用于将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现上述的集群环境下状态信息的获取方法的步骤。
本申请的有益效果是:本申请使用一个客户端一次性连接一个或者多个服务器,客户端通过调用LINUX命令和/或JAVA工具,向服务器发送命令,接收服务器的返回的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息进行展示,使用一个客户端就能够快速、全面监测服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,操作简便,为快速解决突发故障提供有力保障。
附图说明
图1为本申请各个实施例一可选的应用环境示意图;
图2为本申请集群环境下状态信息的获取方法一实施例的流程示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特 征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
参阅图1所示,是本申请集群环境下状态信息的获取方法的较佳实施例的应用环境示意图。该应用环境示意图包括电子装置1及一个或多个服务器。电子装置1可以通过网络、近场通信技术等适合的技术与一个或多个服务器进行数据交互,各个服务器中安装有数据库和/或JAVA虚拟机。
电子装置1是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。所述电子装置1可以是计算机、也可以是单个网络服务器、多个网络服务器组成的服务器组或者基于云计算的由大量主机或者网络服务器构成的云,其中云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。
在本实施例中,电子装置1可包括,但不仅限于,可通过系统总线相互通信连接的存储器11、处理器12、网络接口13,存储器11存储有可在处理器12上运行的处理系统。需要指出的是,图1仅示出了具有组件11-13的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,存储器11包括内存及至少一种类型的可读存储介质。内存为电子装置1的运行提供缓存;可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等的非易失性存储介质。在一些实施例中,可读存储介质可以是电子装置1的内 部存储单元,例如该电子装置1的硬盘;在另一些实施例中,该非易失性存储介质也可以是电子装置1的外部存储设备,例如电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。本实施例中,存储器11的可读存储介质通常用于存储安装于电子装置1的操作系统和各类应用软件,例如存储本申请一实施例中的处理系统的程序代码等。此外,存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片。该处理器12通常用于控制所述电子装置1的总体操作,例如执行与所述一个或多个服务器进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行处统理系等。
所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述电子装置1与其他电子设备之间建立通信连接。本实施例中,网络接口13主要用于将电子装置1与一个或多个服务器相连,在电子装置1与一个或多个服务器之间建立数据传输通道和通信连接。
所述处理系统存储在存储器11中,包括至少一个存储在存储器11中的计算机可读指令,该至少一个计算机可读指令可被处理器器12执行,以实现本申请各实施例的方法;以及,该至少一个计算机可读指令依据其各部分所实现的功能不同,可被划为不同的逻辑模块。
在一实施例中,上述处理系统被所述处理器12执行时实现如下步骤:
连接步骤,在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
其中,客户端安装在电子装置1中,在客户端与一个或多个服务器连接 之前,在客户端的登录界面上输入一个或多个服务器的登录信息进行登录,登录信息包括服务器IP、端口、登录用户名、登录密码等。登录后,客户端与一个或多个服务器连接,并在客户端界面上显示可供用户勾选的服务器、数据库和/或JAVA虚拟机,以获取所勾选的服务器、数据库和/或JAVA虚拟机的状态信息。
获取步骤,确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
本实施例中,用户可以选择查看单个的服务器、数据库或JAVA虚拟机的状态信息,也可以查看多个服务器、数据库和/或JAVA虚拟机的状态信息。在确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机之后,在一实施例中,若所选择的是服务器,则客户端调用预定的LINUX命令并发送该LINUX命令至服务器,接收服务器基于该预定的LINUX命令返回的服务器的状态信息,其中,所述服务器的状态信息至少包括CPU信息、网卡信息、磁盘信息以及内存消耗信息。
在一实施例中,预定的LINUX命令至少包括iostat命令、iotop命令、pidstat命令,其中,通过iostat命令可以查看CPU使用情况、网卡信息、磁盘使用情况等。iotop命令、pidstat命令反映服务器的进程级统计,其中,iotop命令是一个用来监视磁盘IO使用状况的工具,可监测到哪一个程序(例如QQ、微信)使用的磁盘IO的情况。Pidstat命令主要用于监控全部或指定进程占用系统资源的情况,如CPU信息、内存消耗、设备IO、任务切换、线程等。客户端接收基于上述的LINUX命令返回的状态信息,分析并获取CPU、网卡、磁盘IO以及内存消耗等情况。若所选择的是数据库,则客户端调用java连接工具JDBC(Java DataBase Connectivity,java数据库连接) 驱动包连接该数据库,以判断数据库是否能够提供正常服务,在成功连接该数据库后,向该数据库发送SESSION信息命令,接收基于该SESSION信息命令返回的与数据库连接的应用的数量,数据库的状态信息至少包括数据库是否可以正常连接、与数据库连接的应用的数量。其中,监测的数据库可以是一个或多个,实现主流数据库的集成,例如:ORACLE数据库、MYSQL数据库及PG数据库等。
若所选择的是JAVA虚拟机,则客户端调用预定的JAVA虚拟机工具获取JAVA虚拟机的状态信息,所述JAVA虚拟机的状态信息至少包括当前在JAVA虚拟机中运行的程序、JAVA虚拟机的各项参数及运行数据,运行数据包括内存数据、垃圾收集数据、装载数据、JIT编译数据、线程锁数据等等。
在一实施例中,预定的JAVA虚拟机工具至少包括:jstat虚拟机统计信息监视工具,用以利用JAVA虚拟机内建的指令对Java应用程序的资源和性能进行实时的命令行的监控,包括了对Heap size虚拟机内存和垃圾回收状况的监控;jps虚拟机进程状况工具,用以显示当前系统的java进程情况及其id号;jinfo Java配置信息工具,用于输出JAVA系统参数及命令行参数;jmap Java内存映像工具,用以输出所有内存中对象的工具;jstack Java堆栈跟踪工具:用以打印出给定的java进程ID或core file或远程调试服务的Java堆栈信息。
展示步骤,将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
本实施例中,客户端通过调用预定的工具和/或命令,一次性获取到用户所需的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,最终将服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息展示在客户端界面上,供用户进行分析以进行性能压测,使用一个客 户端就能够全面监测服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
在一优选的实施例中,该展示步骤,具体包括:将服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分别转化为图形化的形式,在客户端界面上展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
其中,该图形化的形式包括多种,可以是单一的图形化形式,也可以是多种图形的结合,该图形包括饼图、折线图、柱形图等等,能够更加直观地展示服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,为用户提供直观有效实时的分析依据,为快速解决突发的故障提供有力保障。进一步地,可以在客户端界面上以不同的颜色展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,进一步提供直观有效实时的分析依据。
在一优选的实施例中,所述处理系统被所述处理器执行时,还实现如下步骤:
在进行性能压测时,根据客户端界面上展示的各项图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分析是否达到对应的预先设置的上限值,并在达到对应的预先设置的上限值时,分析当前是否出现异常情况;
根据分析结果调整所述上限值,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警。
本实施例中,可以预先制定每一项服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息的上限值,通过性能压测度量系统的可扩展性和性能,确定问题所在以及优化系统性能,通过获知服务器、数据库、JAVA虚拟机的承受限度,以便更好地配置服务器、数据库、JAVA虚拟机。 例如对于服务器的状态信息,设置CPU使用率为80%、内存消耗为85%、磁盘使用率为50%等,当CPU使用率达到80%,或者内存消耗达到85%,或者磁盘使用率达到50%时,分析分析当前是否由于CPU使用率或者内存消耗或者磁盘使用率而出现异常情况,如果没有出现异常,则可进一步对这些状态信息的上限值进行上调,例如调整CPU使用率为85%、内存消耗为90%、磁盘使用率为60%等,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警;如果出现异常,则可进一步对这些状态信息的上限值进行下调,例如调整CPU使用率为75%、内存消耗为80%、磁盘使用率为45%等,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警。
与现有技术相比,本申请使用一个客户端一次性连接一个或者多个服务器,客户端通过调用LINUX命令和/或JAVA工具,向服务器发送命令,接收服务器的返回的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息进行展示,使用一个客户端就能够快速、全面监测服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,操作简便,为快速解决突发故障提供有力保障。
如图2所示,图2为本申请集群环境下状态信息的获取方法一实施例的流程示意图,该集群环境下状态信息的获取方法包括以下步骤:
步骤S1,在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
其中,客户端安装在电子装置1中,在客户端与一个或多个服务器连接之前,在客户端的登录界面上输入一个或多个服务器的登录信息进行登录,登录信息包括服务器IP、端口、登录用户名、登录密码等。登录后,客户端与一个或多个服务器连接,并在客户端界面上显示可供用户勾选的服务器、 数据库和/或JAVA虚拟机,以获取所勾选的服务器、数据库和/或JAVA虚拟机的状态信息。
步骤S2,确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
本实施例中,用户可以选择查看单个的服务器、数据库或JAVA虚拟机的状态信息,也可以查看多个服务器、数据库和/或JAVA虚拟机的状态信息。在确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机之后,在一实施例中,若所选择的是服务器,则客户端调用预定的LINUX命令并发送该LINUX命令至服务器,接收服务器基于该预定的LINUX命令返回的服务器的状态信息,其中,所述服务器的状态信息至少包括CPU信息、网卡信息、磁盘信息以及内存消耗信息。
在一实施例中,预定的LINUX命令至少包括iostat命令、iotop命令、pidstat命令,其中,通过iostat命令可以查看CPU使用情况、网卡信息、磁盘使用情况等。iotop命令、pidstat命令反映服务器的进程级统计,其中,iotop命令是一个用来监视磁盘IO使用状况的工具,可监测到哪一个程序(例如QQ、微信)使用的磁盘IO的情况。Pidstat命令主要用于监控全部或指定进程占用系统资源的情况,如CPU信息、内存消耗、设备IO、任务切换、线程等。客户端接收基于上述的LINUX命令返回的状态信息,分析并获取CPU、网卡、磁盘IO以及内存消耗等情况。
若所选择的是数据库,则客户端调用java连接工具JDBC(Java DataBase Connectivity,java数据库连接)驱动包连接该数据库,以判断数据库是否能够提供正常服务,在成功连接该数据库后,向该数据库发送SESSION信息命令,接收基于该SESSION信息命令返回的与数据库连接的应用的数量, 数据库的状态信息至少包括数据库是否可以正常连接、与数据库连接的应用的数量。其中,监测的数据库可以是一个或多个,实现主流数据库的集成,例如:ORACLE数据库、MYSQL数据库及PG数据库等。
若所选择的是JAVA虚拟机,则客户端调用预定的JAVA虚拟机工具获取JAVA虚拟机的状态信息,所述JAVA虚拟机的状态信息至少包括当前在JAVA虚拟机中运行的程序、JAVA虚拟机的各项参数及运行数据,运行数据包括内存数据、垃圾收集数据、装载数据、JIT编译数据、线程锁数据等等。
在一实施例中,预定的JAVA虚拟机工具至少包括:jstat虚拟机统计信息监视工具,用以利用JAVA虚拟机内建的指令对Java应用程序的资源和性能进行实时的命令行的监控,包括了对Heap size虚拟机内存和垃圾回收状况的监控;jps虚拟机进程状况工具,用以显示当前系统的java进程情况及其id号;jinfo Java配置信息工具,用于输出JAVA系统参数及命令行参数;jmap Java内存映像工具,用以输出所有内存中对象的工具;jstack Java堆栈跟踪工具:用以打印出给定的java进程ID或core file或远程调试服务的Java堆栈信息。
步骤S3,将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
本实施例中,客户端通过调用预定的工具和/或命令,一次性获取到用户所需的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,最终将服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息展示在客户端界面上,供用户进行分析以进行性能压测,使用一个客户端就能够全面监测服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
在一优选的实施例中,该展示步骤,具体包括:将服务器的状态信息、 数据库的状态信息和/或JAVA虚拟机的状态信息分别转化为图形化的形式,在客户端界面上展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
其中,该图形化的形式包括多种,可以是单一的图形化形式,也可以是多种图形的结合,该图形包括饼图、折线图、柱形图等等,能够更加直观地展示服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,为用户提供直观有效实时的分析依据,为快速解决突发的故障提供有力保障。进一步地,可以在客户端界面上以不同的颜色展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,进一步提供直观有效实时的分析依据。
在一优选的实施例中,在上述实施例的基础上,所述步骤S3之后,还包括:
在进行性能压测时,根据客户端界面上展示的各项图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分析是否达到对应的预先设置的上限值,并在达到对应的预先设置的上限值时,分析当前是否出现异常情况;
根据分析结果调整所述上限值,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警。
本实施例中,可以预先制定每一项服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息的上限值,通过性能压测度量系统的可扩展性和性能,确定问题所在以及优化系统性能,通过获知服务器、数据库、JAVA虚拟机的承受限度,以便更好地配置服务器、数据库、JAVA虚拟机。例如对于服务器的状态信息,设置CPU使用率为80%、内存消耗为85%、磁盘使用率为50%等,当CPU使用率达到80%,或者内存消耗达到85%,或者磁盘使用率达到50%时,分析分析当前是否由于CPU使用率或者内存 消耗或者磁盘使用率而出现异常情况,如果没有出现异常,则可进一步对这些状态信息的上限值进行上调,例如调整CPU使用率为85%、内存消耗为90%、磁盘使用率为60%等,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警;如果出现异常,则可进一步对这些状态信息的上限值进行下调,例如调整CPU使用率为75%、内存消耗为80%、磁盘使用率为45%等,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警。
与现有技术相比,本申请使用一个客户端一次性连接一个或者多个服务器,客户端通过调用LINUX命令和/或JAVA工具,向服务器发送命令,接收服务器的返回的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息进行展示,使用一个客户端就能够快速、全面监测服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息,操作简便,为快速解决突发故障提供有力保障。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现上述的集群环境下状态信息的获取方法的步骤。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是 利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种电子装置,其特征在于,所述电子装置包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的处理系统,所述处理系统被所述处理器执行时实现如下步骤:
    连接步骤,在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
    获取步骤,确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
    展示步骤,将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
  2. 根据权利要求1所述的电子装置,其特征在于,所述获取步骤,具体包括:
    若所选择的是服务器,则调用预定的LINUX命令并发送该LINUX命令至服务器,接收服务器基于该预定的LINUX命令返回的服务器的状态信息,所述服务器的状态信息至少包括CPU信息、网卡信息、磁盘信息以及内存消耗信息;
    若所选择的是数据库,则调用JDBC驱动包连接该数据库,在成功连接该数据库后,向该数据库发送SESSION信息命令,接收基于该SESSION信息命令返回的与数据库连接的应用的数量;
    若所选择的是JAVA虚拟机,则调用预定的JAVA虚拟机工具获取JAVA虚拟机的状态信息,所述JAVA虚拟机的状态信息至少包括当前在JAVA虚拟机中运行的程序、JAVA虚拟机的各项参数及运行数据。
  3. 根据权利要求1或2所述的电子装置,其特征在于,所述展示步骤, 具体包括:
    将服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分别转化为图形化的形式,在客户端界面上展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
  4. 根据权利要求3所述的电子装置,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    在进行性能压测时,根据客户端界面上展示的各项图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分析是否达到对应的预先设置的上限值,并在达到对应的预先设置的上限值时,分析当前是否出现异常情况;
    根据分析结果调整所述上限值,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警。
  5. 根据权利要求3所述的电子装置,其特征在于,所述展示步骤,进一步包括:在客户端界面上以不同的颜色展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
  6. 一种集群环境下状态信息的获取方法,其特征在于,所述集群环境下状态信息的获取方法包括:
    S1,在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
    S2,确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
    S3,将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
  7. 根据权利要求6所述的集群环境下状态信息的获取方法,其特征在于,所述步骤S2,具体包括:
    若所选择的是服务器,则调用预定的LINUX命令并发送该LINUX命令至服务器,接收服务器基于该预定的LINUX命令返回的服务器的状态信息,所述服务器的状态信息至少包括CPU信息、网卡信息、磁盘IO信息以及内存消耗信息;
    若所选择的是数据库,则调用JDBC驱动包连接该数据库,在成功连接该数据库后,向该数据库发送SESSION信息命令,接收基于该SESSION信息命令返回的与数据库连接的应用的数量;
    若所选择的是JAVA虚拟机,则调用预定的JAVA虚拟机工具获取JAVA虚拟机的状态信息,所述JAVA虚拟机的状态信息至少包括当前在JAVA虚拟机中运行的程序、JAVA虚拟机的各项参数及运行数据。
  8. 根据权利要求6或7所述的集群环境下状态信息的获取方法,其特征在于,所述步骤S3,具体包括:
    将服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分别转化为图形化的形式,在客户端界面上展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
  9. 根据权利要求8所述的集群环境下状态信息的获取方法,其特征在于,所述步骤S3之后,还包括:
    在进行性能压测时,根据客户端界面上展示的各项图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分析是否达到对应的预先设置的上限值,并在达到对应的预先设置的上限值时,分析当前是否出现异常情况;
    根据分析结果调整所述上限值,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警。
  10. 根据权利要求8所述的集群环境下状态信息的获取方法,其特征在于,所述步骤S3,进一步包括:在客户端界面上以不同的颜色展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
  11. 一种集群环境下状态信息的获取系统,其特征在于,所述集群环境下状态信息的获取系统包括:
    显示模块,用于在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
    获取模块,用于确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
    返回模块,用于将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
  12. 根据权利要求11所述的集群环境下状态信息的获取系统,其特征在于,所述获取模块,具体用于:若所选择的是服务器,则调用预定的LINUX命令并发送该LINUX命令至服务器,接收服务器基于该预定的LINUX命令返回的服务器的状态信息,所述服务器的状态信息至少包括CPU信息、网卡信息、磁盘IO信息以及内存消耗信息;若所选择的是数据库,则调用JDBC驱动包连接该数据库,在成功连接该数据库后,向该数据库发送SESSION信息命令,接收基于该SESSION信息命令返回的与数据库连接的应用的数量;若所选择的是JAVA虚拟机,则调用预定的JAVA虚拟机工具获取JAVA虚拟机的状态信息,所述JAVA虚拟机的状态信息至少包括当前在JAVA虚拟机中运行的程序、JAVA虚拟机的各项参数及运行数据。
  13. 根据权利要求11或12所述的集群环境下状态信息的获取系统,其特征在于,所述返回模块,具体用于:将服务器的状态信息、数据库的状态信 息和/或JAVA虚拟机的状态信息分别转化为图形化的形式,在客户端界面上展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
  14. 根据权利要求13所述的集群环境下状态信息的获取系统,其特征在于,还包括分析模块,用于在进行性能压测时,根据客户端界面上展示的各项图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分析是否达到对应的预先设置的上限值,并在达到对应的预先设置的上限值时,分析当前是否出现异常情况;根据分析结果调整所述上限值,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警。
  15. 根据权利要求13所述的集群环境下状态信息的获取系统,其特征在于,所述返回模块,进一步用于在客户端界面上以不同的颜色展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现步骤:
    连接步骤,在客户端连接一个或多个服务器后,在客户端界面上显示供用户选择的各个服务器、数据库和/或JAVA虚拟机;
    获取步骤,确定用户在客户端界面上选择的服务器、数据库和/或JAVA虚拟机,基于所选择数据库和/或JAVA虚拟机调用预定的对应的工具,基于所选择的服务器调用预定的对应的命令,基于该工具和/或命令,获取服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息;
    展示步骤,将所获取的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息返回至客户端界面上进行展示。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述获取步骤,具体包括:
    若所选择的是服务器,则调用预定的LINUX命令并发送该LINUX命令 至服务器,接收服务器基于该预定的LINUX命令返回的服务器的状态信息,所述服务器的状态信息至少包括CPU信息、网卡信息、磁盘信息以及内存消耗信息;
    若所选择的是数据库,则调用JDBC驱动包连接该数据库,在成功连接该数据库后,向该数据库发送SESSION信息命令,接收基于该SESSION信息命令返回的与数据库连接的应用的数量;
    若所选择的是JAVA虚拟机,则调用预定的JAVA虚拟机工具获取JAVA虚拟机的状态信息,所述JAVA虚拟机的状态信息至少包括当前在JAVA虚拟机中运行的程序、JAVA虚拟机的各项参数及运行数据。
  18. 根据权利要求16或17所述的计算机可读存储介质,其特征在于,所述展示步骤,具体包括:
    将服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分别转化为图形化的形式,在客户端界面上展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述处理系统被所述处理器执行时,还实现如下步骤:
    在进行性能压测时,根据客户端界面上展示的各项图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息分析是否达到对应的预先设置的上限值,并在达到对应的预先设置的上限值时,分析当前是否出现异常情况;
    根据分析结果调整所述上限值,以调整后的上限值作为性能瓶颈值,供在下次达到该性能瓶颈值时发出预警。
  20. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述展示步骤,进一步包括:在客户端界面上以不同的颜色展示图形化的服务器的状态信息、数据库的状态信息和/或JAVA虚拟机的状态信息。
PCT/CN2018/089459 2018-03-06 2018-06-01 电子装置、集群环境下状态信息的获取方法、系统及存储介质 WO2019169765A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810183495.4 2018-03-06
CN201810183495.4A CN108566314A (zh) 2018-03-06 2018-03-06 电子装置、集群环境下状态信息的获取方法及存储介质

Publications (1)

Publication Number Publication Date
WO2019169765A1 true WO2019169765A1 (zh) 2019-09-12

Family

ID=63532125

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089459 WO2019169765A1 (zh) 2018-03-06 2018-06-01 电子装置、集群环境下状态信息的获取方法、系统及存储介质

Country Status (2)

Country Link
CN (1) CN108566314A (zh)
WO (1) WO2019169765A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928560A (zh) * 2019-11-30 2020-03-27 苏州浪潮智能科技有限公司 Linux环境下安装控制虚拟机的方法、系统及存储介质
CN111078495A (zh) * 2019-11-29 2020-04-28 航天精一(广东)信息科技有限公司 一种监控Carte服务器状态的方法
CN112559296A (zh) * 2020-12-23 2021-03-26 南方电网深圳数字电网研究院有限公司 基于prometheus的虚拟机监控方法和工具、电子设备、存储介质
CN113064762A (zh) * 2021-04-09 2021-07-02 上海新炬网络信息技术股份有限公司 基于多样探测的服务自恢复方法
CN113590369A (zh) * 2021-07-23 2021-11-02 上海淇玥信息技术有限公司 一种用于虚拟机诊断的方法、装置及电子设备
CN114285588A (zh) * 2020-09-21 2022-04-05 奇安信科技集团股份有限公司 获取攻击对象信息的方法、装置、设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296889B (zh) * 2021-05-06 2023-03-14 曙光信息产业股份有限公司 任务管理方法、装置、系统、计算机设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667034A (zh) * 2009-09-21 2010-03-10 北京航空航天大学 一种易扩展的、支持异构集群的监控系统
CN103019910A (zh) * 2011-09-26 2013-04-03 北京新媒传信科技有限公司 一种监控Linux服务器中资源的方法和系统
CN103024060A (zh) * 2012-12-20 2013-04-03 中国科学院深圳先进技术研究院 一种开放式云计算大规模集群监控系统及方法
CN104022902A (zh) * 2014-05-30 2014-09-03 京东方科技集团股份有限公司 一种监控服务器集群的方法和系统
CN105703940A (zh) * 2015-12-10 2016-06-22 中国电力科学研究院 一种面向多级调度分布式并行计算的监控系统及监控方法
CN107454140A (zh) * 2017-06-27 2017-12-08 北京溢思得瑞智能科技研究院有限公司 一种基于大数据平台的Ceph集群自动化部署方法及系统

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1302640C (zh) * 2003-05-12 2007-02-28 华为技术有限公司 一种测试aaa服务器性能的方法及其装置
CN103546562A (zh) * 2013-10-28 2014-01-29 陕西高新实业有限公司 分布式监测应用服务器系统
CN104717236A (zh) * 2013-12-11 2015-06-17 中国移动通信集团公司 一种设备性能测试方法及装置
CN104009883A (zh) * 2014-05-09 2014-08-27 烽火通信科技股份有限公司 计算机资源集中式远程实时监控的系统及方法
CN105337787A (zh) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 一种多服务器监控方法、装置和系统
CN105491143A (zh) * 2015-12-15 2016-04-13 国云科技股份有限公司 一种软件运行状态监控系统及其实现方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667034A (zh) * 2009-09-21 2010-03-10 北京航空航天大学 一种易扩展的、支持异构集群的监控系统
CN103019910A (zh) * 2011-09-26 2013-04-03 北京新媒传信科技有限公司 一种监控Linux服务器中资源的方法和系统
CN103024060A (zh) * 2012-12-20 2013-04-03 中国科学院深圳先进技术研究院 一种开放式云计算大规模集群监控系统及方法
CN104022902A (zh) * 2014-05-30 2014-09-03 京东方科技集团股份有限公司 一种监控服务器集群的方法和系统
CN105703940A (zh) * 2015-12-10 2016-06-22 中国电力科学研究院 一种面向多级调度分布式并行计算的监控系统及监控方法
CN107454140A (zh) * 2017-06-27 2017-12-08 北京溢思得瑞智能科技研究院有限公司 一种基于大数据平台的Ceph集群自动化部署方法及系统

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078495A (zh) * 2019-11-29 2020-04-28 航天精一(广东)信息科技有限公司 一种监控Carte服务器状态的方法
CN110928560A (zh) * 2019-11-30 2020-03-27 苏州浪潮智能科技有限公司 Linux环境下安装控制虚拟机的方法、系统及存储介质
CN114285588A (zh) * 2020-09-21 2022-04-05 奇安信科技集团股份有限公司 获取攻击对象信息的方法、装置、设备及存储介质
CN112559296A (zh) * 2020-12-23 2021-03-26 南方电网深圳数字电网研究院有限公司 基于prometheus的虚拟机监控方法和工具、电子设备、存储介质
CN113064762A (zh) * 2021-04-09 2021-07-02 上海新炬网络信息技术股份有限公司 基于多样探测的服务自恢复方法
CN113064762B (zh) * 2021-04-09 2024-02-23 上海新炬网络信息技术股份有限公司 基于多样探测的服务自恢复方法
CN113590369A (zh) * 2021-07-23 2021-11-02 上海淇玥信息技术有限公司 一种用于虚拟机诊断的方法、装置及电子设备
CN113590369B (zh) * 2021-07-23 2024-05-28 上海淇玥信息技术有限公司 一种用于虚拟机诊断的方法、装置及电子设备

Also Published As

Publication number Publication date
CN108566314A (zh) 2018-09-21

Similar Documents

Publication Publication Date Title
WO2019169765A1 (zh) 电子装置、集群环境下状态信息的获取方法、系统及存储介质
US11394628B1 (en) Monitoring and performance improvement of enterprise applications
WO2021129367A1 (zh) 一种监控分布式存储系统的方法及装置
US9712410B1 (en) Local metrics in a service provider environment
US10116534B2 (en) Systems and methods for WebSphere MQ performance metrics analysis
US20220058104A1 (en) System and method for database replication benchmark testing using a pipeline-based microservices model
US20210383295A1 (en) Method and apparatus for stress testing, electronic device and computer readable medium
US20160065440A1 (en) Methods and Computer Program Products for Collecting Storage Resource Performance Data Using File System Hooks
US11706084B2 (en) Self-monitoring
US10587655B1 (en) Compliance management system and method for an integrated computing system
CN113760641A (zh) 业务监控方法、装置、计算机系统和计算机可读存储介质
US20170149864A1 (en) Distributed applications management with dependent resilient distributed services
CN113238815B (zh) 一种接口访问控制方法、装置、设备及存储介质
US20190354426A1 (en) Method and device for determining causes of performance degradation for storage systems
CN113778790A (zh) 一种基于Zabbix的计算系统状态监控的方法和系统
CN110635956A (zh) 一种设备管理方法、平台、系统、设备及存储介质
CN108920322A (zh) 一种中间件运行监测的方法、装置及计算机存储介质
CN114064402A (zh) 服务器系统监控方法
CN111339466A (zh) 接口管理方法、装置、电子设备及可读存储介质
US9729464B1 (en) Method and apparatus for provisioning of resources to support applications and their varying demands
CN107682228A (zh) 一种OpenStack集群的状态监控方法及其装置
CN117194165A (zh) 服务器性能监测方法、装置、计算机设备和存储介质
CN111913861A (zh) 物联网系统的性能测试方法、装置、设备及介质
CN116260703A (zh) 分布式消息服务节点cpu性能故障自恢复方法及装置
CN114510398A (zh) 异常监测方法、装置、设备、系统和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18908463

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14/12/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18908463

Country of ref document: EP

Kind code of ref document: A1