CN111274085A - Database monitoring system and method - Google Patents

Database monitoring system and method Download PDF

Info

Publication number
CN111274085A
CN111274085A CN202010039158.5A CN202010039158A CN111274085A CN 111274085 A CN111274085 A CN 111274085A CN 202010039158 A CN202010039158 A CN 202010039158A CN 111274085 A CN111274085 A CN 111274085A
Authority
CN
China
Prior art keywords
database
client
information
script
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.)
Pending
Application number
CN202010039158.5A
Other languages
Chinese (zh)
Inventor
鄢贵海
王强
江树浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology 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 Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202010039158.5A priority Critical patent/CN111274085A/en
Publication of CN111274085A publication Critical patent/CN111274085A/en
Pending legal-status Critical Current

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • 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/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications

Landscapes

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

Abstract

The invention provides a database monitoring system and a database monitoring method. The system includes at least one client device and a server device. Each client device includes: the configuration module is used for setting client information, target server information and script source information; the communication interface is used for establishing network communication connection with the server so as to send the client information and the root loaded script to the server device. The server device includes: the configuration module is used for setting a database user name and a password; the communication interface is used for establishing the network communication connection so as to receive client information and scripts and enable the database to execute the scripts according to the database user name and the password; the server side statistic module is used for updating client side task monitoring records comprising the task monitoring records of each client side according to the client side information, the script and the condition of the task of the current execution script of the database; the server side presentation module is used for displaying the monitoring record information. Thereby enabling performance monitoring of multiple client instances connected to the database.

Description

