CN113722018A - Jboss cache cleaning method and device - Google Patents

Jboss cache cleaning method and device Download PDF

Info

Publication number
CN113722018A
CN113722018A CN202111088821.1A CN202111088821A CN113722018A CN 113722018 A CN113722018 A CN 113722018A CN 202111088821 A CN202111088821 A CN 202111088821A CN 113722018 A CN113722018 A CN 113722018A
Authority
CN
China
Prior art keywords
jboss
service
cache
services
idle
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
CN202111088821.1A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202111088821.1A priority Critical patent/CN113722018A/en
Publication of CN113722018A publication Critical patent/CN113722018A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention provides a method and a device for cleaning a Jboss cache, which can be used in the field of distributed technology, and the method comprises the following steps: the method comprises the following steps: acquiring a plurality of idle Jboss services in the Linux system in a first preset time period every day; for each idle Jboss service, adopting root user authority of a Linux system to stop the Jboss service process; modifying the file related to the Jboss service into the authority of the Jboss service user by adopting the root user authority; filing the log in the Jboss service cache to a target server; deleting the log in the Jboss service cache by adopting the root user authority; and switching the root user to a Jboss user, and starting the Jboss service process. The invention can realize Jboss cache cleaning, and has high efficiency and convenient application.

Description

Jboss cache cleaning method and device
Technical Field
The invention relates to the technical field of distribution, in particular to a Jboss cache cleaning method and a Jboss cache cleaning system.
Background
In the development stage, before functional testing is entered, the developed version needs to be deployed and tested in the development environment. However, in the development stage, there is no special maintenance personnel, and the maintenance of all the development environments needs to be simultaneously performed by the development personnel, so that the maintenance workload is large for the development personnel who are not familiar with the environmental system, and the positioning is difficult when the problems are encountered.
The Linux operating system has a strict user permission mechanism, developers who do not know often use the root user to start, so that the next start or running is abnormal, and if the log directory is modified to be the root user, the Jboss user cannot write in the log directory. In addition, after the Jboss server runs for a long time, the Jboss server needs to be restarted periodically to release resources, otherwise, the problem of running too slowly occurs. However, there is no automatic Jboss cache cleaning method.
Disclosure of Invention
The embodiment of the invention provides a Jboss cache cleaning method, which is used for realizing Jboss cache cleaning, has high efficiency and convenient application and comprises the following steps:
acquiring a plurality of idle Jboss services in the Linux system in a first preset time period every day;
for each idle Jboss service, adopting root user authority of a Linux system to stop the Jboss service process;
modifying the file related to the Jboss service into the authority of the Jboss service user by adopting the root user authority;
filing the log in the Jboss service cache to a target server;
deleting the log in the Jboss service cache by adopting the root user authority;
and switching the root user to a Jboss user, and starting the Jboss service process.
The embodiment of the invention provides a Jboss cache cleaning device, which is used for realizing Jboss cache cleaning, has high efficiency and convenient application, and comprises:
the system comprises an idle service acquisition module, a service processing module and a service processing module, wherein the idle service acquisition module is used for acquiring a plurality of idle Jboss services in the Linux system in a first preset time period every day;
the process stopping module is used for stopping the Jboss service process for each idle Jboss service by adopting the root user authority of the Linux system;
the file permission correction module is used for modifying the file related to the Jboss service into the permission of the Jboss service user by adopting the root user permission;
the log archiving module is used for archiving the logs in the Jboss service cache to a target server;
the cleaning module is used for deleting the logs in the Jboss service cache by adopting the root user authority;
and the process starting module is used for switching the root user to a Jboss user and starting the Jboss service process.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the Jboss cache cleaning method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above-mentioned method for cleaning a Jboss cache is stored in the computer-readable storage medium.
In the embodiment of the invention, a plurality of idle Jboss services in the Linux system are acquired in a first preset time period every day; for each idle Jboss service, adopting root user authority of a Linux system to stop the Jboss service process; modifying the file related to the Jboss service into the authority of the Jboss service user by adopting the root user authority; filing the log in the Jboss service cache to a target server; deleting the log in the Jboss service cache by adopting the root user authority; and switching the root user to a Jboss user, and starting the Jboss service process. In the process, the idle Jboss service is cleared in the first preset time period every day, the fluctuation processing is realized, and the Jboss service is ensured to continuously provide the service; correcting wrong file authority, regularly cleaning and restarting Jboss service, ensuring that the Jboss stably provides service, and avoiding some problems of long-term operation or wrong file authority; and log archiving is performed regularly, and the problem of frequent insufficient space of the Jboss service is solved.
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 flow chart of a Jboss cache cleaning method according to an embodiment of the present invention;
FIG. 2 is a flowchart of acquiring idle Jboss service according to an embodiment of the present invention;
FIG. 3 is a flow chart of log archiving in an embodiment of the present invention;
FIG. 4 is a first schematic diagram of a Jboss cache cleaning apparatus according to an embodiment of the present invention;
FIG. 5 is a second schematic diagram illustrating a Jboss cache cleaning apparatus according to an embodiment of the present invention;
FIG. 6 is a third schematic diagram of a Jboss cache cleaning device according to an embodiment of the present invention;
FIG. 7 is a diagram of a computer device in an embodiment of the 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.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are used in an open-ended fashion, i.e., to mean including, but not limited to. Reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. 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, 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 embodiments is for illustrative purposes to illustrate the implementation of the present application, and the sequence of steps is not limited and can be adjusted as needed.
First, terms involved in the embodiments of the present invention are explained.
And (3) developing environment: and compared with a functional test environment, a drilling environment and a production environment, the environment deployment and maintenance are performed by developers.
The Linux file operation authority: the linux file operation permission comprises a current user permission, a current user group permission and other user permissions.
Jboss: a commercial version of a web service.
Jboss caching: the Jboss stores the cached temporary directory files, namely auth, vfs and work directories under the/standby/tmp.
Fig. 1 is a flowchart of a method for cleaning a Jboss cache according to an embodiment of the present invention, as shown in fig. 1, including:
step 101, acquiring a plurality of idle Jboss services in a Linux system in a first preset time period every day;
102, for each idle Jboss service, adopting root user authority of a Linux system to stop the Jboss service process;
103, modifying the file related to the Jboss service into the permission of the Jboss service user by adopting the root user permission;
step 104, filing the log in the Jboss service cache to a target server;
105, deleting the log in the Jboss service cache by adopting the root user authority;
and 106, switching the root user to a Jboss user, and starting the Jboss service process.
In the embodiment of the invention, idle Jboss services are cleared up in a first preset time period every day, fluctuation processing is realized, and Jboss continuous service provision is ensured; correcting wrong file authority, regularly cleaning and restarting Jboss service, ensuring that the Jboss stably provides service, and avoiding some problems of long-term operation or wrong file authority; and log archiving is performed regularly, and the problem of frequent insufficient space of the Jboss service is solved.
In step 101, a plurality of idle Jboss services in the Linux system are acquired in a first preset time period of each day.
The first preset time period may be night, for example, 0 o 'clock to 8 o' clock night, so as to minimize the influence of day on the Jboss service.
Fig. 2 is a flowchart illustrating an embodiment of acquiring idle Jboss services, where in an embodiment of the present invention, acquiring multiple idle Jboss services in a Linux system includes:
step 201, acquiring a Jboss service to be cleaned in the same day in a Linux system;
step 202, acquiring a Jboss service of the current externally provided service through apache connection pool query;
step 203, deleting the service-providing Jboss service from the to-be-cleaned Jboss services, and obtaining a plurality of idle Jboss services.
In the above embodiment, each Jboss service is generally used once within 2 minutes according to the apache load balancing policy, and therefore, the Jboss service currently providing the service can be obtained.
In an embodiment, the method further comprises:
polling every a first preset time length to obtain the idle Jboss service which is not cleaned in the day.
The first preset time period may be 1 hour, which is determined according to actual conditions.
In step 102, for each idle Jboss service, the root user authority of the Linux system is adopted to stop the Jboss service process.
Wherein, the root user authority is higher, and the Jboss service process can be forcibly stopped. In an embodiment, after deleting the log in the Jboss service cache by using the root user right, the method further includes:
and when the current residual space of the Jboss service is smaller than a preset threshold value, generating early warning information, wherein the early warning information is used for reminding developers that the Jboss service space is insufficient.
The preset threshold value can be 5G, and the early warning information can be sent to maintenance and development personnel through mails to manually check the space storage condition, so that manual cleaning is carried out.
In step 103, the root user authority is adopted to modify the file related to the Jboss service into the authority of the Jboss service user.
The purpose of modifying the rights is to restore the correct rights to the files involved in the Jboss service.
In step 104, the journal in the Jboss service cache is archived to the target server.
Fig. 3 is a flowchart of log archiving in an embodiment of the present invention, and in an embodiment, archiving the log in the Jboss service cache to the target server includes:
step 301, checking the current remaining space of the target server;
step 302, determining the number of days of logs which can be filed according to the current residual space;
and step 303, archiving the journal of the archivable journal days to a target server.
For example, if the current remaining space is greater than or equal to 20G, the log 7 days ago is archived.
And if the current remaining space is less than 20G and more than or equal to 10G, archiving the log 3 days ago.
If the current remaining space is less than 10G, archiving the log 1 day ago.
And 105, deleting the log in the Jboss service cache by adopting the root user authority.
Specifically, the log in the auth, vfs and work directory under the/standby/tmp is deleted.
And 106, switching the root user to a Jboss user, and starting the Jboss service process.
In an embodiment, the method further comprises:
after the Jboss services to be cleaned are cleaned and started, inquiring an apache list, acquiring all the Jboss services, inquiring a management console list, checking the Jboss services which are communicated normally, polling to send a http request of getIP to the apache aiming at the Jboss services in the management console list, and determining that the Jboss services are normal if the IP of the Jboss services which exist in the apache list and exist in the management console list are acquired within a second preset time length; otherwise, repeating the steps of the method in claim 1 for the Jboss service corresponding to the IP which does not exist in the management console list or the Jboss service which sends getIP and does not return the IP, and generating a cleaning error report if the repeating times reaches a set time threshold value and the Jboss service which does not return the IP still does not return the IP.
The above is the smoke test procedure, for example, when polling is sent once in 5 seconds within 2 minutes, and all IPs are returned within 2 minutes, the service is normally provided by the Jboss service. The set number threshold may be 3 times, with a clean up error report for sending to maintenance personnel.
In an embodiment, the method further comprises:
sending a http request of getIP to an apache every third preset time interval in a second preset time period of each day, if a Jboss service of unreturned IP exists, repeatedly executing the steps of the method of claim 1 on the Jboss service of unreturned IP, and if the repeated times reach a set time threshold value, the Jboss service of unreturned IP still does not return IP, and generating warning information.
The second preset time period may be day, for example, 8: 00-18: 00, aiming at daily monitoring, the warning information can indicate the reason, if the reason is that the Jboss service space is insufficient, the reason indicates that the space is insufficient, otherwise, the reason indicates that the starting is abnormal.
In an embodiment, the method further comprises:
and when the log at the debug level exists in the target server, generating warning information, wherein the warning information is used for reminding a developer to process the log level. If the developer considers that the log level is not correct, the developer can check whether the Jboss service is abnormal or not.
In summary, in the method provided in the embodiment of the present invention, in a first preset time period of each day, a plurality of idle Jboss services in the Linux system are obtained; for each idle Jboss service, adopting root user authority of a Linux system to stop the Jboss service process; modifying the file related to the Jboss service into the authority of the Jboss service user by adopting the root user authority; filing the log in the Jboss service cache to a target server; deleting the log in the Jboss service cache by adopting the root user authority; and switching the root user to a Jboss user, and starting the Jboss service process. In the process, the idle Jboss service is cleared in the first preset time period every day, the fluctuation processing is realized, and the Jboss service is ensured to continuously provide the service; correcting wrong file authority, regularly cleaning and restarting Jboss service, ensuring that the Jboss stably provides service, and avoiding some problems of long-term operation or wrong file authority; and log archiving is performed regularly, and the problem of frequent insufficient space of the Jboss service is solved.
The invention also provides a Jboss cache cleaning device, the principle of which is the same as that of the Jboss cache cleaning method, and the details are not repeated here.
Fig. 4 is a first schematic diagram of a Jboss cache cleaning device according to an embodiment of the present invention, as shown in fig. 4, including:
an idle service obtaining module 401, configured to obtain multiple idle Jboss services in the Linux system in a first preset time period of each day;
a process stopping module 402, configured to stop, for each idle Jboss service, the Jboss service process by using the root user right of the Linux system;
the file permission modification module 403 is configured to modify the file related to the Jboss service into a permission of the user of the Jboss service by using the root user permission;
a log archiving module 404, configured to archive the log in the Jboss service cache to the target server;
a cleaning module 405, configured to delete the log in the Jboss service cache by using the root user permission;
and a process starting module 406, configured to switch the root user to a user of a Jboss, and start the Jboss service process.
In an embodiment, the idle service obtaining module is specifically configured to:
acquiring a Jboss service to be cleaned in the same day in a Linux system;
acquiring a Jboss service currently providing the service through a connection test with the apache;
and deleting the Jboss services which are providing services from the Jboss services to be cleaned, and obtaining the idle Jboss services.
In an embodiment, the idle service acquisition module is further configured to:
polling every a first preset time length to obtain the idle Jboss service which is not cleaned in the day.
Fig. 5 is a second schematic diagram of the apparatus for cleaning a Jboss cache according to an embodiment of the present invention, and in an embodiment, the apparatus further includes an anomaly monitoring module 501, configured to:
after the Jboss services to be cleaned are cleaned and started, inquiring an apache list, acquiring all the Jboss services, inquiring a management console list, checking the Jboss services which are communicated normally, polling to send a http request of getIP to the apache aiming at the Jboss services in the management console list, and determining that the Jboss services are normal if the IP of the Jboss services which exist in the apache list and exist in the management console list are acquired within a second preset time length; otherwise, repeating the steps of the method in claim 1 for the Jboss service corresponding to the IP which does not exist in the management console list or the Jboss service which sends getIP and does not return the IP, and generating a cleaning error report if the repeating times reaches a set time threshold value and the Jboss service which does not return the IP still does not return the IP.
In an embodiment, the anomaly monitoring module 501 is further configured to:
sending a http request of getIP to an apache every third preset time interval in a second preset time period every day, if a Jboss service of unreturned IP exists, repeatedly executing the steps of the method of claim 1 for the Jboss service of unreturned IP, and if the repeated times reach a set time threshold value, the Jboss service of unreturned IP still does not return IP, and generating warning information.
In an embodiment, the log archiving module is specifically configured to:
checking the current remaining space of the target server;
determining the number of days of logs which can be filed according to the current residual space;
and archiving the log of the archivable log days to a target server.
In an embodiment, the anomaly monitoring module 501 is further configured to:
and when the current residual space of the Jboss service is smaller than a preset threshold value, generating early warning information, wherein the early warning information is used for reminding developers that the Jboss service space is insufficient.
Fig. 6 is a third schematic diagram of the Jboss cache cleaning apparatus in the embodiment of the present invention, and in an embodiment, the apparatus further includes a target server monitoring module 601, configured to:
and when the log at the debug level exists in the target server, generating warning information, wherein the warning information is used for reminding a developer to process the log level.
In summary, in the method and apparatus provided in the embodiment of the present invention, the idle service obtaining module is configured to obtain a plurality of idle Jboss services in the Linux system in a first preset time period of each day; the process stopping module is used for stopping the Jboss service process for each idle Jboss service by adopting the root user authority of the Linux system; the file permission correction module is used for modifying the file related to the Jboss service into the permission of the Jboss service user by adopting the root user permission; the log archiving module is used for archiving the logs in the Jboss service cache to a target server; the cleaning module is used for deleting the logs in the Jboss service cache by adopting the root user authority; and the process starting module is used for switching the root user to a Jboss user and starting the Jboss service process. In the process, the idle Jboss service is cleared in the first preset time period every day, the fluctuation processing is realized, and the Jboss service is ensured to continuously provide the service; correcting wrong file authority, regularly cleaning and restarting Jboss service, ensuring that the Jboss stably provides service, and avoiding some problems of long-term operation or wrong file authority; and log archiving is performed regularly, and the problem of frequent insufficient space of the Jboss service is solved.
An embodiment of the present invention further provides a computer device, and fig. 7 is a schematic diagram of a computer device in an embodiment of the present invention, where the computer device is capable of implementing all steps in the method for cleaning a Jboss cache in the foregoing embodiment, and the computer device specifically includes the following contents:
a processor (processor)701, a memory (memory)702, a communication Interface (Communications Interface) 703, and a communication bus 704;
the processor 701, the memory 702 and the communication interface 703 complete mutual communication through the communication bus 704; the communication interface 703 is used for implementing information transmission between related devices such as server-side devices, detection devices, and user-side devices;
the processor 701 is configured to call the computer program in the memory 702, and when the processor executes the computer program, the processor implements all the steps in the Jboss cache cleaning method in the above embodiment.
An embodiment of the present invention further provides a computer-readable storage medium, which can implement all the steps in the above-mentioned method for cleaning a Jboss cache, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements all the steps of the above-mentioned method for cleaning a Jboss cache.
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 (11)

