CN113590414A - Server cluster information acquisition and caching method, device, equipment and medium - Google Patents

Server cluster information acquisition and caching method, device, equipment and medium Download PDF

Info

Publication number
CN113590414A
CN113590414A CN202110737858.6A CN202110737858A CN113590414A CN 113590414 A CN113590414 A CN 113590414A CN 202110737858 A CN202110737858 A CN 202110737858A CN 113590414 A CN113590414 A CN 113590414A
Authority
CN
China
Prior art keywords
acquisition
server cluster
cluster information
acquisition mode
mode
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
CN202110737858.6A
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110737858.6A priority Critical patent/CN113590414A/en
Publication of CN113590414A publication Critical patent/CN113590414A/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/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention provides a server cluster information acquisition and caching method, which is applied to a distributed storage system and comprises the following steps: setting a first acquisition mode and a second acquisition mode to acquire server cluster information, and correspondingly executing the first acquisition mode or the second acquisition mode according to different acquisition trigger modes; monitoring the acquisition tasks of the first acquisition mode and the acquisition tasks of the second acquisition mode in real time, and acquiring and displaying acquisition task execution information; caching the collected server cluster information into a database cache table; the invention also provides a server cluster information acquisition caching device, equipment and a medium, which can effectively improve the initiative of server cluster information acquisition, realize real-time monitoring on server cluster information acquisition and improve the query efficiency of server cluster information caching.

Description