Database monitoring system and method
Technical Field
The invention relates to the technical field of computers, in particular to a database monitoring system and a database monitoring method.
Background
Software applications are already out of the database. Whether in desktop applications, Web, mobile applications, the database needs to be operated at the backend. In the fields of finance, express delivery and e-commerce, a database is also indispensable.
As the complexity of applications increases, more powerful and secure databases are needed to meet the demand. Currently, there are many active database tools in the market, such as MS SQL Server, Oracle, MySQL, PostgreSQL, and so on. They have their own advantages in cost, reliability, functionality and safety.
With the increasing importance of database testing, the requirements on monitoring systems are gradually increased, and the testing requirements of multiple instances are also provided. However, most database monitoring systems currently only have one client, and are directly connected with a database for testing/monitoring, and do not have the capability of simultaneously performing multiple testing/monitoring instances.
Disclosure of Invention
The invention provides a database monitoring system and a database monitoring method, which are used for monitoring the performance of a plurality of client-side examples connected with a database.
In order to achieve the purpose, the invention is realized by adopting the following scheme:
according to an aspect of an embodiment of the present invention, there is provided a database monitoring system including: at least one client device and a server device;
each of the client devices, comprising:
the client configuration module is used for receiving the set client information, the target server information and the script source information;
the client communication interface is used for establishing network communication connection with a server corresponding to the server device so as to send the client information and the script loaded according to the script source information to the server device according to the target server information;
the server device comprises:
the server side configuration module is used for receiving the set database user name and the set password;
the server communication interface is used for establishing the network communication connection with the client communication interface so as to receive the client information and the script and enable a database to execute the task of the script according to the database user name and the password; wherein a script comprises at least one task;
the server side statistic module is used for updating a client side task monitoring record according to the client side information, the script and the condition that the database currently executes the task of the script; the client task monitoring records comprise task monitoring records of clients corresponding to the client devices;
and the server side presentation module is used for displaying the information in the client side task monitoring record so as to monitor the database.
In some embodiments, the client configuration module is further configured to receive the set execution sequence information and the sending rate; the client communication interface is further used for sending the client information, the script loaded according to the script source information and the execution sequence information to the server device according to the sending rate and the target server information; and the server communication interface is also used for receiving the execution sequence information so as to enable the database to execute the tasks of the script based on the execution sequence information according to the database user name and the password.
In some embodiments, the client information includes a client name and an IP; the target server information comprises a server IP and a port number; the script source information comprises standard data set information or file loading information; the execution sequence information includes sequential execution or random execution.
In some embodiments, the standard data set information includes TPC-C and TPC-H.
In some embodiments, the task monitoring record of each of the clients includes: one or more of a total number of tasks received from the respective client, a number of tasks received from the respective client performed by the database to completion, a percentage of tasks received from the respective client performed by the database to completion, a categorical statistical number of tasks received from the respective client, and a set number of tasks received from the respective client for which tasks were most recently performed by the database to completion.
In some embodiments, the task monitoring record of each of the clients further includes the client information.
In some embodiments, the server apparatus further includes: the storage module is used for storing the client task monitoring record in a HASH table mode; and the task monitoring record of each client further comprises client identification information generated according to the client name and the IP in the client information.
In some embodiments, the client task monitoring record further comprises: one or more of a number of all tasks received from all clients performed by the database, a percentage of all tasks received from all clients performed by the database, a number of types of tasks received from all clients performed by the database, and a percentage of types of tasks received from all clients performed by the database.
9. Database monitoring system according to any of the claims 1 to 8, characterized in that the database comprises a hardware database and/or a software database.
In some embodiments, in a case where the database comprises a hardware database, the system further comprises: the driving module is used for establishing connection between a server corresponding to the server device and a hardware database so as to send the script to the hardware database for execution; in a case where the database includes a software database, the system further includes: and the ODBC interface is used for establishing connection between a server corresponding to the server device and a software database so as to send the script to the software database for execution.
In some embodiments, the client communication interface and the server communication interface are both RPC interfaces.
According to another aspect of the embodiments of the present invention, there is provided a database monitoring method, including:
receiving client information sent according to the target server information and a script loaded according to script source information based on network communication connection;
sending the script according to the set database user name and password so that the database executes the task of the script; wherein a script comprises at least one task;
receiving the condition that the database currently executes the task of the script;
updating a local client task monitoring record according to the client information, the script and the condition that the database currently executes the task of the script; the client task monitoring records comprise task monitoring records for a single client;
and displaying the information in the client task monitoring record for monitoring a database.
In some embodiments, receiving client information sent according to target server information and a script loaded according to script source information based on a network communication connection includes: receiving client information sent according to target server information and a set sending rate, a script loaded according to script source information and execution sequence information based on network communication connection; and sending the script and the execution sequence information according to the set database user name and password so that the database executes the task of the script according to the execution sequence information.
In some embodiments, the client information includes a client name and an IP; the target server information comprises a server IP and a port number; the script source information comprises standard data set information or file loading information; the execution sequence information includes sequential execution or random execution.
In some embodiments, each task monitoring record for a single client comprises: one or more of a total number of tasks received from the respective client, a number of tasks received from the respective client performed by the database to completion, a percentage of tasks received from the respective client performed by the database to completion, a categorical statistical number of tasks received from the respective client, and a set number of tasks received from the respective client for which tasks were most recently performed by the database to completion.
In some embodiments, the database monitoring method further includes: storing the client task monitoring record in a HASH table mode; and the task monitoring record of each client further comprises the client information and/or client identification information generated according to the client name and the IP in the client information.
In some embodiments, in the database monitoring method, the client task monitoring record further includes: one or more of a number of all tasks received from all clients performed by the database, a percentage of all tasks received from all clients performed by the database, a number of types of tasks received from all clients performed by the database, and a percentage of types of tasks received from all clients performed by the database.
According to a further aspect of embodiments of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, performs the steps of the method of any of the above embodiments.
The database monitoring system, the database monitoring method and the computer readable storage medium of the embodiment of the invention can realize remote test/monitoring by utilizing network communication to connect data transmission between the client and the server. By recording the monitoring data for each client in the client task monitoring records, database performance and security monitoring can be simultaneously performed on a plurality of client instances connected with the database. In addition, by displaying the information in the client task monitoring record, visual monitoring can be conveniently realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a schematic diagram of a database monitoring system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a database monitoring method according to an embodiment of the invention;
fig. 3 is a schematic structural diagram of a database monitoring system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 is a schematic structural diagram of a database monitoring system according to an embodiment of the present invention. As shown in fig. 1, the database monitoring system of this embodiment may include at least one client device and a server device. The client device is located at the client and may be a program module or may be a device (e.g., a processor, memory, etc. of the client) that contains the program module and upon which the program module executes. The server-side device is located at the server side and may be a program module or may be a device (e.g., a processor, a memory, etc.) that contains the program module and on which the program module is executed.
For each client device, it comprises: a client configuration module and a client communication interface. The client configuration module is used for receiving set client information, target server information and script source information; the client communication interface is used for establishing network communication connection with a server corresponding to the server device so as to send the client information and the script loaded according to the script source information to the server device according to the target server information.
The client information may include information such as a client name and an IP (client name and client IP). When a single instance is run on a single computer of a client, client information of different clients is different, such as client names and client IPs, so that different clients can be distinguished by a server. When multiple instances run on a single client computer, the client information may include, in addition to the client name and the client IP, other information, such as a timestamp, instance identification information, and the like, to enable the server to distinguish different instances on the same client computer.
The target server information may include a server IP and a port number (server IP and server port number), and the like. According to the target server information, setting can be carried out according to the server to which the client is connected, so that the client sends the information needing to be sent to the server to the corresponding server. In the case where a client is to connect to a server, the target server information on the client may be information of the server.
The script source information may include standard data set information or file loading information. The script source information can be set according to the source address of the script integrated by the client or to be loaded. In the case that the script source information includes file loading information, a script in a file may be loaded according to the file loading information. In the case where the script source information includes standard data set information, more specifically, the standard data set information may include, for example, TPC-C and TPC-H. The standard data set information can be used for loading scripts integrated to the client, so that user-defined scripts can be loaded, and high customizability and flexibility can be realized.
The client communication interface is utilized to establish network communication connection between the client and the server, so that the client and the server can carry out remote communication, and remote testing is facilitated. The client communication interface may be, for example, an RPC (Remote procedure call) interface, so that the client and the server can communicate with each other using the RPC interface conveniently.
For the server device, it may include: the system comprises a server configuration module, a server communication interface, a server statistical module and a server presentation module. The server side configuration module is used for receiving the set database user name and the set password; the server communication interface is used for establishing the network communication connection with the client communication interface so as to receive the client information and the script and enable a database to execute the task of the script according to the database user name and the password; wherein a script comprises at least one task; the server side statistic module is used for updating a client side task monitoring record according to the client side information, the script and the condition that the database currently executes the task of the script; the client task monitoring records comprise task monitoring records of clients corresponding to the client devices; and the server side presentation module is used for displaying the information in the client side task monitoring record so as to monitor the database. The information in the client task monitoring record can be updated and displayed in real time, for example, in real time according to a set time interval.
The database user name and the password (database user name and corresponding password) set by the server configuration module can be set according to the database to be accessed, so that the server logs in the database to access the database, and the security of database access can be improved.
The server communication interface can be matched with the client communication interface, so that network connection is established between the client and the server. For example, the server communication interface may be an RPC (remote procedure Call Protocol, which is a Protocol for requesting a service from a remote computer program through a network without knowing underlying network technologies) interface, as the client communication interface, so as to facilitate remote communication between the client and the server through the RPC interface.
After network connection is established between the client and the server by using the client communication interface and the server communication interface, client information, loaded scripts and the like of the client can be sent to the server. After receiving the client information and the script, the server can log in and access the corresponding database according to the database user name and the password, so as to send the task instruction of the script to the database for execution, and can record the client information and the information of the script by using the server statistical module, and can record the task execution condition according to the condition of the data returned for executing the task. A script may include one or more tasks, or may include a large number of tasks, and the division of specific tasks may be set as required, for example, an SQL statement may be regarded as a task, or a transaction (e.g., a transfer behavior) may be regarded as a task. After the server side obtains the script, the server side can analyze the script to obtain one or more task instructions, and the instructions can be sent to a database to be executed. The client task monitoring record may be used to record the instance or relevant information of each instance for each client.
In some embodiments, the client task monitoring record may include a task monitoring record of a client corresponding to each of the client devices. Wherein, the task monitoring record of each client may include: one or more of a total number of tasks received from the respective client, a number of tasks received from the respective client performed by the database to completion, a percentage of tasks received from the respective client performed by the database to completion, a categorical statistical number of tasks received from the respective client, and a set number of tasks received from the respective client for which tasks were most recently performed by the database to completion.
According to the script received from the client, the number of tasks contained in the script, that is, the number of tasks received from the client at this time, can be known, and the number of tasks received at this time can be accumulated to the total number of received tasks corresponding to the client in the record, that is, the total number of tasks received from the corresponding client. After the database executes one or more tasks, the server can be informed of which tasks are completed and how many tasks are completed. On one hand, the number of tasks completed this time may be accumulated to the number of tasks completed by the database corresponding to the client in the record, that is, to the number of tasks completed by the database received from the corresponding client; on the other hand, the oldest tasks in the set number (for example, ten) of tasks that are executed and completed recently and correspond to the client in the record can be replaced according to the tasks that are completed this time, so that some tasks that are completed recently and are latest can be kept and recorded. In addition, each time there is a newly received task corresponding to a client and a newly completed task corresponding to a client, the percentage of the tasks of the client can be completed on the database. In addition, the received tasks corresponding to a client can be classified and counted, that is, the number of each type of task is recorded, and the number of the type of task of the client, which is currently recorded, can be updated by using the data volume of each type of task in the received tasks this time. Further, the number and/or percentage of each type of task performed by the database for a client may also be recorded, if necessary.
In this embodiment, the task receiving condition and the task execution condition of the database may be recorded for each client, so that the performance of the database processing the instance of the task of each client may be monitored or tested, and the performance of the database processing the task of each client may be monitored or tested together, so that the performance of the database processing the task of each client may be known.
Further, the task monitoring record of each client may further include the client information. Specifically, the client information may include information such as a client name and an IP. Thereby, the service end can be conveniently distinguished from different clients. In other embodiments, if no client information is recorded, the different instances may be distinguished in other ways, for example, by recording identification information of the instances,
by recording task related information for each client in the client task monitoring record, monitoring or testing the performance of the database processing each client's instance may be facilitated. Further, information may be aggregated in the client task monitoring records for further analysis as needed.
In some embodiments, the performance of tasks on the database may be aggregated. Illustratively, the client task monitoring record further comprises: one or more of a number of all tasks received from all clients performed by the database, a percentage of all tasks received from all clients performed by the database, a number of types of tasks received from all clients performed by the database, and a percentage of types of tasks received from all clients performed by the database.
For one database, the summarized information can facilitate the performance monitoring or testing of the database by summarizing the processing conditions of the tasks of all the clients by the database under the condition that the task amount of each client is not too large.
For a plurality of databases, by summarizing the information, the performance of the databases can be compared conveniently by summarizing the processing conditions of the tasks of all the clients by the databases under the condition that the task amount of each client is not too large. Of course, in the case of a large amount of tasks for each client, the recorded information of the tasks of a single client or a small number of clients can be used for carrying out comparative analysis on the performances of different databases.
The databases described in the various embodiments of the present invention may include hardware databases and/or software databases. The hardware database may refer to a device for accelerating the execution of the SQL statements, and may exist between the client and the software database. After the hardware database is powered on, all data can be loaded from the database, after an SQL statement sent by a client is received, the SQL statement can be executed in the hardware database, and if the SQL statement of the database is changed, the change can be asynchronously applied to the software database. In addition, the software database can refer to a database at the CPU end, and can be a common database, such as MySQL, Oracle, and the like.
For the case of only including a hardware database or only including a software database, the information related to the database mentioned in the embodiments of the present invention is the related information of the database. For the situation that the server side simultaneously comprises a hardware database and a software database, the server side can simultaneously send the received task instruction of the script to the hardware database and the software database (the performance of the two databases can be compared conveniently), the related information of the databases in the embodiments of the present invention is the related information of the two databases, for example, the server side configuration module can be used for receiving the set hardware database user name and password and the set software database user name and password, and can be respectively used for accessing the hardware database and the software database; the server side statistic module can be used for updating a client side task monitoring record according to the client side information, the script, the condition that the hardware database currently executes the task of the script and the condition that the software database currently executes the task of the script; updating the number of executions by the database of tasks received from the respective client in the client task monitoring record may include the number of executions by the hardware database of tasks received from the respective client and the number of executions by the software database of tasks received from the respective client, the percentage of completion of the execution of the task by the database received from the respective client may include the percentage of completion of the execution of the task by the hardware database received from the respective client and the percentage of completion of the execution of the task by the software database received from the respective client, the set number of tasks received from the respective clients whose tasks were most recently performed by the database may include the set number of tasks received from the respective clients whose tasks were most recently performed by the hardware database and the set number of tasks received from the respective clients whose tasks were most recently performed by the software database.
Additionally, the number of executions by the database of all tasks received from all clients may include the number of executions by the hardware database of all tasks received from all clients and the number of executions by the software database of all tasks received from all clients; the percentage of completion of all tasks received from all clients by the database may include the percentage of completion of all tasks received from all clients by the hardware database and the percentage of completion of all tasks received from all clients by the software database; the number of the various tasks of all the tasks received from all the clients performed by the database may include the number of the various tasks of all the tasks received from all the clients performed by the hardware database and the number of the various tasks of all the tasks received from all the clients performed by the software database; the percentage of completion by the database of each of the types of tasks received from all of the clients may include the percentage of completion by the hardware database of each of the types of tasks received from all of the clients and the percentage of completion by the software database of each of the types of tasks received from all of the clients.
In a further embodiment, in the case that the database includes a hardware database, the database monitoring system shown in fig. 1 may further include: a drive module; the driving module can be used for establishing connection between a server corresponding to the server device and a hardware database so as to send the script to the hardware database for execution. In the case where the database includes a software database, the database monitoring system shown in fig. 1 may further include: an ODBC (Open Database Connectivity) interface; the ODBC interface can be used for establishing connection between a server corresponding to the server device and a software database so as to send the script to the software database for execution. Of course, in the case of simultaneously including the hardware database and the software database, the hardware database and the software database may be respectively connected by using the driver module and the ODBC interface. In other embodiments, other interfaces may be utilized to connect the server side and the software database.
Further, in the database monitoring system shown in fig. 1, the server device may further include: and a storage module. The storage module can be used for storing the client task monitoring record in a HASH table mode; and the task monitoring record of each client can also comprise client identification information generated according to the client name and the IP in the client information. The HASH table is used for recording the client task monitoring record in each embodiment, so that the recorded data can be conveniently output, or the HASH table can be used for outputting and displaying. For example, information in the client task monitoring record may be transmitted to the server presentation module to be converted into data that can be used for display, such as a graph (e.g., a graph, a pie chart, etc.), and output to a display device for display, so that the monitoring data can be made intuitive and visible. The aesthetic and intuitive test results show that more laymen can understand the differences in performance.
Further, other information, such as execution sequence information and sending rate, may also be set at the client. For example, in the database monitoring system shown in fig. 1, the client configuration module may be further configured to receive the set execution sequence information and the sending rate; the client communication interface can also be used for sending the client information, the script loaded according to the script source information and the execution sequence information to the server device according to the sending rate and the target server information; the server-side communication interface can also be used for receiving the execution sequence information so as to enable a database to execute the tasks of the script based on the execution sequence information according to the database user name and the password. Wherein the execution sequence information may include sequential execution or random execution, which information may be used for instructions that cause the database to execute tasks in this order.
In addition, based on the same inventive concept as the database monitoring system described in the above embodiment, the embodiment of the present invention further provides a database monitoring method, and the repeated points may refer to the embodiment described above, and therefore are not described again. The method can realize monitoring or testing the performance of the database connected with a plurality of clients.
Fig. 2 is a flowchart illustrating a database monitoring method according to an embodiment of the present invention. As shown in fig. 2, the database monitoring method of this embodiment may include the following steps S110 to S150:
step S110: receiving client information sent according to the target server information and a script loaded according to script source information based on network communication connection;
step S120: sending the script according to the set database user name and password so that the database executes the task of the script; wherein a script comprises at least one task;
step S130: receiving the condition that the database currently executes the task of the script;
step S140: updating a local client task monitoring record according to the client information, the script and the condition that the database currently executes the task of the script; the client task monitoring records comprise task monitoring records for a single client;
step S150: and displaying the information in the client task monitoring record for monitoring a database.
The client can configure/set the target server information, the client information and the script source information. The target server information may include an IP of the target server and a port number of the target server. A network communication connection may be established between the client and the server over a communication interface, which may be an RPC interface. In step S140, each client can be recorded through the task monitoring record for a single client, so as to distinguish the record information corresponding to different clients.
In some embodiments, the step S110 of receiving, based on the network communication connection, the client information sent according to the target server information and the script loaded according to the script source information may specifically include the steps of: receiving client information sent according to target server information and a set sending rate, a script loaded according to script source information and execution sequence information based on network communication connection; and sending the script and the execution sequence information according to the set database user name and password so that the database executes the task of the script according to the execution sequence information.
In some embodiments, the client information may include a client name and an IP; the target server information comprises a server IP and a port number; the script source information comprises standard data set information or file loading information; the execution sequence information includes sequential execution or random execution. The standard data set information may include TPC-C (online transaction reference) and TPC-H (decision support system test standard).
In some embodiments, the client task monitoring records may include task monitoring records for individual clients; each task monitoring record for a single client includes: one or more of a total number of tasks received from the respective client, a number of tasks received from the respective client performed by the database to completion, a percentage of tasks received from the respective client performed by the database to completion, a categorical statistical number of tasks received from the respective client, and a set number of tasks received from the respective client for which tasks were most recently performed by the database to completion. The task monitoring record of each client can also comprise the client information.
In some embodiments, the database monitoring method may further include the steps of: s160, storing the client task monitoring record in a HASH table mode; and the task monitoring record of each client further comprises the client information and/or client identification information generated according to the client name and the IP in the client information.
In some embodiments, the client task monitoring record further comprises: one or more of a number of all tasks received from all clients performed by the database, a percentage of all tasks received from all clients performed by the database, a number of types of tasks received from all clients performed by the database, and a percentage of types of tasks received from all clients performed by the database.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method according to any of the above embodiments.
In order that those skilled in the art will better understand the present invention, embodiments of the present invention will be described below with reference to specific examples.
In a specific embodiment, a C/S structure (namely a Client-Server structure, the C/S structure usually adopts a two-layer structure, a Server is responsible for data management, a Client is responsible for completing an interaction task with a user), and a Client is connected with the Server through a network; the server is connected with the hardware database through a customized local driver and is connected with the database through an ODBC driver. The server side can simultaneously execute the test script sent by the client side in the hardware database and the database, monitor the performance change of the hardware database and the database in real time and export a test report.
Fig. 3 is a schematic structural diagram of a database monitoring system according to an embodiment of the present invention. Referring to fig. 3, the present test/monitoring system involves the following parts: client, server, hardware database, database.
The client comprises two modules: a configuration module and a communication interface. The configuration module may set the name of the client, the IP and port number of the target server, the source of the script (standard data set or loaded from a file), the execution order (sequential or random execution), and the execution rate. The communication interface is used for communicating with the server through a network and sending the task or the script to the server.
During execution, the client may display the task being executed, the task results, and the real-time progress.
The server comprises the following modules: the device comprises a communication interface, a configuration module, a presentation module and a statistic module. The configuration module can set a hardware database to be connected and a user name and a password of the database; the communication interface receives tasks or scripts from a plurality of clients; the presentation interface is responsible for presenting the task or script details of each client in real time, and the presented content comprises client detailed information (client name and IP) and chart form presentation task or script detailed information (received number, completion percentage, various classification tasks or script statistics); and the counting module is responsible for counting the detailed information of the tasks or scripts of each client in real time.
The server is connected with the hardware database through a specially written local drive and is connected with the actual database through ODBC. The server executes the tasks or the scripts in the hardware database and the actual database at the same time, monitors the performance changes of the hardware database and the actual database in real time, and finally leads out reports of the result data executed by the hardware database and the actual database.
A hardware database is a device that is dedicated to speeding up the execution rate of the database. The hardware database driver provides interfaces for calling the hardware database from the outside, and the server side sends tasks or scripts to the hardware database through the interfaces. A special database engine module in the hardware database is in butt joint with an actual database, and functions of data synchronization, acceleration and the like are achieved. The database is a common database in the market, such as MySQL, Oracle, and the like. In order to compare the performance and the safety of each database system, a testing (monitoring) system can be designed to test the database.
The client communicates with the server through an RPC interface, the server stores client information in a HASH table mode, and the HASH table content is as follows:
ID ClientInfo
192.168.2.26@GSG ……
the server uses the IP of the client plus the client name as a unique Identifier (ID), for example, the IP of the client is "192.168.2.26" and the name is "GSG", and the server stores the unique identifier of the client as "192.168.2.26 @ GSG". When the server receives a client connection, a new record can be inserted into the table, and single-instance operation can be performed on a single computer including the client, so that the situation that the ID is repeated can be avoided. The information corresponding to the client is identified in the table by using ClientInfo as an example, and specifically may include various data monitored by the server.
The data monitored by the server can comprise: the method comprises the steps of client information, the number of received tasks, the number of tasks completed by a hardware database, the number of tasks completed by a database, the number of various types of received tasks, the display of the completion percentage of the hardware database and the database at each moment and 10 recently executed tasks.
(1) Information of the client: the client sends the two parameters when initiating connection to the server;
(2) the number of received tasks: the server can update the parameter every time the server receives a task sent by the client;
(3) the number of tasks completed by the hardware database and the number of tasks completed by the database are as follows: after a new task is completed, the server can update the parameter;
(4) number of various task categories received: when the server receives a task sent by the client, the task is analyzed, the number of tasks of corresponding types is modified, and the parameter can be displayed in the form of a pie chart and a bar chart;
(5) the hardware database and the database finish percentage display at each moment: calculating the task completion percentage according to the hardware database at each moment, the number of tasks completed by the database and the total number of received tasks, and displaying the task completion percentage in a line graph form in real time;
(6) the most recently performed 10 tasks: record the 10 most recently executed tasks of each client.
The system of the embodiment has the advantages that: the client integrates standard data sets (including TPC-C and TPC-H), and can also load user-defined scripts, so that high customizability and flexibility are realized; the client is connected with the server through a network, so that remote testing can be realized; the server side can be connected with a plurality of client sides simultaneously for testing; the task is simultaneously executed in the hardware database and the database, various parameters are monitored, and the performance difference of the hardware database and the database is visually compared. In the hardware database monitoring system of the embodiment, the client communicates with the server through the network to realize the remote testing function; multiple clients can be connected with the same server, and the server can visualize the execution conditions into a chart in real time and export the test report.
In summary, the database monitoring system, the database monitoring method and the computer-readable storage medium according to the embodiments of the present invention can implement remote testing/monitoring by transmitting data between the client and the server through the network communication connection. By recording the monitoring data for each client in the client task monitoring records, the performance and safety test or monitoring of the database connected with a plurality of clients can be realized at the same time. In addition, by displaying the information in the client task monitoring record, visual monitoring can be conveniently realized.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the various embodiments is provided to schematically illustrate the practice of the invention, and the sequence of steps is not limited and can be suitably adjusted as desired.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (18)