1. A Jboss cache cleaning method is characterized by comprising the following steps:
acquiring a plurality of idle Jboss services in the Linux system in a first preset time period every day;
for each idle Jboss service, adopting root user authority of a Linux system to stop the Jboss service process;
modifying the file related to the Jboss service into the authority of the Jboss service user by adopting the root user authority;
filing the log in the Jboss service cache to a target server;
deleting the log in the Jboss service cache by adopting the root user authority;
and switching the root user to a Jboss user, and starting the Jboss service process.
2. The method as claimed in claim 1, wherein the acquiring a plurality of idle Jboss services in the Linux system comprises:
acquiring a Jboss service to be cleaned in the same day in a Linux system;
acquiring a Jboss service of the current externally provided service through the apache connection pool query;
and deleting the Jboss service providing the service from the Jboss services to be cleaned up on the same day, and obtaining a plurality of idle Jboss services.
3. The method of claim 2, further comprising:
polling every a first preset time length to obtain the idle Jboss service which is not cleaned in the day.
4. The method of claim 3, further comprising:
after the Jboss services to be cleaned are cleaned and started, inquiring an apache list, acquiring all the Jboss services, inquiring a management console list, checking the Jboss services which are communicated normally, polling to send a http request of getIP to the apache aiming at the Jboss services in the management console list, and determining that the Jboss services are normal if the IP of the Jboss services which exist in the apache list and exist in the management console list are acquired within a second preset time length; otherwise, repeating the steps of the method in claim 1 for the Jboss service corresponding to the IP which does not exist in the management console list or the Jboss service which sends getIP and does not return the IP, and generating a cleaning error report if the repeating times reaches a set time threshold value and the Jboss service which does not return the IP still does not return the IP.
5. The method of claim 1, further comprising:
sending a http request of getIP to an apache every third preset time interval in a second preset time period every day, if a Jboss service of unreturned IP exists, repeatedly executing the steps of the method of claim 1 for the Jboss service of unreturned IP, and if the repeated times reach a set time threshold value, the Jboss service of unreturned IP still does not return IP, and generating warning information.
6. The method as claimed in claim 1, wherein the step of archiving the journal in the Jboss service cache to the target server comprises:
checking the current remaining space of the target server;
determining the number of days of logs which can be filed according to the current residual space;
and archiving the log of the archivable log days to a target server.
7. The method for cleaning a Jboss cache of claim 1, wherein after deleting the log in the Jboss service cache with the root user right, further comprising:
and when the current residual space of the Jboss service is smaller than a preset threshold value, generating early warning information, wherein the early warning information is used for reminding developers that the Jboss service space is insufficient.
8. The method of claim 1, further comprising:
and when the log at the debug level exists in the target server, generating warning information, wherein the warning information is used for reminding a developer to process the log level.
9. A Jboss cache cleaning device is characterized by comprising:
the system comprises an idle service acquisition module, a service processing module and a service processing module, wherein the idle service acquisition module is used for acquiring a plurality of idle Jboss services in the Linux system in a first preset time period every day;
the process stopping module is used for stopping the Jboss service process for each idle Jboss service by adopting the root user authority of the Linux system;
the file permission correction module is used for modifying the file related to the Jboss service into the permission of the Jboss service user by adopting the root user permission;
the log archiving module is used for archiving the logs in the Jboss service cache to a target server;
the cleaning module is used for deleting the logs in the Jboss service cache by adopting the root user authority;
and the process starting module is used for switching the root user to a Jboss user and starting the Jboss service process.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 8.
CN202111088821.1A 2021-09-16 2021-09-16 Jboss cache cleaning method and device Pending CN113722018A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111088821.1A CN113722018A (en) 2021-09-16 2021-09-16 Jboss cache cleaning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111088821.1A CN113722018A (en) 2021-09-16 2021-09-16 Jboss cache cleaning method and device