Server cluster information acquisition and caching method, device, equipment and medium
Technical Field
The invention relates to the field of server cluster information acquisition, in particular to a server cluster information acquisition caching method, device, equipment and medium.
Background
In a distributed storage system based on angularjs (a group of frames for developing Web pages), java (object-oriented programming language) and python (computer programming language) as frames, collecting server cluster information is generally collected at regular time, then the collected information is stored in a database for caching, and when the information needs to be used, the information is inquired in a table and then returned to a front end for displaying.
However, this may show the following problems: 1. the success and failure of acquisition cannot be monitored, and if problems exist, the response cannot be quickly perceived; 2. the collected information can only passively wait for the execution of a timing task, if the page display is successful, the cluster information can be collected again after the timing task is executed and added into the cache if the page display is performed for once, and the historical data is still used by the user in the time period from the successful operation to the completion of the next collection; 3. the server cluster information needs to query the database to obtain data each time, which consumes resources and time.
The technical scheme is provided in order to solve the problems in the prior art.
Disclosure of Invention
The invention provides a server cluster information acquisition caching method, a device, equipment and a medium for solving the problems in the prior art, effectively solves the problems that the server cluster information acquisition cannot monitor the acquisition process and the query acquisition cluster information caching efficiency is low in the prior art, effectively improves the initiative of the server cluster information acquisition, realizes the real-time monitoring of the server cluster information acquisition, and improves the query efficiency of the server cluster information caching.
The first aspect of the present invention provides a server cluster information acquisition and caching method, which is applied to a distributed storage system, and includes:
setting a first acquisition mode and a second acquisition mode to acquire server cluster information, and correspondingly executing the first acquisition mode or the second acquisition mode according to different acquisition trigger modes; the first acquisition mode is timing acquisition, and the second acquisition mode is active acquisition;
monitoring the acquisition tasks of the first acquisition mode and the acquisition tasks of the second acquisition mode in real time, and acquiring and displaying acquisition task execution information;
caching the collected server cluster information into a database cache table;
and packaging and storing the server cluster information cached by the database cache table into the session object.
Optionally, the triggering manner corresponding to the first acquisition manner is: the acquisition time interval from the previous first acquisition mode reaches a preset time interval.
Optionally, the triggering manner corresponding to the second acquisition manner is: and acquiring a control command of the second acquisition mode or server cluster information change input by the user.
Optionally, the method further comprises: and responding to the request of the front-end user, and directly sending the server cluster information stored in the session object to the user interface through the interface.
Optionally, the collecting the task execution information includes: collecting task names, collecting task starting time, collecting task ending time, collecting task execution state, collecting task execution results and collecting task execution failure reasons.
Optionally, the server cluster information includes CPU information, disk information, node information, and device information.
Optionally, the server cluster information cached in the database cache table is updated in real time according to the acquisition result of the first acquisition mode or the second acquisition mode; and packaging and storing the updated server cluster information cached in the database cache table into the session object.
The second aspect of the present invention provides a server cluster information acquisition and caching device, which is applied to a distributed storage system, and includes:
the setting module is used for setting a first acquisition mode and a second acquisition mode to acquire server cluster information and correspondingly executing the first acquisition mode or the second acquisition mode according to different acquisition triggering modes; the first acquisition mode is timing acquisition, and the second acquisition mode is active acquisition;
the monitoring module is used for monitoring the acquisition tasks of the first acquisition mode and the acquisition tasks of the second acquisition mode in real time, and acquiring and displaying acquisition task execution information;
the cache module caches the acquired server cluster information into a database cache table;
and the encapsulation storage module encapsulates and stores the server cluster information cached by the database cache table into the session object.
A third aspect of the present invention provides an electronic device comprising: a memory for storing a computer program; a processor, configured to implement the steps of the server cluster information collecting and caching method according to the first aspect of the present invention when the computer program is executed.
A fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the server cluster information collecting and caching method according to the first aspect of the present invention.
The technical scheme adopted by the invention comprises the following technical effects:
1. according to the invention, the first acquisition mode and the second acquisition mode are set, and the first acquisition mode or the second acquisition mode is correspondingly executed according to different trigger modes, so that the problems that server cluster information acquisition can only wait for timing acquisition and is not high in adaptability in the prior art are effectively solved, the initiative and timeliness of server cluster information acquisition are effectively improved, and the user experience is improved.
2. According to the technical scheme, the execution information of the acquisition task is acquired by monitoring the first acquisition mode and the second acquisition mode in real time, so that the server cluster information acquisition is effectively monitored in real time, a user can know the execution condition of the acquisition task in time conveniently, and the user experience is improved.
3. According to the technical scheme, the server cluster information cached by the database cache table is packaged and stored in the session object, when a front-end user requests, the server cluster information stored in the session object can be directly sent to the user interface through the interface, the database table does not need to be inquired, the flow is simplified, and the efficiency of server cluster information cache inquiry is improved.
4. In the technical scheme of the invention, the server cluster information cached in the database cache table is updated in real time according to the acquisition result of the first acquisition mode or the second acquisition mode; and the updated server cluster information cached in the database cache table is packaged and stored in the session object, so that the real-time performance and the accuracy of the server cluster cache information acquired by user query are further ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without any creative effort.
FIG. 1 is a schematic flow diagram of a process according to an embodiment of the present invention;
FIG. 2 is another schematic flow diagram of a process according to an embodiment of the present invention;
FIG. 3 is a schematic view showing the structure of an apparatus according to a second embodiment of the present invention;
FIG. 4 is another schematic structural diagram of an apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a third apparatus in an embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Example one
As shown in fig. 1, the present invention provides a server cluster information collection and caching method, which is applied to a distributed storage system, and includes:
s1, setting a first acquisition mode and a second acquisition mode to acquire server cluster information, and executing the first acquisition mode or the second acquisition mode correspondingly according to different acquisition trigger modes; the first acquisition mode is timing acquisition, and the second acquisition mode is active acquisition;
s2, monitoring the acquisition tasks of the first acquisition mode and the acquisition tasks of the second acquisition mode in real time, and acquiring and displaying acquisition task execution information;
s3, caching the collected server cluster information into a database cache table;
and S4, packaging and storing the server cluster information cached by the database cache table into the session object.
In step S1, the trigger manner corresponding to the first acquisition manner may be: the acquisition time interval from the previous first acquisition mode reaches a preset time interval. The triggering mode corresponding to the second acquisition mode may be: and acquiring a control command of the second acquisition mode or server cluster information change input by the user.
Specifically, the first-mode acquisition is to start a timing task process on a background server to issue acquisition tasks, where the process exists all the time, and issue the acquisition tasks according to a timing task rule set by each acquisition task, and execute the acquisition tasks at a specified time, for example, the acquisition tasks are acquired once every 5 minutes or once every one hour, the setting of the acquisition intervals needs to consider the activity degree of data, if the data is updated slowly, the increase of the timing task interval time can be considered, otherwise, the timing task interval time is reduced, and after the acquisition of the server cluster information acquired by the first-mode acquisition is completed, the acquired server cluster information is placed in a database cache table.
The second collection mode is active collection, which means to provide for a front-end user interface, a user can actively control the sending of collection tasks of the second collection mode, the second collection mode is mainly set for collection tasks with long time intervals, such as cluster information after expansion and contraction, if no active collection interface is available, the user can wait for the execution of timing tasks, thus the real-time performance of the information is poor, the user experience is not good, and the user can operate (click a refresh button to form a control command) on a user management interface after the interface is provided to actively control the sending of collection tasks, immediately send the collection of server cluster information, and improve the experience of the user. The server cluster information may include CPU information, disk information, node information, and device information.
In step S2, monitoring the acquisition task of the first acquisition mode and the acquisition task of the second acquisition mode in real time, and acquiring and displaying acquisition task execution information; collecting task execution information may include: collecting task names, task starting time, task ending time, task execution state, task execution results and task execution failure reasons; when the collection task is finished, the collection task monitoring record is updated, and the collection task state is updated. If the collection fails, the collection error information is recorded, and finally, the collection log is recorded into a database table to form a monitoring log for a user to monitor the execution condition of the collection task; the user can accurately know the information acquisition condition, and the experience of the user is improved.
In steps S3-S4, the collected server cluster information is cached in the database cache table, and the information is used by the subsequent user to obtain the information from the database cache table instead of collecting the information again. On the basis of obtaining server cluster information data from a database cache table originally, a session cache server cluster information acquisition function is added, namely, the server cluster information data in the database cache table is packaged and stored into a session (session control, session objects store attributes and configuration information required by a specific user session), and the session information is updated when an acquisition task is executed and a user logs in, so that the process that a java interface is called through a front end originally and then the java interface obtains the database cache table information through python is simplified into the process that the java interface is directly called by the front end to obtain the server cluster information cache data in the session object, the database cache table is not required to be inquired, the process is simplified, and the efficiency of inquiring and obtaining the server cluster information cache is improved.
Further, as shown in fig. 2, the technical solution of the present invention further provides a server cluster information acquisition caching method, further including: and S5, responding to the request of the front-end user, and directly sending the server cluster information stored in the session object to the user interface through the interface.
In steps S3-S5, the server cluster information cached in the database cache table is updated in real time correspondingly according to the acquisition result of the first acquisition mode or the second acquisition mode; and after updating, packaging and storing the updated server cluster information cached in the database cache table into the session object.
It should be noted that, in the technical solution of the present invention, steps S1-S5 may all be implemented by hardware or software language programming, and the implementation idea corresponds to the steps of the present invention, and may also be implemented by other manners, which is not limited herein.
According to the invention, the first acquisition mode and the second acquisition mode are set, and the first acquisition mode or the second acquisition mode is correspondingly executed according to different trigger modes, so that the problems that server cluster information acquisition can only wait for timing acquisition and is not high in adaptability in the prior art are effectively solved, the initiative and timeliness of server cluster information acquisition are effectively improved, and the user experience is improved.
According to the technical scheme, the execution information of the acquisition task is acquired by monitoring the first acquisition mode and the second acquisition mode in real time, so that the server cluster information acquisition is effectively monitored in real time, a user can know the execution condition of the acquisition task in time conveniently, and the user experience is improved.
According to the technical scheme, the server cluster information cached by the database cache table is packaged and stored in the session object, when a front-end user requests, the server cluster information stored in the session object can be directly sent to the user interface through the interface, the database table does not need to be inquired, the flow is simplified, and the efficiency of server cluster information cache inquiry is improved.
In the technical scheme of the invention, the server cluster information cached in the database cache table is updated in real time according to the acquisition result of the first acquisition mode or the second acquisition mode; and the updated server cluster information cached in the database cache table is packaged and stored in the session object, so that the real-time performance and the accuracy of the server cluster cache information acquired by user query are further ensured.
Example two
As shown in fig. 3, the technical solution of the present invention further provides a server cluster information collection and caching device, which is applied to a distributed storage system, and includes:
the setting module 101 is used for setting a first acquisition mode and a second acquisition mode to acquire server cluster information and correspondingly executing the first acquisition mode or the second acquisition mode according to different acquisition trigger modes; the first acquisition mode is timing acquisition, and the second acquisition mode is active acquisition;
the monitoring module 102 is used for monitoring the acquisition tasks of the first acquisition mode and the acquisition tasks of the second acquisition mode in real time, and acquiring and displaying acquisition task execution information;
the caching module 103 is used for caching the acquired server cluster information into a database caching table;
and the encapsulation storage module 104 is used for encapsulating and storing the server cluster information cached by the database cache table into the session object.
In the setting module 101, the trigger mode corresponding to the first acquisition mode may be: the acquisition time interval from the previous first acquisition mode reaches a preset time interval. The triggering mode corresponding to the second acquisition mode may be: and acquiring a control command of the second acquisition mode or server cluster information change input by the user.
Specifically, the first-mode acquisition is to start a timing task process on a background server to issue acquisition tasks, where the process exists all the time, and issue the acquisition tasks according to a timing task rule set by each acquisition task, and execute the acquisition tasks at a specified time, for example, the acquisition tasks are acquired once every 5 minutes or once every one hour, the setting of the acquisition intervals needs to consider the activity degree of data, if the data is updated slowly, the increase of the timing task interval time can be considered, otherwise, the timing task interval time is reduced, and after the acquisition of the server cluster information acquired by the first-mode acquisition is completed, the acquired server cluster information is placed in a database cache table.
The second collection mode is active collection, which means to provide for a front-end user interface, a user can actively control the sending of collection tasks of the second collection mode, the second collection mode is mainly set for collection tasks with long time intervals, such as cluster information after expansion and contraction, if no active collection interface is available, the user can wait for the execution of timing tasks, thus the real-time performance of the information is poor, the user experience is not good, and the user can operate (click a refresh button to form a control command) on a user management interface after the interface is provided to actively control the sending of collection tasks, immediately send the collection of server cluster information, and improve the experience of the user. The server cluster information may include CPU information, disk information, node information, and device information.
In the monitoring module 102, the acquisition tasks of the first acquisition mode and the acquisition tasks of the second acquisition mode are monitored in real time, and acquisition task execution information is acquired and displayed; collecting task execution information may include: collecting task names, task starting time, task ending time, task execution state, task execution results and task execution failure reasons; when the collection task is finished, the collection task monitoring record is updated, and the collection task state is updated. If the collection fails, the collection error information is recorded, and finally, the collection log is recorded into a database table to form a monitoring log for a user to monitor the execution condition of the collection task; the user can accurately know the information acquisition condition, and the experience of the user is improved.
In the caching module 103 and the encapsulation storage module 104, the collected server cluster information is cached in the database cache table, and a subsequent user may obtain the information from the database cache table instead of collecting the information again. On the basis of obtaining server cluster information data from a database cache table originally, a session cache server cluster information acquisition function is added, namely, the server cluster information data in the database cache table is packaged and stored into a session (session control, session objects store attributes and configuration information required by a specific user session), and the session information is updated when an acquisition task is executed and a user logs in, so that the process that a java interface is called through a front end originally and then the java interface obtains the database cache table information through python is simplified into the process that the java interface is directly called by the front end to obtain the server cluster information cache data in the session object, the database cache table is not required to be inquired, the process is simplified, and the efficiency of inquiring and obtaining the server cluster information cache is improved.
Further, as shown in fig. 4, the technical solution of the present invention further provides a server cluster information collection and caching device, further comprising:
the response sending module 105 responds to the request of the front-end user, and directly sends the server cluster information stored in the session object to the user interface through the interface.
In the cache module 103, the encapsulation storage module 104 and the response sending module 105, the server cluster information cached in the database cache table is correspondingly updated in real time according to the acquisition result of the first acquisition mode or the second acquisition mode; and after updating, packaging and storing the updated server cluster information cached in the database cache table into the session object.
According to the invention, the first acquisition mode and the second acquisition mode are set, and the first acquisition mode or the second acquisition mode is correspondingly executed according to different trigger modes, so that the problems that server cluster information acquisition can only wait for timing acquisition and is not high in adaptability in the prior art are effectively solved, the initiative and timeliness of server cluster information acquisition are effectively improved, and the user experience is improved.
According to the technical scheme, the execution information of the acquisition task is acquired by monitoring the first acquisition mode and the second acquisition mode in real time, so that the server cluster information acquisition is effectively monitored in real time, a user can know the execution condition of the acquisition task in time conveniently, and the user experience is improved.
According to the technical scheme, the server cluster information cached by the database cache table is packaged and stored in the session object, when a front-end user requests, the server cluster information stored in the session object can be directly sent to the user interface through the interface, the database table does not need to be inquired, the flow is simplified, and the efficiency of server cluster information cache inquiry is improved.
In the technical scheme of the invention, the server cluster information cached in the database cache table is updated in real time according to the acquisition result of the first acquisition mode or the second acquisition mode; and the updated server cluster information cached in the database cache table is packaged and stored in the session object, so that the real-time performance and the accuracy of the server cluster cache information acquired by user query are further ensured.
EXAMPLE III
As shown in fig. 5, the present invention further provides an electronic device, including: a memory 201 for storing a computer program; the processor 202 is configured to implement the steps of the server cluster information collecting and caching method according to the first embodiment when the computer program is executed.
The memory 201 in the embodiments of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device. It will be appreciated that the memory 201 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a flash Memory (flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 201 described in embodiments herein is intended to comprise, without being limited to, these and any other suitable types of memory. The method disclosed in the embodiments of the present application may be applied to the processor 202, or implemented by the processor 202. The processor 202 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 202. The processor 202 may be a general-purpose processor, a DSP (Digital Signal Processing, i.e., a chip capable of implementing Digital Signal Processing), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. Processor 202 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 201, and the processor 202 reads the program in the memory 201 and performs the steps of the foregoing method in combination with its hardware. When the processor 202 executes the program, the corresponding processes in the methods according to the embodiments of the present application are realized, and for brevity, are not described herein again.
According to the invention, the first acquisition mode and the second acquisition mode are set, and the first acquisition mode or the second acquisition mode is correspondingly executed according to different trigger modes, so that the problems that server cluster information acquisition can only wait for timing acquisition and is not high in adaptability in the prior art are effectively solved, the initiative and timeliness of server cluster information acquisition are effectively improved, and the user experience is improved.
According to the technical scheme, the execution information of the acquisition task is acquired by monitoring the first acquisition mode and the second acquisition mode in real time, so that the server cluster information acquisition is effectively monitored in real time, a user can know the execution condition of the acquisition task in time conveniently, and the user experience is improved.
According to the technical scheme, the server cluster information cached by the database cache table is packaged and stored in the session object, when a front-end user requests, the server cluster information stored in the session object can be directly sent to the user interface through the interface, the database table does not need to be inquired, the flow is simplified, and the efficiency of server cluster information cache inquiry is improved.
In the technical scheme of the invention, the server cluster information cached in the database cache table is updated in real time according to the acquisition result of the first acquisition mode or the second acquisition mode; and the updated server cluster information cached in the database cache table is packaged and stored in the session object, so that the real-time performance and the accuracy of the server cluster cache information acquired by user query are further ensured.
Example four
The technical solution of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the server cluster information collecting and caching method according to the first embodiment are implemented.
For example, comprising a memory 201 storing a computer program executable by a processor 202 for performing the steps of the method as described above. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code. Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
According to the invention, the first acquisition mode and the second acquisition mode are set, and the first acquisition mode or the second acquisition mode is correspondingly executed according to different trigger modes, so that the problems that server cluster information acquisition can only wait for timing acquisition and is not high in adaptability in the prior art are effectively solved, the initiative and timeliness of server cluster information acquisition are effectively improved, and the user experience is improved.
According to the technical scheme, the execution information of the acquisition task is acquired by monitoring the first acquisition mode and the second acquisition mode in real time, so that the server cluster information acquisition is effectively monitored in real time, a user can know the execution condition of the acquisition task in time conveniently, and the user experience is improved.
According to the technical scheme, the server cluster information cached by the database cache table is packaged and stored in the session object, when a front-end user requests, the server cluster information stored in the session object can be directly sent to the user interface through the interface, the database table does not need to be inquired, the flow is simplified, and the efficiency of server cluster information cache inquiry is improved.
In the technical scheme of the invention, the server cluster information cached in the database cache table is updated in real time according to the acquisition result of the first acquisition mode or the second acquisition mode; and the updated server cluster information cached in the database cache table is packaged and stored in the session object, so that the real-time performance and the accuracy of the server cluster cache information acquired by user query are further ensured.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (10)

1. A server cluster information acquisition and caching method is applied to a distributed storage system and is characterized by comprising the following steps:
setting a first acquisition mode and a second acquisition mode to acquire server cluster information, and correspondingly executing the first acquisition mode or the second acquisition mode according to different acquisition trigger modes; the first acquisition mode is timing acquisition, and the second acquisition mode is active acquisition;
monitoring the acquisition tasks of the first acquisition mode and the acquisition tasks of the second acquisition mode in real time, and acquiring and displaying acquisition task execution information;
caching the collected server cluster information into a database cache table;
and packaging and storing the server cluster information cached by the database cache table into the session object.
2. The server cluster information acquisition caching method according to claim 1, wherein the triggering mode corresponding to the first acquisition mode is: the acquisition time interval from the previous first acquisition mode reaches a preset time interval.
3. The server cluster information acquisition caching method according to claim 1, wherein the triggering mode corresponding to the second acquisition mode is: and acquiring a control command of the second acquisition mode or server cluster information change input by the user.
4. The server cluster information collection caching method of claim 1, further comprising: and responding to the request of the front-end user, and directly sending the server cluster information stored in the session object to the user interface through the interface.
5. The server cluster information collection and caching method according to any one of claims 1 to 4, wherein collecting task execution information comprises: collecting task names, collecting task starting time, collecting task ending time, collecting task execution state, collecting task execution results and collecting task execution failure reasons.
6. The server cluster information collection and caching method according to any one of claims 1 to 4, wherein the server cluster information includes CPU information, disk information, node information, and device information.
7. The server cluster information acquisition and caching method according to any one of claims 1 to 4, wherein the server cluster information cached in the database cache table is updated in real time according to the acquisition result of the first acquisition mode or the second acquisition mode; and packaging and storing the updated server cluster information cached in the database cache table into the session object.
8. A server cluster information acquisition and caching device is applied to a distributed storage system and is characterized by comprising:
the setting module is used for setting a first acquisition mode and a second acquisition mode to acquire server cluster information and correspondingly executing the first acquisition mode or the second acquisition mode according to different acquisition triggering modes; the first acquisition mode is timing acquisition, and the second acquisition mode is active acquisition;
the monitoring module is used for monitoring the acquisition tasks of the first acquisition mode and the acquisition tasks of the second acquisition mode in real time, and acquiring and displaying acquisition task execution information;
the cache module caches the acquired server cluster information into a database cache table;
and the encapsulation storage module encapsulates and stores the server cluster information cached by the database cache table into the session object.
9. An electronic device, comprising: a memory for storing a computer program; a processor for implementing the steps of the server cluster information collection caching method according to any one of claims 1 to 7 when executing the computer program.
10. 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 server cluster information collection caching method according to any one of claims 1 to 7.
CN202110737858.6A 2021-06-30 2021-06-30 Server cluster information acquisition and caching method, device, equipment and medium Pending CN113590414A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110737858.6A CN113590414A (en) 2021-06-30 2021-06-30 Server cluster information acquisition and caching method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110737858.6A CN113590414A (en) 2021-06-30 2021-06-30 Server cluster information acquisition and caching method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113590414A true CN113590414A (en) 2021-11-02

Family

ID=78245220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110737858.6A Pending CN113590414A (en) 2021-06-30 2021-06-30 Server cluster information acquisition and caching method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113590414A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401289A (en) * 2021-12-31 2022-04-26 深圳市麦谷科技有限公司 Task batch uploading method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954324A (en) * 2014-03-26 2015-09-30 阿里巴巴集团控股有限公司 Session disaster recovery method and device thereof
WO2015196369A1 (en) * 2014-06-24 2015-12-30 华为技术有限公司 Distributed cache control method and apparatus
CN105635279A (en) * 2015-12-29 2016-06-01 长城信息产业股份有限公司 Distributed monitor system and data acquisition method thereof
CN106713391A (en) * 2015-11-13 2017-05-24 北京新媒传信科技有限公司 Session information sharing method and sharing system
CN107395443A (en) * 2017-08-31 2017-11-24 郑州云海信息技术有限公司 A kind of distributed type assemblies management method, apparatus and system
CN108696581A (en) * 2018-05-07 2018-10-23 上海智臻智能网络科技股份有限公司 Caching method, device, computer equipment and the storage medium of distributed information
CN109714192A (en) * 2018-11-29 2019-05-03 深圳供电局有限公司 A kind of monitoring method and system monitoring cloud platform
CN110012098A (en) * 2019-04-04 2019-07-12 浙江工业大学 A kind of web high concurrent access process system and method
CN112286755A (en) * 2020-09-24 2021-01-29 曙光信息产业股份有限公司 Cluster server out-of-band data acquisition method and device and computer equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954324A (en) * 2014-03-26 2015-09-30 阿里巴巴集团控股有限公司 Session disaster recovery method and device thereof
WO2015196369A1 (en) * 2014-06-24 2015-12-30 华为技术有限公司 Distributed cache control method and apparatus
CN106713391A (en) * 2015-11-13 2017-05-24 北京新媒传信科技有限公司 Session information sharing method and sharing system
CN105635279A (en) * 2015-12-29 2016-06-01 长城信息产业股份有限公司 Distributed monitor system and data acquisition method thereof
CN107395443A (en) * 2017-08-31 2017-11-24 郑州云海信息技术有限公司 A kind of distributed type assemblies management method, apparatus and system
CN108696581A (en) * 2018-05-07 2018-10-23 上海智臻智能网络科技股份有限公司 Caching method, device, computer equipment and the storage medium of distributed information
CN109714192A (en) * 2018-11-29 2019-05-03 深圳供电局有限公司 A kind of monitoring method and system monitoring cloud platform
CN110012098A (en) * 2019-04-04 2019-07-12 浙江工业大学 A kind of web high concurrent access process system and method
CN112286755A (en) * 2020-09-24 2021-01-29 曙光信息产业股份有限公司 Cluster server out-of-band data acquisition method and device and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHI X.等: "A PnP Scheduling Algorithm and Cache Replacement Algorithm Simulation Platform for Web Server Cluster", 2012 FOURTH INTERNATIONAL CONFERENCE ON COMPUTATIONAL AND INFORMATION SCIENCES, 13 September 2012 (2012-09-13) *
黎子晨;: "在集群环境中对象关系模型缓存一致性设计", 物联网技术, no. 08, 20 August 2017 (2017-08-20) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401289A (en) * 2021-12-31 2022-04-26 深圳市麦谷科技有限公司 Task batch uploading method and system

Similar Documents

Publication Publication Date Title
CN111464615B (en) Request processing method, device, server and storage medium
US20200357007A1 (en) Page data acquisition method, apparatus, server, electronic device and computer readable medium
US7292961B2 (en) Capturing session activity as in-memory snapshots using a time-based sampling technique within a database for performance tuning and problem diagnosis
US20080098358A1 (en) Method and system for providing a common structure for trace data
CN114519156A (en) Webpage display method, operation event recording method and device
CN110795311B (en) Event playback method and device
CN111083008A (en) Nginx-based traffic collection and analysis method
CN113590414A (en) Server cluster information acquisition and caching method, device, equipment and medium
CN115580607A (en) Lottery system link monitoring method, device and system
CN112433921A (en) Method and apparatus for dynamic point burying
CN112433964B (en) Method and equipment for cleaning cache dirty data
CN113886426A (en) Data query method and device, computer equipment and storage medium
US10430115B2 (en) System and method for optimizing multiple packaging operations in a storage system
CN112612678A (en) Zero-intrusion monitoring method and system based on byte code technology
CN112149038A (en) Browser development method and device, computer equipment and readable storage medium
CN113297245A (en) Method and device for acquiring execution information
CN104317820B (en) Statistical method and device for report forms
CN110674171A (en) Script generation method and device and data processing method and device
US9088463B1 (en) Container contract for data dependencies
CN108228613B (en) Data reading method and device
CN115686904A (en) Webpage diagnosis method, equipment and system
CN106940660B (en) Method and device for realizing cache
CN113868005A (en) Method and device for monitoring webpage abnormity
CN113268507A (en) Database data reading system, method and device and electronic equipment
CN111786849A (en) Monitoring method, device and system of domain name server and computer equipment

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