1. A database monitoring system, comprising: at least one client device and a server device;
each of the client devices, comprising:
the client configuration module is used for receiving the set client information, the target server information and the script source information;
the client communication interface is used for establishing network communication connection with a server corresponding to the server device so as to send the client information and the script loaded according to the script source information to the server device according to the target server information;
the server device comprises:
the server side configuration module is used for receiving the set database user name and the set password;
the server communication interface is used for establishing the network communication connection with the client communication interface so as to receive the client information and the script and enable a database to execute the task of the script according to the database user name and the password; wherein a script comprises at least one task;
the server side statistic module is used for updating a client side task monitoring record according to the client side information, the script and the condition that the database currently executes the task of the script; the client task monitoring records comprise task monitoring records of clients corresponding to the client devices;
and the server side presentation module is used for displaying the information in the client side task monitoring record so as to monitor the database.
2. The database monitoring system of claim 1,
the client configuration module is also used for receiving the set execution sequence information and sending rate;
the client communication interface is further used for sending the client information, the script loaded according to the script source information and the execution sequence information to the server device according to the sending rate and the target server information;
and the server communication interface is also used for receiving the execution sequence information so as to enable the database to execute the tasks of the script based on the execution sequence information according to the database user name and the password.
3. The database monitoring system of claim 2, wherein the client information includes a client name and an IP; the target server information comprises a server IP and a port number; the script source information comprises standard data set information or file loading information; the execution sequence information includes sequential execution or random execution.
4. The database monitoring system of claim 3, wherein the standard data set information comprises TPC-C and TPC-H.
5. The database monitoring system of claim 1, wherein the task monitoring record for each of the clients comprises: one or more of a total number of tasks received from the respective client, a number of tasks received from the respective client performed by the database to completion, a percentage of tasks received from the respective client performed by the database to completion, a categorical statistical number of tasks received from the respective client, and a set number of tasks received from the respective client for which tasks were most recently performed by the database to completion.
6. The database monitoring system of claim 5, wherein the task-monitoring record for each of the clients further comprises the client information.
7. The database monitoring system of claim 6, wherein the server-side device further comprises:
the storage module is used for storing the client task monitoring record in a HASH table mode; and the task monitoring record of each client further comprises client identification information generated according to the client name and the IP in the client information.
8. The database monitoring system of claim 5, wherein the client task monitoring record further comprises: one or more of a number of all tasks received from all clients performed by the database, a percentage of all tasks received from all clients performed by the database, a number of types of tasks received from all clients performed by the database, and a percentage of types of tasks received from all clients performed by the database.
9. Database monitoring system according to any of the claims 1 to 8, characterized in that the database comprises a hardware database and/or a software database.
10. The database monitoring system of claim 9,
in a case where the database includes a hardware database, the system further includes:
the driving module is used for establishing connection between a server corresponding to the server device and a hardware database so as to send the script to the hardware database for execution;
in a case where the database includes a software database, the system further includes:
and the ODBC interface is used for establishing connection between a server corresponding to the server device and a software database so as to send the script to the software database for execution.
11. The database monitoring system according to any of claims 1 to 8, wherein the client communication interface and the server communication interface are both RPC interfaces.
12. A database monitoring method, comprising:
receiving client information sent according to the target server information and a script loaded according to script source information based on network communication connection;
sending the script according to the set database user name and password so that the database executes the task of the script; wherein a script comprises at least one task;
receiving the condition that the database currently executes the task of the script;
updating a local client task monitoring record according to the client information, the script and the condition that the database currently executes the task of the script; the client task monitoring records comprise task monitoring records for a single client;
and displaying the information in the client task monitoring record for monitoring a database.
13. The database monitoring method according to claim 12, wherein receiving the client information transmitted according to the target server information and the script loaded according to the script source information based on the network communication connection comprises:
receiving client information sent according to target server information and a set sending rate, a script loaded according to script source information and execution sequence information based on network communication connection;
and sending the script and the execution sequence information according to the set database user name and password so that the database executes the task of the script according to the execution sequence information.
14. The database monitoring method according to claim 13, wherein the client information includes a client name and an IP; the target server information comprises a server IP and a port number; the script source information comprises standard data set information or file loading information; the execution sequence information includes sequential execution or random execution.
15. The database monitoring method of claim 12, wherein each task monitoring record for a single client comprises: one or more of a total number of tasks received from the respective client, a number of tasks received from the respective client performed by the database to completion, a percentage of tasks received from the respective client performed by the database to completion, a categorical statistical number of tasks received from the respective client, and a set number of tasks received from the respective client for which tasks were most recently performed by the database to completion.
16. The database monitoring method of claim 15, further comprising:
storing the client task monitoring record in a HASH table mode; and the task monitoring record of each client further comprises the client information and/or client identification information generated according to the client name and the IP in the client information.
17. The database monitoring method of claim 15, wherein the client task monitoring record further comprises: one or more of a number of all tasks received from all clients performed by the database, a percentage of all tasks received from all clients performed by the database, a number of types of tasks received from all clients performed by the database, and a percentage of types of tasks received from all clients performed by the database.
18. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 12 to 17.
CN202010039158.5A 2020-01-14 2020-01-14 Database monitoring system and method Pending CN111274085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010039158.5A CN111274085A (en) 2020-01-14 2020-01-14 Database monitoring system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010039158.5A CN111274085A (en) 2020-01-14 2020-01-14 Database monitoring system and method