Publications (1)

Publication Number Publication Date
CN113722018A true CN113722018A (en) 2021-11-30

Family

ID=78684149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111088821.1A Pending CN113722018A (en) 2021-09-16 2021-09-16 Jboss cache cleaning method and device

Country Status (1)

Country Link
CN (1) CN113722018A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490886A (en) * 2012-06-12 2014-01-01 阿里巴巴集团控股有限公司 Permission data validation method, device and system
CN103632082A (en) * 2013-12-10 2014-03-12 惠州华阳通用电子有限公司 Universal permission management system and universal permission management method
CN103826215A (en) * 2014-02-11 2014-05-28 北京奇虎科技有限公司 Method and apparatus for carrying out root authority management at terminal equipment
US9317218B1 (en) * 2013-02-08 2016-04-19 Emc Corporation Memory efficient sanitization of a deduplicated storage system using a perfect hash function
CN107870842A (en) * 2016-09-28 2018-04-03 平安科技(深圳)有限公司 A kind of blog management method and system
CN109271355A (en) * 2018-08-27 2019-01-25 杭州迪普科技股份有限公司 A kind of method and device of cleaning journal file caching
US20190034652A1 (en) * 2017-07-27 2019-01-31 Citrix Systems, Inc. Scrubbing Log Files Using Scrubbing Engines
CN111698196A (en) * 2019-03-15 2020-09-22 大唐移动通信设备有限公司 Authentication method and micro-service system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490886A (en) * 2012-06-12 2014-01-01 阿里巴巴集团控股有限公司 Permission data validation method, device and system
US9317218B1 (en) * 2013-02-08 2016-04-19 Emc Corporation Memory efficient sanitization of a deduplicated storage system using a perfect hash function
CN103632082A (en) * 2013-12-10 2014-03-12 惠州华阳通用电子有限公司 Universal permission management system and universal permission management method
CN103826215A (en) * 2014-02-11 2014-05-28 北京奇虎科技有限公司 Method and apparatus for carrying out root authority management at terminal equipment
CN107870842A (en) * 2016-09-28 2018-04-03 平安科技(深圳)有限公司 A kind of blog management method and system
US20190034652A1 (en) * 2017-07-27 2019-01-31 Citrix Systems, Inc. Scrubbing Log Files Using Scrubbing Engines
CN109271355A (en) * 2018-08-27 2019-01-25 杭州迪普科技股份有限公司 A kind of method and device of cleaning journal file caching
CN111698196A (en) * 2019-03-15 2020-09-22 大唐移动通信设备有限公司 Authentication method and micro-service system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
无: "利用WEB日志判断服务器的安全性", 计算机与网络, no. 08, 26 April 2013 (2013-04-26), pages 1 - 2 *

