Jboss cache cleaning method and device

By regularly cleaning and restarting Jboss services during the development stage, the performance degradation and file permission errors caused by the long-term operation of the Jboss server are solved, and the stable operation and efficient cache management of the Jboss server are achieved.

CN113722018BActive Publication Date: 2025-03-21BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111088821.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-16
Publication Date
2025-03-21
Estimated Expiration
2041-09-16

AI Technical Summary

Technical Problem

During the development stage, the Jboss server needs to be restarted regularly after running for a long time to free resources, otherwise there will be problems such as running too slowly, and the lack of automatic Jboss cache cleaning methods, resulting in file permission errors and insufficient space.

Method used

During the first preset period of every day, you can obtain multiple idle Jboss services in the Linux system, use root user permission to stop the Jboss service process, correct file permissions, archive and delete logs, and finally switch users and restart Jboss service.

Benefits of technology

By regularly cleaning and restarting the Jboss service, the problems of file permission errors and insufficient space are solved, ensuring that the Jboss server runs stably and avoiding performance degradation caused by long-term operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722018B_ABST
    Figure CN113722018B_ABST
Patent Text Reader

Abstract

The present invention provides a Jboss cache cleaning method and device, which can be used in the field of distributed technology. The method comprises: in the first preset period of each day, obtaining multiple idle Jboss services in a Linux system; for each idle Jboss service, using the root user authority of the Linux system to stop the Jboss service process; using the root user authority to modify the files involved in the Jboss service to the authority of the Jboss service user; archiving the logs in the Jboss service cache to a target server; using the root user authority to delete the logs in the Jboss service cache; switching the root user to the Jboss user, and starting the Jboss service process. The present invention can realize Jboss cache cleaning, with high efficiency and convenient application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed technology, and in particular to a Jboss cache cleaning method and device. Background Art

[0002] During the development phase, before functional testing, the developed version needs to be deployed and tested in the development environment. However, during the development phase, there are no dedicated maintenance personnel, and all development environment maintenance needs to be performed by developers at the same time. For developers who are not familiar with the environment system, the maintenance workload is heavy and it is difficult to locate problems when they arise.

[0003] The Linux operating system has a strict user permission mechanism. Developers who are not familiar with it often use the root user to start the system, which results in abnormal startup or operation at the next startup. For example, the log directory is modified to the root user, and the Jboss user cannot write to it. In addition, after the Jboss server has been running for a long time, it needs to be restarted regularly to release resources, otherwise it will run too slowly and other problems. However, there is currently no automatic Jboss cache cleaning method. Summary of the invention

[0004] The embodiment of the present invention provides a Jboss cache cleaning method, which is used to implement Jboss cache cleaning, has high efficiency and is easy to use. The method includes:

[0005] In the first preset period of each day, multiple idle Jboss services in the Linux system are obtained;

[0006] For each idle Jboss service, use the root user privileges of the Linux system to stop the Jboss service process;

[0007] Use the root user's authority to modify the files related to the Jboss service to the authority of the Jboss service user;

[0008] Archive the logs in the Jboss service cache to the target server;

[0009] Use the root user authority to delete the logs in the Jboss service cache;

[0010] Switch the root user to the Jboss user, and start the Jboss service process.

[0011] The embodiment of the present invention provides a Jboss cache cleaning device, which is used to implement Jboss cache cleaning, has high efficiency and is easy to use. The device includes:

[0012] An idle service acquisition module is used to acquire multiple idle Jboss services in the Linux system during the first preset period of each day;

[0013] The process stop module is used to stop the Jboss service process for each idle Jboss service using the root user privileges of the Linux system;

[0014] A file permission modification module, used to modify the files involved in the Jboss service into the permissions of the Jboss service user using the permissions of the root user;

[0015] The log archiving module is used to archive the logs in the Jboss service cache to the target server;

[0016] A cleaning module is used to delete the logs in the Jboss service cache using the root user's authority;

[0017] The process startup module is used to switch the root user to the Jboss user and start the Jboss service process.

[0018] The embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned Jboss cache cleaning method when executing the computer program.

[0019] The embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the Jboss cache cleaning method.

