CN113722018B - Jboss cache cleaning method and device - Google Patents

Jboss cache cleaning method and device Download PDF

Info

Publication number
CN113722018B
CN113722018B CN202111088821.1A CN202111088821A CN113722018B CN 113722018 B CN113722018 B CN 113722018B CN 202111088821 A CN202111088821 A CN 202111088821A CN 113722018 B CN113722018 B CN 113722018B
Authority
CN
China
Prior art keywords
jboss
services
service
log
cache
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.)
Active
Application number
CN202111088821.1A
Other languages
Chinese (zh)
Other versions
CN113722018A (en
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/CN113722018B/en
Publication of CN113722018A publication Critical patent/CN113722018A/en
Application granted granted Critical
Publication of CN113722018B publication Critical patent/CN113722018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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

本发明提供了一种Jboss缓存清理方法及装置,可用于分布式技术领域,该方法包括:该方法包括:在每天的第一预设时段,获取Linux系统中多个空闲的Jboss服务;对每个空闲的Jboss服务,采用Linux系统的root用户权限停止该Jboss服务进程;采用所述root用户权限将该Jboss服务涉及的文件修改成Jboss服务用户的权限;将该Jboss服务缓存中的日志归档至目标服务器;采用所述root用户权限删除该Jboss服务缓存中的日志;将所述root用户切换到Jboss的用户,启动该Jboss服务进程。本发明可以实现Jboss缓存清理,效率高,应用方便。

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.

Description

Jboss cache cleaning method and Jboss cache cleaning device
Technical Field
The invention relates to the technical field of distribution, in particular to Jboss cache cleaning method and device.
Background
In the development stage, before the functional test is not entered, the developed version needs to be deployed and tested in the development environment. However, in the development stage, no special maintenance personnel exist, and maintenance of all development environments needs to be simultaneously carried out by the development personnel, so that maintenance workload is large for the development personnel unfamiliar with an environment system, and the development environment is difficult to position when encountering problems.
The Linux operating system has a strict user permission mechanism, and an unknown developer is often started by using a root user, so that the next starting or abnormal operation is caused, for example, log catalogs are modified to be the root user, and Jboss users cannot write. In addition, after the Jboss server runs for a long time, the released resources need to be restarted periodically, otherwise, the problems of slow running and the like can occur. However, there is currently 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 a Linux system in a first preset time period of each day;
for each spare Jboss service, stopping the Jboss service process by adopting root user permission of a Linux system;
Modifying the file related to the Jboss service into the authority of Jboss service user by adopting the root user authority;
archiving 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 idle service obtaining module is used for obtaining 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 root user permission of the Linux system;
the file authority correction module is used for modifying the file related to the Jboss service into the authority of Jboss service user by adopting the root user authority;
the log archiving module is used for archiving the log in the Jboss service cache to the target server;
the cleaning module is used for deleting the log in the Jboss service cache by adopting the root user permission;
and the process starting module is used for switching the root user to the 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 stored on the memory and capable of running on the processor, wherein the cache cleaning method of Jboss is realized when the processor executes the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for executing the Jboss cache cleaning method.
In the embodiment of the invention, a plurality of idle Jboss services in a Linux system are acquired in a first preset time period every day, a root user authority of the Linux system is adopted for stopping a Jboss service process for each idle Jboss service, a file related to the Jboss service is modified into a Jboss service user authority by adopting the root user authority, a log in a Jboss service cache is archived to a target server, the log in the Jboss service cache is deleted by adopting the root user authority, the root user is switched to a Jboss user, and the Jboss service process is started. In the process, the idle Jboss service is cleaned in a first preset period of each day to realize fluctuation processing, jboss is guaranteed to continuously provide service, wrong file authority is corrected, jboss service is cleaned and restarted periodically, jboss is guaranteed to stably provide service, problems of long-term operation or wrong file authority are avoided, and the problem of frequent space shortage of Jboss service is solved through periodic log archiving.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flowchart of a Jboss cache cleaning method according to an embodiment of the present invention;
FIG. 2 is a flow chart of acquiring a free Jboss service in an embodiment of the present invention;
FIG. 3 is a flow chart of a log archiving process in an embodiment of the present invention;
FIG. 4 is a schematic diagram I of a Jboss cache cleaning device according to an embodiment of the present invention;
FIG. 5 is a second schematic diagram of a Jboss cache cleaning device 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 schematic diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are open-ended terms, meaning including, but not limited to. The description of the reference 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, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The order of steps involved in the embodiments is illustrative of the practice of the application, and is not limited and may be suitably modified as desired.
First, terms involved in the embodiments of the present invention will be explained.
Development environment-environment in which environment deployment and maintenance are performed by developers with respect to a functional test environment, a drilling environment, and a production environment.
Linux file operation authority, namely the Linux file operation authority has current user authority, current user group authority and other user authorities.
Jboss A business version of a web service.
Jboss the buffer memory Jboss stores the buffered temporary directory file, which is auth, vfs, work directory under/standalone/tmp.
FIG. 1 is a flowchart of a Jboss cache cleaning method in 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 of each day;
102, stopping Jboss service processes by adopting root user rights of a Linux system for each idle Jboss service;
step 103, modifying the file related to the Jboss service into the authority of Jboss service user by adopting the root user authority;
Step 104, archiving the log in the Jboss service cache to a target server;
Step 105, deleting the log in the Jboss service cache by adopting the root user authority;
And 106, switching the root user to the Jboss user, and starting the Jboss service process.
In the embodiment of the invention, the idle Jboss service is cleaned in the first preset period of each day to realize fluctuation processing, ensure Jboss to continuously provide service, correct wrong file authority, periodically clean and restart Jboss service, ensure Jboss to stably provide service, avoid some problems of long-term operation or wrong file authority, and periodically archive logs to solve the problem of insufficient space of Jboss service.
In step 101, a plurality of idle Jboss services in the Linux system are acquired during a first preset time period of each day.
The first preset period may be at night, for example, 0 to 8 nights, so as to minimize the influence of daytime on Jboss services.
FIG. 2 is a flowchart of acquiring idle Jboss services in an embodiment of the present invention, in one embodiment, acquiring a plurality of idle Jboss services in a Linux system, including:
step 201, jboss services to be cleaned in the same day in a Linux system are obtained;
Step 202, obtaining Jboss services which provide services to the outside currently through the inquiry of an apache connection pool;
In step 203, the Jboss service that is providing the service is deleted from Jboss services to be cleaned, the Jboss service that is providing the service to the outside is deleted from Jboss services to be cleaned on the same day, and a plurality of idle Jboss services are obtained.
In the above embodiment, each Jboss service is typically used once within 2 minutes according to the apache load balancing policy, and thus, jboss service that is currently providing service is available.
In an embodiment, the method further comprises:
And polling every first preset time length to obtain Jboss services which are not cleaned and are free on the same day.
The first preset duration may be 1 hour, which is determined according to practical situations.
In step 102, for each free Jboss service, the root user authority of the Linux system is adopted to stop the Jboss service process.
The root user has higher authority, and can forcedly stop Jboss the service process. In an embodiment, after deleting the log in the Jboss service cache by adopting the root user authority, the method further includes:
and when the current residual space of Jboss services is smaller than a preset threshold value, generating early warning information, wherein the early warning information is used for reminding a developer Jboss that the 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 mail to manually check the space storage condition, so that manual cleaning is performed.
In step 103, the root user authority is adopted to modify the file related to the Jboss service into the authority of Jboss service user.
The purpose of modifying rights is to restore Jboss the correct rights to the file to which the service relates.
In step 104, the log in the Jboss service cache is archived to the target server.
FIG. 3 is a flowchart of archiving journals in the Jboss service cache to a target server according to one embodiment of the present invention, including:
step 301, checking the current residual space of the target server;
Step 302, determining the number of days of log capable of being archived according to the current residual space;
and step 303, archiving the log of the log days capable of being archived to a target server.
For example, if the current remaining space is 20G or more, a log 7 days ago is archived.
If the current remaining space is less than 20G and greater than or equal to 10G, archiving the log 3 days ago.
If the current remaining space is less than 10G, a log 1 day ago is archived.
And 105, deleting the log in the Jboss service cache by adopting the root user authority.
Specifically, the log in the auth, vfs, work directory under delete/standalone/tmp.
And 106, switching the root user to the Jboss user, and starting the Jboss service process.
In an embodiment, the method further comprises:
After Jboss services to be cleaned are cleaned and started in the same day, inquiring an apache list to obtain all Jboss services, inquiring a management console list to check Jboss services which are communicated normally, polling to send getIP http requests to the apache for Jboss services in the management console list, determining that Jboss services are normal if the IP of Jboss services which exist in the apache list and exist in the management console list is obtained within a second preset time period, otherwise, repeating steps 101-106 of Jboss services which correspond to the IP which do not exist in the management console list or Jboss services which send getIP non-returned IP, and generating a cleaning error report if Jboss services which do not return IP still do not return IP after the repetition number reaches a set number threshold.
The above is a procedure of smoke test, for example, a case of sending once in 5 seconds in 2 minutes, and returning all the IP in 2 minutes, then Jboss services are normally provided. The set number of times threshold may be 3 times, with a clean-up error report for transmission to maintenance personnel.
In an embodiment, the method further comprises:
And sending getIP http requests to the apache every third preset time period in a second preset time period of each day, repeatedly executing steps 101-106 for Jboss service without returning IP if Jboss service without returning IP exists, and generating warning information if Jboss service without returning IP still does not return IP after the repeated times reach a set time threshold.
The second preset period may be daytime, for example, 8:00-18:00, for daily monitoring, and the warning message may indicate the reason, if Jboss is insufficient in service space, the reason indicates "insufficient space", otherwise indicates "start abnormality due to unknown reason".
In an embodiment, the method further comprises:
When a log of a 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 the log level is not right, the developer can check Jboss whether the service is abnormal.
In summary, in the method provided by the embodiment of the invention, a plurality of idle Jboss services in a Linux system are acquired in a first preset time period every day, for each idle Jboss service, the Jboss service process is stopped by adopting the root user authority of the Linux system, the file related to the Jboss service is modified into the authority of Jboss service users by adopting the root user authority, the log in the Jboss service cache is archived to a target server, the log in the Jboss service cache is deleted by adopting the root user authority, the root user is switched to the user of Jboss, and the Jboss service process is started. In the process, the idle Jboss service is cleaned in a first preset period of each day to realize fluctuation processing, jboss is guaranteed to continuously provide service, wrong file authority is corrected, jboss service is cleaned and restarted periodically, jboss is guaranteed to stably provide service, problems of long-term operation or wrong file authority are avoided, and the problem of frequent space shortage of Jboss service is solved through periodic log archiving.
The invention also provides Jboss cache cleaning device, the principle of which is the same as that of Jboss cache cleaning method, and the description is omitted here.
Fig. 4 is a 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 a plurality of idle Jboss services in the Linux system in a first preset period of time every day;
a process stopping module 402, configured to stop the Jboss service process for each idle Jboss service by using root user rights of the Linux system;
A file authority modification module 403, configured to modify a file related to the Jboss service into an authority of a Jboss service user by using the root user authority;
a log archiving module 404, configured to archive the log in the Jboss service cache to a target server;
A cleaning module 405, configured to delete the log in the Jboss service cache using the root user permission;
And a process starting module 406, configured to switch the root user to the user Jboss, and start the Jboss service process.
In an embodiment, the idle service obtaining module is specifically configured to:
jboss services to be cleaned in the current day in the Linux system are acquired;
acquiring Jboss services which are currently providing services through a connection test with an apache;
From Jboss services to be cleaned, the Jboss services that are providing the services are deleted, and the idle Jboss services are obtained.
In an embodiment, the idle service acquisition module is further configured to:
And polling every first preset time length to obtain Jboss services which are not cleaned and are free on the same day.
Fig. 5 is a schematic diagram two of a Jboss cache cleaning device according to an embodiment of the present invention, where in an embodiment, the device further includes an anomaly monitoring module 501 configured to:
After Jboss services to be cleaned are cleaned and started in the same day, inquiring an apache list to obtain all Jboss services, inquiring a management console list to check Jboss services which are communicated normally, polling to send getIP http requests to the apache for Jboss services in the management console list, determining that Jboss services are normal if the IP of Jboss services which exist in the apache list and exist in the management console list is obtained within a second preset time period, otherwise, repeatedly executing steps 101-106 for Jboss services which do not exist in the management console list or Jboss services which send getIP and do not return to the IP, and generating a cleaning error report if Jboss services which do not return to the IP still do not return to the IP after the repetition times reach a set time threshold.
In one embodiment, the anomaly monitoring module 501 is further configured to:
And sending getIP http requests to the apache every third preset time period in a second preset time period of each day, repeatedly executing steps 101-106 for Jboss service without returning IP if Jboss service without returning IP exists, and generating warning information if Jboss service without returning IP still does not return IP after the repeated times reach a set time threshold.
In one embodiment, the log archiving module is specifically configured to:
checking the current residual space of the target server;
determining the number of days of the log capable of being archived according to the current residual space;
and archiving the log of the log days capable of being archived to a target server.
In one embodiment, the anomaly monitoring module 501 is further configured to:
and when the current residual space of Jboss services is smaller than a preset threshold value, generating early warning information, wherein the early warning information is used for reminding a developer Jboss that the service space is insufficient.
Fig. 6 is a schematic diagram III of a Jboss cache cleaning device according to an embodiment of the present invention, where in an embodiment, the device further includes a target server monitoring module 601, configured to:
When a log of a 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 the device provided by the embodiment of the invention, the idle service obtaining module is used for obtaining 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 by adopting root user permission of the Linux system for each idle Jboss service, the file permission correcting module is used for correcting files related to the Jboss service into permissions of Jboss service users by adopting the root user permission, the log archiving module is used for archiving 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 permission, 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 cleaned in a first preset period of each day to realize fluctuation processing, jboss is guaranteed to continuously provide service, wrong file authority is corrected, jboss service is cleaned and restarted periodically, jboss is guaranteed to stably provide service, problems of long-term operation or wrong file authority are avoided, and the problem of frequent space shortage of Jboss service is solved through periodic log archiving.
An embodiment of the present invention further provides a computer device, and fig. 7 is a schematic diagram of a computer device in the embodiment of the present invention, where the computer device can implement all steps in the Jboss cache cleaning method 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 communication with each other through the communication bus 704, wherein the communication interface 703 is used for realizing information transmission among related devices such as server-side devices, detection devices and user devices;
the processor 701 is configured to invoke a computer program in the memory 702, where the processor executes the computer program to implement all the steps in the Jboss cache cleaning method in the foregoing embodiment.
Embodiments of the present invention also provide a computer readable storage medium capable of implementing all the steps in the Jboss cache cleaning method in the above embodiments, where the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, implements all the steps in the Jboss cache cleaning method in the above embodiments.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (8)

1. The Jboss cache cleaning method is characterized by comprising the following steps:
Step 101, acquiring a plurality of idle Jboss services in a Linux system in a first preset time period of each day;
102, stopping Jboss service processes by adopting root user rights of a Linux system for each idle Jboss service;
step 103, modifying the file related to the Jboss service into the authority of Jboss service user by adopting the root user authority;
Step 104, archiving the log in the Jboss service cache to a target server;
Step 105, deleting the log in the Jboss service cache by adopting the root user authority;
Step 106, switching the root user to Jboss users, and starting the Jboss service process;
Acquiring a plurality of idle Jboss services in the Linux system, including acquiring Jboss services to be cleaned in the same day in the Linux system, and acquiring Jboss services which provide services to the outside currently through an apache connection pool query;
deleting Jboss services which provide services outwards from Jboss services to be cleaned in the same day, and obtaining a plurality of idle Jboss services;
polling every first preset time length to obtain Jboss services which are not cleaned and are idle on the same day;
The method comprises the steps of inquiring an apache list after Jboss services to be cleaned are cleaned and started on the same day, obtaining all Jboss services, inquiring a management console list, checking Jboss services which are communicated normally, sending getIP http requests to the apache by polling according to Jboss services in the management console list, determining Jboss normal services if the existence of the apache list and the IP of Jboss services in the management console list are obtained within a second preset time period, otherwise, repeatedly executing steps 101-106 on Jboss services corresponding to the non-existence of the IP in the management console list or Jboss services which are sent getIP and are not returned to the IP, and generating a cleaning error report if the repetition number reaches a set number threshold, wherein the non-return IP is still not returned to the Jboss services.
2. The Jboss cache cleaning method as in claim 1, further comprising:
And sending getIP http requests to the apache every third preset time period in a second preset time period of each day, if Jboss service which does not return IP exists, repeatedly executing steps 101-106 in claim 1 for Jboss service which does not return IP, and generating warning information if Jboss service which does not return IP still does not return IP after the repetition number reaches a set number threshold.
3. The Jboss cache cleaning method of claim 1, wherein archiving the log in the Jboss service cache to the target server comprises:
checking the current residual space of the target server;
determining the number of days of the log capable of being archived according to the current residual space;
and archiving the log of the log days capable of being archived to a target server.
4. The Jboss cache cleaning method of claim 1, further comprising, after deleting the log in the Jboss service cache using the root user permission:
and when the current residual space of Jboss services is smaller than a preset threshold value, generating early warning information, wherein the early warning information is used for reminding a developer Jboss that the service space is insufficient.
5. The Jboss cache cleaning method as in claim 1, further comprising:
When a log of a 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.
6. Jboss cache cleaning device, characterized in that includes:
The idle service obtaining module is used for obtaining 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 root user permission of the Linux system;
the file authority correction module is used for modifying the file related to the Jboss service into the authority of Jboss service user by adopting the root user authority;
the log archiving module is used for archiving the log in the Jboss service cache to the target server;
the cleaning module is used for deleting the log in the Jboss service cache by adopting the root user permission;
The process starting module is used for switching the root user to a Jboss user and starting the Jboss service process;
Acquiring a plurality of idle Jboss services in the Linux system, including acquiring Jboss services to be cleaned in the same day in the Linux system, and acquiring Jboss services which provide services to the outside currently through an apache connection pool query;
deleting Jboss services which provide services outwards from Jboss services to be cleaned in the same day, and obtaining a plurality of idle Jboss services;
polling every first preset time length to obtain Jboss services which are not cleaned and are idle on the same day;
The method comprises the steps of inquiring an apache list after Jboss services to be cleaned are cleaned and started on the same day, obtaining all Jboss services, inquiring a management console list, checking Jboss services which are communicated normally, sending getIP http requests to the apache by polling aiming at Jboss services in the management console list, determining that Jboss services are normal if the IP of Jboss services which exist in the apache list and exist in the management console list is obtained within a second preset time period, otherwise, repeatedly executing steps 101-106 of claim 1 according to Jboss services which do not exist in the management console list or Jboss services which send getIP and do not return the IP, and generating a cleaning error report if Jboss services which do not return the IP still do not return the IP after the repetition times reach a set frequency threshold.
7. 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 5 when executing the computer program.
8. 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 5.
CN202111088821.1A 2021-09-16 2021-09-16 Jboss cache cleaning method and device Active CN113722018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111088821.1A CN113722018B (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 CN113722018B (en) 2021-09-16 2021-09-16 Jboss cache cleaning method and device

Publications (2)

Publication Number Publication Date
CN113722018A CN113722018A (en) 2021-11-30
CN113722018B true CN113722018B (en) 2025-03-21

Family

ID=78684149

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN113722018B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870842A (en) * 2016-09-28 2018-04-03 平安科技(深圳)有限公司 A kind of blog management method and system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490886B (en) * 2012-06-12 2017-04-05 阿里巴巴集团控股有限公司 The verification method of permissions data, apparatus 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
CN103632082B (en) * 2013-12-10 2016-08-17 惠州华阳通用电子有限公司 A kind of general-purpose rights management system and method
CN103826215B (en) * 2014-02-11 2018-03-02 北京奇虎科技有限公司 A kind of method and apparatus for carrying out Root authority management on the terminal device
CN105389507B (en) * 2015-11-13 2018-12-25 小米科技有限责任公司 The method and device of monitoring system partitioned file
US11062041B2 (en) * 2017-07-27 2021-07-13 Citrix Systems, Inc. Scrubbing log files using scrubbing engines
CN109271355B (en) * 2018-08-27 2020-09-08 杭州迪普科技股份有限公司 Method and device for cleaning log file cache
CN111698196A (en) * 2019-03-15 2020-09-22 大唐移动通信设备有限公司 Authentication method and micro-service system
CN112286465B (en) * 2020-11-03 2023-02-21 浪潮云信息技术股份公司 A rados gateway archiving storage method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870842A (en) * 2016-09-28 2018-04-03 平安科技(深圳)有限公司 A kind of blog management method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
利用WEB日志判断服务器的安全性;无;计算机与网络;20130426(08);文章第1-2页 *

Also Published As

Publication number Publication date
CN113722018A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
CN107710683B (en) Elastic as a service
US10958548B2 (en) Generating production server load activity for a test server
US8407189B2 (en) Finding and fixing stability problems in personal computer systems
CN111324423B (en) Method and device for monitoring processes in container, storage medium and computer equipment
US20130198134A1 (en) Online verification of a standby database in log shipping physical replication environments
CN112579289B (en) Distributed analysis engine method and device capable of being intelligently scheduled
CN109361542A (en) The fault handling method of client, device, system, terminal and server
US20120036496A1 (en) Plug-in based high availability application management framework (amf)
CN104484167A (en) Task processing method and device
US9032014B2 (en) Diagnostics agents for managed computing solutions hosted in adaptive environments
CN113722018B (en) Jboss cache cleaning method and device
CN119814529B (en) Fault alarm method, device, computer equipment and storage medium
KR101480293B1 (en) Distributed filesystem processing device and method, and storage media storing the same
CN106502665B (en) Method and device for repairing an application program
US20190138336A1 (en) Batch Processing of Computing Elements
US11082484B2 (en) Load balancing system
CN111131498A (en) URL information updating method, cache server, device and storage medium
WO2016000137A1 (en) Method, client and system for multi-site automatic update
CN116302861B (en) Anomaly handling methods, devices, systems, electronic equipment and storage media
CN110677497A (en) Network medium distribution method and device
US11379559B2 (en) Automatic copy validation using real-world application traffic
CN121357184A (en) GCDW cloud database computing cluster node failure non-blocking SQL method
CN120407237A (en) A method and device for migrating local message middleware to the cloud for disaster recovery
CN118277161A (en) Database system management method and related products
CN119561833A (en) Resource object change method, device and computer equipment based on cloud platform cluster

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
GR01 Patent grant
GR01 Patent grant