Publications (1)

Publication Number Publication Date
CN111274085A true CN111274085A (en) 2020-06-12

Family

ID=71001675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010039158.5A Pending CN111274085A (en) 2020-01-14 2020-01-14 Database monitoring system and method

Country Status (1)

Country Link
CN (1) CN111274085A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131315A (en) * 2020-09-29 2020-12-25 中国银行股份有限公司 Database synchronization method and device under multi-task parallel development

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060167973A1 (en) * 2002-11-08 2006-07-27 Warevally Co., Ltd. Database system monitoring method without connecting the database system
US20100333172A1 (en) * 2008-04-25 2010-12-30 Wu Jiang Method, apparatus and system for monitoring database security
CN202443466U (en) * 2012-02-15 2012-09-19 南京上科机电工业有限公司 Multi-user SQLITE database management system
CN104022902A (en) * 2014-05-30 2014-09-03 京东方科技集团股份有限公司 Method and system of monitoring server cluster
CN104579822A (en) * 2014-12-10 2015-04-29 华南理工大学 Automatic performance test system and method of mobile application based on Http protocol
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system
CN107239379A (en) * 2017-05-10 2017-10-10 杭州铭师堂教育科技发展有限公司 Database performance Automatic monitoring systems based on salt
CN107734046A (en) * 2017-10-26 2018-02-23 山东浪潮通软信息科技有限公司 Method, service end, client and the system of remote operation database
CN108241566A (en) * 2018-02-12 2018-07-03 黄倚霄 A kind of data-base performance monitoring method based on configuration
CN109508277A (en) * 2018-11-13 2019-03-22 郑州云海信息技术有限公司 A kind of monitoring system and method for database all-in-one machine
CN109992488A (en) * 2019-01-18 2019-07-09 珠海金山网络游戏科技有限公司 A kind of statistical method based on MongoDB database
CN110532025A (en) * 2019-08-30 2019-12-03 上海复深蓝软件股份有限公司 Data processing method, device, equipment and storage medium based on micro services framework

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060167973A1 (en) * 2002-11-08 2006-07-27 Warevally Co., Ltd. Database system monitoring method without connecting the database system
US20100333172A1 (en) * 2008-04-25 2010-12-30 Wu Jiang Method, apparatus and system for monitoring database security
CN202443466U (en) * 2012-02-15 2012-09-19 南京上科机电工业有限公司 Multi-user SQLITE database management system
CN104022902A (en) * 2014-05-30 2014-09-03 京东方科技集团股份有限公司 Method and system of monitoring server cluster
CN104579822A (en) * 2014-12-10 2015-04-29 华南理工大学 Automatic performance test system and method of mobile application based on Http protocol
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system
CN107239379A (en) * 2017-05-10 2017-10-10 杭州铭师堂教育科技发展有限公司 Database performance Automatic monitoring systems based on salt
CN107734046A (en) * 2017-10-26 2018-02-23 山东浪潮通软信息科技有限公司 Method, service end, client and the system of remote operation database
CN108241566A (en) * 2018-02-12 2018-07-03 黄倚霄 A kind of data-base performance monitoring method based on configuration
CN109508277A (en) * 2018-11-13 2019-03-22 郑州云海信息技术有限公司 A kind of monitoring system and method for database all-in-one machine
CN109992488A (en) * 2019-01-18 2019-07-09 珠海金山网络游戏科技有限公司 A kind of statistical method based on MongoDB database
CN110532025A (en) * 2019-08-30 2019-12-03 上海复深蓝软件股份有限公司 Data processing method, device, equipment and storage medium based on micro services framework

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131315A (en) * 2020-09-29 2020-12-25 中国银行股份有限公司 Database synchronization method and device under multi-task parallel development