[0020] In an embodiment of the present invention, multiple idle Jboss services in the Linux system are obtained during the first preset period of each day; for each idle Jboss service, the root user authority of the Linux system is used to stop the Jboss service process; the root user authority is used to modify the files involved in the Jboss service to the authority of the Jboss service user; the logs in the Jboss service cache are archived to the target server; the root user authority is used to delete the logs in the Jboss service cache; the root user is switched to the Jboss user, and the Jboss service process is started. In the above process, the idle Jboss services are cleaned up during the first preset period of each day to implement fluctuation processing and ensure that Jboss continues to provide services; the incorrect file permissions are corrected, and the Jboss services are regularly cleaned up and restarted to ensure that Jboss provides services stably and avoid some problems in long-term operation or file permission errors; logs are archived regularly to solve the problem of frequent insufficient space for Jboss services. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0022] Figure 1 This is a flow chart of a Jboss cache cleaning method according to an embodiment of the present invention;

[0023] Figure 2 A flowchart of obtaining an idle Jboss service in an embodiment of the present invention;

[0024] Figure 3 A flowchart of log archiving in an embodiment of the present invention;

[0025] Figure 4 Schematic diagram of a Jboss cache cleaning device in an embodiment of the present invention Figure 1 ;

[0026] Figure 5 Schematic diagram of a Jboss cache cleaning device in an embodiment of the present invention Figure 2 ;

[0027] Figure 6 Schematic diagram of a Jboss cache cleaning device in an embodiment of the present invention Figure 3 ;

[0028] Figure 7 Schematic diagram of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0029] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0030] In the description of this specification, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present application, and the order of steps is not limited and can be appropriately adjusted as needed.

[0031] First, the terms involved in the embodiments of the present invention are explained.

[0032] Development environment: An environment that is deployed and maintained by developers, as opposed to the functional test environment, rehearsal environment, and production environment.

[0033] Linux file operation permissions: Linux file operation permissions include current user permissions, current user group permissions, and other user permissions.

[0034] Jboss: Commercial version of web service.

[0035] Jboss cache: Jboss stores cached temporary directory files, which are the auth, vfs, and work directories under / standalone / tmp.

[0036] Figure 1 FIG. 1 is a flow chart of a Jboss cache cleaning method according to an embodiment of the present invention. Figure 1 As shown, including:

[0037] Step 101, in the first preset time period of each day, obtain multiple idle Jboss services in the Linux system;

[0038] Step 102, for each idle Jboss service, stop the Jboss service process using the root user authority of the Linux system;

[0039] Step 103, using the root user authority to modify the files related to the Jboss service to the authority of the Jboss service user;

[0040] Step 104, archiving the logs in the Jboss service cache to the target server;

[0041] Step 105, using the root user authority to delete the logs in the Jboss service cache;

[0042] Step 106: Switch the root user to the Jboss user, and start the Jboss service process.

[0043] In the embodiment of the present invention, the idle Jboss service is cleaned up during the first preset period of each day to implement fluctuation processing and ensure that Jboss continues to provide services; the erroneous file permissions are corrected, and the Jboss service is cleaned up and restarted regularly to ensure that Jboss provides services stably and avoids some problems in long-term operation or file permission errors; logs are archived regularly to solve the problem of frequent insufficient space of the Jboss service.

[0044] In step 101, a plurality of idle Jboss services in a Linux system are obtained during a first preset period of time every day.

[0045] The first preset time period may be at night, for example, from 0:00 to 8:00 at night, so as to minimize the impact on the Jboss service during the day.

[0046] Figure 2 The flowchart of obtaining an idle Jboss service in an embodiment of the present invention is as follows. In one embodiment, obtaining multiple idle Jboss services in a Linux system includes:

[0047] Step 201, obtaining the Jboss service to be cleaned up on the day in the Linux system;

[0048] Step 202, query through apache connection pool to obtain the Jboss service currently providing services to the outside world;

[0049] Step 203: Delete the Jboss services that are providing services from the Jboss services to be cleared, and delete the Jboss services that are providing services externally from the Jboss services to be cleared on the day, so as to obtain multiple idle Jboss services.

[0050] In the above embodiment, according to the apache load balancing strategy, each Jboss service is generally used once within 2 minutes, so the Jboss service that is currently providing service can be obtained.

[0051] In one embodiment, the method further comprises:

[0052] Poll every first preset time period to obtain the Jboss services that have not been cleaned up and are idle on that day.

[0053] The first preset duration may be 1 hour, depending on actual conditions.

[0054] In step 102, for each idle Jboss service, the Jboss service process is stopped using the root user authority of the Linux system.

[0055] Among them, the root user has higher authority and can forcibly stop the Jboss service process. In one embodiment, after deleting the log in the Jboss service cache using the root user authority, it also includes:

[0056] When the current remaining space of the Jboss service is less than a preset threshold, an early warning message is generated, and the early warning message is used to remind the developer that the Jboss service space is insufficient.

[0057] The preset threshold may be 5G, and the warning information may be sent via email to maintenance and development personnel to manually check the space storage status and perform manual cleanup.