Similar Documents

Publication Publication Date Title
CN107710683B (en) Elastic as a service
CN108399132B (en) Scheduling test method, device and storage medium
US8549327B2 (en) Background service process for local collection of data in an electronic discovery system
US7996718B1 (en) Techniques for continuous data protection
US9626177B1 (en) Peer to peer upgrade management
CN111324423B (en) Method and device for monitoring processes in container, storage medium and computer equipment
JP5444178B2 (en) Backup / restore processing device, backup / restore processing method and program
US20100107156A1 (en) Local collector
CN110895488B (en) Task scheduling method and device
CN110569085A (en) configuration file loading method and system
US9032014B2 (en) Diagnostics agents for managed computing solutions hosted in adaptive environments
CN111342986A (en) Distributed node management method and device, distributed system and storage medium
CN113722018A (en) Jboss cache cleaning method and device
CN111488117A (en) Method, electronic device, and computer-readable medium for managing metadata
US11243857B2 (en) Executing test scripts with respect to a server stack
CN111131498A (en) URL information updating method, cache server, device and storage medium
CN110266536B (en) Internet of vehicles resource management method and device
CN116303240B (en) Snapshot establishment method, system, equipment and medium of distributed file system
US11714631B2 (en) Method, electronic device, and computer program product for managing operating system
Learmonth et al. Towards modernising data collection and archive for the Tor network
CN113110955B (en) System disk repair method, storage medium and device
CN109032955B (en) UI automation test method, device, equipment and readable storage medium
Zhang et al. Lifecycle Management
CN116225497A (en) Flow plug-in upgrading processing method and device
US9223666B2 (en) Disaster recovery for databases

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