Similar Documents

Publication Publication Date Title
US10116534B2 (en) Systems and methods for WebSphere MQ performance metrics analysis
US11457029B2 (en) Log analysis based on user activity volume
US20150133076A1 (en) Mobile device application monitoring software
CN110517148B (en) Control method, system and device for executing quantitative transaction strategy
CN113965502B (en) Full-link performance test method and system
EP3384391B1 (en) Real-time change data from disparate sources
TW201337584A (en) System and method for monitoring and managing data center resources in real time incorporating manageability subsystem
CN105793874B (en) Method and system for managing community information
CN111740860A (en) Log data transmission link monitoring method and device
CN110224899B (en) TCP application call chain acquisition method and device
US10713070B2 (en) Systems and methods for capturing and visualizing user interactions across devices
CN111552628A (en) Distributed pressure measurement system and method for graph database and graph service interface
US20200136889A1 (en) Near real time analytics
CN102710458B (en) Monitoring method of testing process, test management server and test server
CN113127356A (en) Pressure measurement method and device, electronic equipment and storage medium
CN112231180A (en) SQL monitoring method and device based on cloud environment
CN111274085A (en) Database monitoring system and method
CN110750453B (en) HTML 5-based intelligent mobile terminal testing method, system, server and storage medium
CN109885431B (en) Method and apparatus for backing up data
CN112905492B (en) Verification method and device
CN113051094B (en) Supervision data reporting test method and device
US20150287050A1 (en) Split testing framework
CN113868094A (en) Big data abnormal information monitoring system
CN110856208B (en) Network type resource environment data acquisition communication platform
CN113535575A (en) Benchmark testing method and device for basic environment of software and hardware product

Legal Events

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

Application publication date: 20200612

RJ01 Rejection of invention patent application after publication