[0058] In step 103, the root user authority is used to modify the files related to the Jboss service into the authority of the Jboss service user.

[0059] The purpose of modifying permissions is to restore the correct permissions of files involved in the Jboss service.

[0060] In step 104, the logs in the Jboss service cache are archived to the target server.

[0061] Figure 3 This is a flow chart of log archiving in an embodiment of the present invention. In one embodiment, the logs in the Jboss service cache are archived to the target server, including:

[0062] Step 301, check the current remaining space of the target server;

[0063] Step 302, determining the number of days of logs that can be archived based on the current remaining space;

[0064] Step 303: Archive the logs of the number of days that can be archived to the target server.

[0065] For example, if the current free space is greater than or equal to 20G, archive the logs from 7 days ago.

[0066] If the current remaining space is less than 20G and greater than or equal to 10G, archive the logs from 3 days ago.

[0067] If the current remaining space is less than 10G, archive the logs from 1 day ago.

[0068] Step 105: Use the root user authority to delete the logs in the Jboss service cache.

[0069] Specifically, the logs in the auth, vfs, and work directories under / standalone / tmp are deleted.

[0070] Step 106: Switch the root user to the Jboss user, and start the Jboss service process.

[0071] In one embodiment, the method further comprises:

[0072] After all Jboss services to be cleaned up on the day are cleaned up and started, query the apache list to obtain all Jboss services, query the management console list to check the Jboss services that are connected normally, and for the Jboss services in the management console list, poll and send a getIP http request to apache. If the IP of the Jboss service that exists in the apache list and the management console list is obtained within a second preset time period, it is determined that the Jboss service is normal; otherwise, repeat steps 101-106 for the Jboss service corresponding to the IP that does not exist in the management console list or the Jboss service that does not return the IP when sending getIP. If the Jboss service that did not return the IP still does not return the IP after the number of repetitions reaches the set number threshold, a cleanup error report is generated.

[0073] The above is the process of smoke testing. For example, if the polling is sent once every 5 seconds within 2 minutes, and all IPs are returned within 2 minutes, then the Jboss service is providing services normally. The setting threshold can be 3 times, and the cleanup error report is used to send to the maintenance personnel.

[0074] In one embodiment, the method further comprises:

[0075] During the second preset period of each day, a getIP http request is sent to apache every third preset time. If there is a Jboss service that does not return an IP, steps 101-106 are repeated for the Jboss service that does not return an IP. If the Jboss service that does not return an IP still does not return an IP after the number of repetitions reaches the set threshold, a warning message is generated.

[0076] The second preset period may be during the day, such as 8:00-18:00, for daily monitoring. The warning message may indicate the reason. If it is due to insufficient Jboss service space, the reason may be "insufficient space", otherwise it may be "unclear reason for startup abnormality".

[0077] In one embodiment, the method further comprises:

[0078] When debug-level logs exist in the target server, a warning message is generated to remind the developer to adjust the log level. If the developer thinks the log level is not correct, he can check whether the Jboss service is abnormal.

[0079] In summary, in the method proposed in the embodiment of the present invention, multiple idle Jboss services in the Linux system are obtained during the first preset period of each day; for each idle Jboss service, the root user authority of the Linux system is used to stop the Jboss service process; the root user authority is used to modify the files involved in the Jboss service to the authority of the Jboss service user; the logs in the Jboss service cache are archived to the target server; the root user authority is used to delete the logs in the Jboss service cache; the root user is switched to the Jboss user to start the Jboss service process. In the above process, the idle Jboss services are cleaned up during the first preset period of each day to implement fluctuation processing and ensure that Jboss continues to provide services; the incorrect file permissions are corrected, and the Jboss services are regularly cleaned up and restarted to ensure that Jboss provides services stably and avoid some problems in long-term operation or file permission errors; logs are archived regularly to solve the problem of frequent insufficient space for Jboss services.

[0080] The present invention also proposes a Jboss cache cleaning device, the principle of which is the same as that of the Jboss cache cleaning method, which will not be repeated here.

[0081] Figure 4 Schematic diagram of a Jboss cache cleaning device in an embodiment of the present invention Figure 1 ,like Figure 4 As shown, including:

[0082] The idle service acquisition module 401 is used to acquire a plurality of idle Jboss services in the Linux system during the first preset period of each day;

[0083] The process stopping module 402 is used to stop the Jboss service process for each idle Jboss service using the root user authority of the Linux system;

[0084] The file permission modification module 403 is used to modify the files involved in the Jboss service into the permissions of the Jboss service user by using the root user permissions;

[0085] The log archiving module 404 is used to archive the logs in the Jboss service cache to the target server;

[0086] Cleaning module 405, used to delete the logs in the Jboss service cache using the root user authority;

[0087] The process starting module 406 is used to switch the root user to the Jboss user and start the Jboss service process.

[0088] In one embodiment, the idle service acquisition module is specifically used to:

[0089] Get the Jboss services to be cleaned up on the Linux system that day;

[0090] Through the connection test with Apache, obtain the Jboss service that is currently providing services;

[0091] From the Jboss services to be cleaned up, delete the Jboss services that are providing services to obtain idle Jboss services.

[0092] In one embodiment, the idle service acquisition module is further used to:

[0093] Poll every first preset time period to obtain the Jboss services that have not been cleaned up and are idle on that day.

[0094] Figure 5 Schematic diagram of a Jboss cache cleaning device in an embodiment of the present invention Figure 2 In one embodiment, the device further includes an abnormality monitoring module 501, which is used to:

[0095] After all Jboss services to be cleaned up on the day are cleaned up and started, query the apache list to obtain all Jboss services, query the management console list to check the Jboss services that are connected normally, and for the Jboss services in the management console list, poll and send a getIP http request to apache. If the IP of the Jboss service that exists in the apache list and the management console list is obtained within a second preset time period, it is determined that the Jboss service is normal; otherwise, repeat steps 101-106 for the Jboss service corresponding to the IP that does not exist in the management console list or the Jboss service that does not return the IP when sending getIP. If the Jboss service that did not return the IP still does not return the IP after the number of repetitions reaches the set number threshold, a cleanup error report is generated.

[0096] In one embodiment, the abnormality monitoring module 501 is further used for:

[0097] During the second preset period of each day, a getIP http request is sent to apache every third preset time. If there is a Jboss service that does not return an IP, steps 101-106 are repeated for the Jboss service that does not return an IP. If the Jboss service that does not return an IP still does not return an IP after the number of repetitions reaches the set threshold, a warning message is generated.

[0098] In one embodiment, the log archiving module is specifically used for:

[0099] Check the current free space of the target server;

[0100] Determine the number of days of logs that can be archived based on the current remaining space;

[0101] Archive the logs of the number of days that can be archived to the target server.

[0102] In one embodiment, the abnormality monitoring module 501 is further used for:

[0103] When the current remaining space of the Jboss service is less than a preset threshold, an early warning message is generated, and the early warning message is used to remind the developer that the Jboss service space is insufficient.

[0104] Figure 6 Schematic diagram of a Jboss cache cleaning device in an embodiment of the present invention Figure 3 In one embodiment, the device further includes a target server monitoring module 601, which is used to:

[0105] When debug-level logs exist in the target server, a warning message is generated, and the warning message is used to remind the developer to handle the log level.

[0106] In summary, in the method and device proposed in the embodiment of the present invention, the idle service acquisition module is used to obtain multiple idle Jboss services in the Linux system during the first preset period of each day; the process stop module is used to stop the Jboss service process for each idle Jboss service using the root user authority of the Linux system; the file permission modification module is used to modify the files involved in the Jboss service to the authority of the Jboss service user using the root user authority; the log archiving module is used to archive the logs in the Jboss service cache to the target server; the cleaning module is used to delete the logs in the Jboss service cache using the root user authority; the process start module is used to switch the root user to the Jboss user and start the Jboss service process. In the above process, the idle Jboss services are cleaned up during the first preset period of each day to achieve fluctuation processing and ensure that Jboss continues to provide services; the wrong file permissions are corrected, the Jboss services are cleaned up and restarted regularly to ensure that Jboss provides services stably and avoid some problems in long-term operation or file permission errors; regular log archiving solves the problem of insufficient space for Jboss services.

[0107] An embodiment of the present invention further provides a computer device, Figure 7 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device can implement all the steps in the Jboss cache cleaning method in the above embodiment. The computer device specifically includes the following contents:

[0108] Processor (processor) 701, memory (memory) 702, communication interface (CommunicationsInterface) 703 and communication bus 704;

[0109] The processor 701, the memory 702, and the communication interface 703 communicate with each other through the communication bus 704; the communication interface 703 is used to realize information transmission between relevant devices such as the server-side device, the detection device, and the user-side device;

[0110] The processor 701 is used to call the computer program in the memory 702, and when the processor executes the computer program, all the steps in the Jboss cache cleaning method in the above embodiment are implemented.

[0111] An embodiment of the present invention further provides a computer-readable storage medium, which can implement all the steps in the Jboss cache cleaning method in the above embodiment. The computer-readable storage medium stores a computer program, which implements all the steps of the Jboss cache cleaning method in the above embodiment when executed by a processor.

[0112] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0116] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A Jboss cache cleaning method, characterized in that: include: Step 101, in the first preset time period of each day, obtain multiple idle Jboss services in the Linux system; Step 102, for each idle Jboss service, stop the Jboss service process using the root user authority of the Linux system; Step 103, using the root user authority to modify the files related to the Jboss service to the authority of the Jboss service user; Step 104, archiving the logs in the Jboss service cache to the target server; Step 105, using the root user authority to delete the logs in the Jboss service cache; Step 106, switching the root user to the Jboss user, and starting the Jboss service process; Get multiple idle Jboss services in the Linux system, including: get the Jboss services to be cleaned up on the day in the Linux system; get the Jboss services currently providing services to the outside through Apache connection pool query; From the Jboss services to be cleaned up that day, delete the Jboss services that provide external services to obtain multiple idle Jboss services; The method further includes: polling every first preset time period to obtain Jboss services that have not been cleaned up and are idle on that day; The method further includes: after all Jboss services to be cleaned up on the day are cleaned up and started, querying the apache list to obtain all Jboss services, querying the management console list to check the Jboss services that are connected normally, and for the Jboss services in the management console list, polling and sending a getIP http request to apache, if the IP of the Jboss service that exists in the apache list and the management console list is obtained within a second preset time period, it is determined that the Jboss service is normal; otherwise, repeating steps 101-106 for the Jboss service corresponding to the IP that does not exist in the management console list or the Jboss service that does not return the IP when sending getIP, and if the Jboss service that did not return the IP still does not return the IP after the number of repetitions reaches the set number threshold, a cleaning error report is generated.

2. The Jboss cache cleaning method according to claim 1, characterized in that: Also includes: During the second preset time period of each day, a getIP http request is sent to apache every third preset time period. If there is a Jboss service that does not return an IP, steps 101-106 described in claim 1 are repeatedly executed for the Jboss service that does not return an IP. If the Jboss service that does not return an IP still does not return an IP after the number of repetitions reaches a set threshold, a warning message is generated.

3. The Jboss cache cleaning method according to claim 1, characterized in that: Archive the logs in the Jboss service cache to the target server, including: Check the current free space of the target server; Determine the number of days of logs that can be archived based on the current remaining space; Archive the logs of the number of days that can be archived to the target server.

4. The Jboss cache cleaning method according to claim 1, characterized in that: After deleting the logs in the Jboss service cache using the root user authority, the method further includes: When the current remaining space of the Jboss service is less than a preset threshold, an early warning message is generated, and the early warning message is used to remind the developer that the Jboss service space is insufficient.

5. The Jboss cache cleaning method according to claim 1, characterized in that: Also includes: When debug-level logs exist in the target server, a warning message is generated, and the warning message is used to remind the developer to handle the log level.

6. A Jboss cache cleaning device, characterized in that: include: An idle service acquisition module is used to acquire multiple idle Jboss services in the Linux system during the first preset period of each day; The process stop module is used to stop the Jboss service process for each idle Jboss service using the root user privileges of the Linux system; A file permission modification module, used to modify the files involved in the Jboss service into the permissions of the Jboss service user using the permissions of the root user; The log archiving module is used to archive the logs in the Jboss service cache to the target server; A cleaning module is used to delete the logs in the Jboss service cache using the root user's authority; A process startup module, used to switch the root user to the Jboss user and start the Jboss service process; Get multiple idle Jboss services in the Linux system, including: get the Jboss services to be cleaned up on the day in the Linux system; get the Jboss services currently providing services to the outside through Apache connection pool query; From the Jboss services to be cleaned up that day, delete the Jboss services that provide external services to obtain multiple idle Jboss services; The method further includes: polling every first preset time period to obtain Jboss services that have not been cleaned up and are idle on that day; The method further comprises: after all Jboss services to be cleaned up on the day are cleaned up and started, querying the apache list to obtain all Jboss services, querying the management console list to check the Jboss services that are connected normally, and for the Jboss services in the management console list, polling and sending a getIP http request to apache, and if the IP of the Jboss service that exists in the apache list and the management console list is obtained within a second preset time period, it is determined that the Jboss service is normal; otherwise, repeating steps 101-106 described in claim 1 for the Jboss service corresponding to the IP that does not exist in the management console list or the Jboss service that does not return the IP after sending getIP, and if the Jboss service that did not return the IP still does not return the IP after the number of repetitions reaches the set number threshold, a cleaning error report is generated.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Log management method and system

    CN107870842A