CN111367728A - Memory space monitoring and cleaning test method and system - Google Patents

Memory space monitoring and cleaning test method and system Download PDF

Info

Publication number
CN111367728A
CN111367728A CN201911314682.2A CN201911314682A CN111367728A CN 111367728 A CN111367728 A CN 111367728A CN 201911314682 A CN201911314682 A CN 201911314682A CN 111367728 A CN111367728 A CN 111367728A
Authority
CN
China
Prior art keywords
verified
directory
specified directory
threshold value
preset threshold
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.)
Withdrawn
Application number
CN201911314682.2A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911314682.2A priority Critical patent/CN111367728A/en
Publication of CN111367728A publication Critical patent/CN111367728A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of server testing, and provides a memory space monitoring and cleaning testing method and a system, wherein the method comprises the following steps: controlling to write the file repeatedly; monitoring the utilization rate of the specified directory to be verified; when the utilization rate reaches a first preset threshold value, stopping the action of repeatedly writing the file, and judging whether the file larger than the size limit of automatic cleaning exists; when judging that the files larger than the size limit of automatic cleaning exist, judging that the specified directory to be verified in the memory of the server to be tested has abnormal functions, and failing to pass the test; when judging that the files larger than the size limit of the automatic cleaning do not exist, judging that the specified directory to be verified in the memory of the server to be tested has normal functions, and passing the test; meanwhile, the log file is generated, so that automatic testing of monitoring and cleaning of the memory space is realized, the testing efficiency is improved, the labor cost is saved, manual errors are reduced, and meanwhile, the log file is generated and is convenient to trace.

Description

Memory space monitoring and cleaning test method and system
Technical Field
The invention belongs to the technical field of server testing, and particularly relates to a memory space monitoring and cleaning testing method and system.
Background
In the use of the server, the storage of information such as logs is an important link, a large amount of information may be generated by one operation of the server, and the path of the memory recorded information has a certain spatial limitation. When the memory space is occupied more, the operation speed of the server is hampered, and even some functions are broken down. Under certain paths which are easy to generate a large amount of occupied space, the BMC endows the space monitoring and cleaning functions.
In the traditional memory space test method, a large number of logs or other files are manually generated to enable the space to reach a certain occupancy rate, and whether the sizes of the files in the path exist after a cleaning mechanism is triggered is judged to verify whether the functions can be normally used or not. However, the conventional test process of the memory space is time-consuming and labor-consuming, no log record exists for the whole test process and results, and the subsequent checking and analysis are inconvenient.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a memory space monitoring and cleaning test method, aiming at solving the problems that the test process of the memory space in the prior art is time-consuming and labor-consuming, the whole test process and result have no log record, and the subsequent check and analysis are inconvenient.
The technical scheme provided by the invention is as follows: a memory space monitoring and cleaning test method comprises the following steps:
controlling to repeatedly write at least three files matched with the specified directory to be verified into the specified directory to be verified in the memory of the server to be tested, wherein the at least three files matched with the specified directory to be verified comprise files larger than an automatic cleaning size limit, files equal to the automatic cleaning size limit and files smaller than the automatic cleaning size limit;
monitoring the utilization rate of the specified directory to be verified while repeatedly writing the file matched with the specified directory to be verified;
when the usage rate of the specified directory to be verified reaches a first preset threshold value, stopping the action of repeatedly writing the files, and circularly judging whether the files which are repeatedly written in still have files larger than the size limit of automatic cleaning in a preset time;
when judging that files larger than the size limit of automatic cleaning exist, judging that the specified directory to be verified in the server memory to be tested has abnormal functions, failing to pass the test, and generating a log file;
and when judging that the files larger than the size limit of the automatic cleaning do not exist, judging that the specified directory to be verified of the memory of the server to be tested has normal functions, passing the test, and generating a log file.
As an improved scheme, the specified directory to be verified of the memory is a/var directory, a/conf directory or an/extlog directory;
the automatic cleaning size limit of the/var directory is 10M, the automatic cleaning size limit of the/conf directory is 100KB, and the automatic cleaning size limit of the/extlog directory is 3M.
As an improved scheme, the step of controlling to rewrite at least three files matched with the specified directory to be verified under the specified directory to be verified in the memory of the server to be tested further comprises the following steps:
creating a session, and adding an API (application programming interface) to empty the IDL log;
and establishing connection with the BMC IP through the BMC administrator identity at the client through the ssh instruction.
As an improved scheme, after the step of monitoring the utilization rate of the specified directory to be verified while repeatedly writing the file matched with the specified directory to be verified; when the monitored use rate of the specified directory to be verified reaches a first preset threshold value, the step of stopping the action of repeatedly writing the file also comprises the following steps:
when the usage rate of the specified directory to be verified reaches a second preset threshold value, detecting IDL logs, and judging whether alarm logs with insufficient disk space exist in the IDL logs, wherein the second preset threshold value is smaller than the first preset threshold value;
when judging that an alarm log for recording insufficient disk space exists in the IDL log, continuing to execute the step of stopping the action of repeatedly writing the file when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value;
and when judging that the IDL log does not have an alarm log for recording the insufficient disk space, generating a log file with a normal disk space insufficiency alarm function, and continuously executing the step of stopping the action of repeatedly writing the file when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value.
As an improvement, the method further comprises the steps of:
according to the functional requirements of the specified directory to be verified of the server to be tested, the first preset threshold value and the second preset threshold value are configured in advance;
the first preset threshold value is used for defining the designated directory utilization rate parameter of the automatic cleaning of the memory space, and the second preset threshold value is used for defining the triggering time limit of the disk space shortage warning function.
Another objective of the present invention is to provide a memory space monitoring and cleaning test system, which is characterized in that the system includes:
the file writing module is used for controlling repeated writing of at least three files matched with the specified directory to be verified under the specified directory to be verified in the memory of the server to be tested, wherein the at least three files matched with the specified directory to be verified comprise files larger than an automatic cleaning size limit, files equal to the automatic cleaning size limit and files smaller than the automatic cleaning size limit;
the utilization rate monitoring module is used for monitoring the utilization rate of the specified directory to be verified while repeatedly writing the file matched with the specified directory to be verified;
the write-in action stopping module is used for stopping the action of repeatedly writing in the file when the use rate of the specified directory to be verified reaches a first preset threshold value;
the file existence judging module is used for circularly judging whether the files which are repeatedly written in exist in the files which are larger than the size limit of automatic cleaning or not within the preset time;
the first judgment module is used for judging that the specified directory to be verified in the memory of the server to be tested has abnormal functions and fails the test when judging that the files larger than the size limit of the automatic cleaning exist;
the second judgment module is used for judging that the specified directory to be verified in the memory of the server to be tested has normal functions and passes the test when judging that the files larger than the size limit of the automatic cleaning do not exist;
and the first log file generation module is used for generating a log file when the test is judged to pass or not pass.
As an improved scheme, the specified directory to be verified of the memory is a/var directory, a/conf directory or an/extlog directory;
the automatic cleaning size limit of the/var directory is 10M, the automatic cleaning size limit of the/conf directory is 100KB, and the automatic cleaning size limit of the/extlog directory is 3M.
As an improvement, the system further comprises:
the log adding module is used for creating a session and adding an API (application programming interface) to empty the IDL log;
and the connection module is used for establishing connection with the BMC IP through the BMC administrator identity at the client through the ssh instruction.
As an improvement, the system further comprises:
the log detection and judgment module is used for detecting the IDL log when the usage rate of the specified directory to be verified reaches a second preset threshold value, judging whether an alarm log for recording insufficient disk space exists in the IDL log or not, wherein the second preset threshold value is smaller than the first preset threshold value;
a second log file generation module, configured to generate a log file with a normal warning function when it is determined that there is no warning log with insufficient disk space recorded in the IDL log, and continue to execute the step of stopping the action of repeatedly writing the file when it is monitored that the usage rate of the to-be-verified specified directory reaches a first preset threshold value;
and when judging that an alarm log for recording insufficient disk space exists in the IDL log, continuing to execute the step of stopping the action of repeatedly writing the file by the write action stopping module when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value.
As an improvement, the system further comprises:
the pre-configuration module is used for pre-configuring the first preset threshold value and the second preset threshold value according to the functional requirement of the specified directory to be verified of the server to be tested;
the first preset threshold value is used for defining the designated directory utilization rate parameter of the automatic cleaning of the memory space, and the second preset threshold value is used for defining the triggering time limit of the disk space shortage warning function.
In the embodiment of the invention, at least three files matched with the specified directory to be verified are controlled to be repeatedly written into the specified directory to be verified in the memory of the server to be tested; monitoring the utilization rate of the appointed directory to be verified; when the usage rate of the specified directory to be verified reaches a first preset threshold value, stopping the action of repeatedly writing the files, and circularly judging whether the files which are repeatedly written still have files larger than the size limit of automatic cleaning in a preset time; when judging that the files larger than the size limit of automatic cleaning exist, judging that the specified directory to be verified in the memory of the server to be tested has abnormal functions, and failing to pass the test; when judging that the files larger than the size limit of the automatic cleaning do not exist, judging that the specified directory to be verified in the memory of the server to be tested has normal functions, and passing the test; meanwhile, the log file is generated, so that automatic testing of monitoring and cleaning of the memory space is realized, testing efficiency is improved, labor cost is saved, manual errors are reduced, and meanwhile, the log file is generated, and tracing is facilitated.
Drawings
In order to more clearly illustrate the detailed description of the invention or the technical solutions in the prior art, the drawings that are needed in the detailed description of the invention or the prior art will be briefly described below. Throughout the drawings, like elements or portions are generally identified by like reference numerals. In the drawings, elements or portions are not necessarily drawn to scale.
FIG. 1 is a flow chart of an implementation of a memory space monitoring and cleaning test method provided by the present invention;
fig. 2 is a block diagram of a memory space monitoring and clearing test system provided in the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are merely for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.
Fig. 1 is a flowchart of an implementation of the memory space monitoring and cleaning test method provided by the present invention, which specifically includes the following steps:
in step S101, controlling to repeatedly write at least three files matched with the specified directory to be verified into the specified directory to be verified in the memory of the server to be tested, where the at least three files matched with the specified directory to be verified include a file larger than an automatic cleaning size limit, a file equal to the automatic cleaning size limit, and a file smaller than the automatic cleaning size limit;
this step is implemented by repeatedly generating files of 15M, 10M and 5M sizes under the/var directory using dd commands (cd/var; dd if/dev/zero of bs 1024count KB).
In step S102, while repeatedly writing the file matching with the specified directory to be verified, monitoring the usage rate of the specified directory to be verified, wherein the checking and monitoring of the usage rate is implemented by df-h;
in step S103, when it is monitored that the usage rate of the to-be-verified specified directory reaches a first preset threshold value, the action of repeatedly writing the file is stopped.
In step S104, circularly determining whether a file larger than the size limit of the automatic cleaning exists in the repeatedly written files within a preset time, if so, executing step S105, otherwise, executing step S106;
in this embodiment, taking the/var directory as an example, the first preset threshold value is 90%, the preset time is 30 seconds, that is, when the usage rate reaches 90%, the usage rate of the/var directory is circularly checked within 30 seconds to see whether the usage rate of the/var directory is suddenly reduced, and whether 15M, 10M, and 5M files still exist under the/var directory is checked.
In step S105, when it is determined that a file larger than the size limit of the automatic cleaning exists, it is determined that the specified directory to be verified in the memory of the server to be tested has a functional abnormality, the test fails, and a log file is generated;
taking the/var directory as an example, when the memory monitoring automatic cleaning function is normal, files larger than 10M are cleaned.
In step S106, when it is determined that there is no file larger than the size limit of the automatic cleaning, it is determined that the specified directory to be verified in the memory of the server to be tested has a normal function, the test is passed, and a log file is generated.
In the embodiment of the invention, the specified directory to be verified of the memory is/var directory,/conf directory or/extlog directory;
wherein, the automatic cleaning size limit of the/var directory is 10M, the automatic cleaning size limit of the/conf directory is 100KB, and the automatic cleaning size limit of the/extlog directory is 3M; the following is a description of the/var catalogue as an example.
In the embodiment of the present invention, before the step of controlling to repeatedly write at least three files matched with the specified directory to be verified into the specified directory to be verified in the memory of the server to be tested, the method further includes the following steps:
(1) creating a session, and adding an API (application programming interface) to empty the IDL log;
(2) and establishing connection with the BMC IP through the BMC administrator identity at the client through the ssh instruction.
As shown in fig. 2, after the step of monitoring the usage rate of the specified directory to be verified while repeatedly writing the file matching the specified directory to be verified; when the monitored use rate of the specified directory to be verified reaches a first preset threshold value, the step of stopping the action of repeatedly writing the file also comprises the following steps:
(1) when the usage rate of the specified directory to be verified reaches a second preset threshold value, detecting IDL logs, and judging whether alarm logs with insufficient disk space exist in the IDL logs, if so, executing a step S202, otherwise, executing a step S203, wherein the second preset threshold value is smaller than the first preset threshold value;
(2) when judging that an alarm log for recording insufficient disk space exists in the IDL log, continuing to execute the step of stopping the action of repeatedly writing the file when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value;
(3) and when judging that the IDL log does not have an alarm log for recording insufficient disk space, generating a log file with a normal disk space insufficiency alarm function, and continuing to execute the step of stopping the action of repeatedly writing the file when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value.
The second preset threshold value is 80%, and the setting of the second preset threshold value is the generation function of the alarm log file when the test memory space is insufficient.
In the embodiment of the present invention, before executing the above step S101, the following steps need to be executed:
according to the functional requirements of the specified directory to be verified of the server to be tested, the first preset threshold value and the second preset threshold value are configured in advance;
the first preset threshold value is used for defining the designated directory utilization rate parameter of the automatic cleaning of the memory space, and the second preset threshold value is used for defining the triggering time limit of the disk space shortage warning function.
The embodiment of the invention is used for verification test of a BMC memory space/var/conf/extlog path, and can be expanded and extended to other paths, the stability of the function is a very important part, and the manual operation can ensure the stability and reliability of the function through 7-24 hours of uninterrupted execution aiming at a verification mode that the function is really stable and needs automation for single detection. And the user can test other catalogs by running the script, the operation is more convenient, and the test log is reserved to ensure that the test result is traceable. The time and manpower resources wasted by manual testing in the prior art are avoided, and the working efficiency is improved.
Fig. 2 shows a block diagram of a memory space monitoring and clearing test system provided by the present invention, and for convenience of description, only the relevant parts to the embodiment of the present invention are shown in the diagram.
The memory space monitoring and cleaning test system comprises:
the file writing module 11 is configured to control repeated writing of at least three files matched with the specified directory to be verified into the specified directory to be verified in the memory of the server to be tested, where the at least three files matched with the specified directory to be verified include a file larger than an automatic cleaning size limit, a file equal to the automatic cleaning size limit, and a file smaller than the automatic cleaning size limit;
the utilization rate monitoring module 12 is configured to monitor the utilization rate of the specified directory to be verified while repeatedly writing the file matched with the specified directory to be verified;
the write-in action stopping module 13 is configured to stop an action of repeatedly writing in a file when it is monitored that the usage rate of the specified directory to be verified reaches a first preset threshold value;
the file existence judging module 14 is used for circularly judging whether files larger than the size limit of automatic cleaning exist in the repeatedly written files within the preset time;
the first judging module 15 is configured to, when it is judged that a file larger than the size limit of the automatic cleaning still exists, judge that the specified directory to be verified in the memory of the server to be tested has a functional abnormality, and fail to test;
the second judging module 16 is configured to, when it is judged that a file larger than the size limit of the automatic cleaning does not exist, judge that the specified directory to be verified in the memory of the server to be tested has a normal function, and pass the test;
and a first log file generation module 17, configured to generate a log file when the test is passed or failed.
In this embodiment, the system further includes:
a log adding module 18, configured to create a session, and add an API clear IDL log;
and the connection module 19 is used for establishing connection with the BMC IP through the BMC administrator identity at the client through the ssh instruction.
In an embodiment of the present invention, the system further includes:
the log detection and judgment module 20 is configured to detect an IDL log when it is monitored that the usage rate of the specified directory to be verified reaches a second preset threshold value, and judge whether an alarm log with insufficient space of a recording disk exists in the IDL log, where the second preset threshold value is smaller than the first preset threshold value;
a second log file generating module 21, configured to generate a log file with a normal warning function when it is determined that there is no warning log with insufficient disk space recorded in the IDL log, and continue to perform the step of stopping the action of repeatedly writing the file when it is monitored that the usage rate of the to-be-verified specified directory reaches a first preset threshold value;
and when judging that an alarm log for recording insufficient disk space exists in the IDL log, continuing to execute the step of stopping the action of repeatedly writing the file by the write action stopping module when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value.
The pre-configuration module 22 is configured to pre-configure the first preset threshold value and the second preset threshold value according to a functional requirement of the to-be-verified specified directory of the to-be-tested server;
the first preset threshold value is used for defining the designated directory utilization rate parameter of the automatic cleaning of the memory space, and the second preset threshold value is used for defining the triggering time limit of the disk space shortage warning function.
The functions of the modules are described in the above embodiments, and are not described herein again.
In the embodiment of the invention, at least three files matched with the specified directory to be verified are controlled to be repeatedly written into the specified directory to be verified in the memory of the server to be tested; monitoring the utilization rate of the appointed directory to be verified; when the usage rate of the specified directory to be verified reaches a first preset threshold value, stopping the action of repeatedly writing the files, and circularly judging whether the files which are repeatedly written still have files larger than the size limit of automatic cleaning in a preset time; when judging that the files larger than the size limit of automatic cleaning exist, judging that the specified directory to be verified in the memory of the server to be tested has abnormal functions, and failing to pass the test; when judging that the files larger than the size limit of the automatic cleaning do not exist, judging that the specified directory to be verified in the memory of the server to be tested has normal functions, and passing the test; meanwhile, the log file is generated, so that automatic testing of monitoring and cleaning of the memory space is realized, testing efficiency is improved, labor cost is saved, manual errors are reduced, and meanwhile, the log file is generated, and tracing is facilitated.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.

Claims (10)

1. A memory space monitoring and cleaning test method is characterized by comprising the following steps:
controlling to repeatedly write at least three files matched with the specified directory to be verified into the specified directory to be verified in the memory of the server to be tested, wherein the at least three files matched with the specified directory to be verified comprise files larger than an automatic cleaning size limit, files equal to the automatic cleaning size limit and files smaller than the automatic cleaning size limit;
monitoring the utilization rate of the specified directory to be verified while repeatedly writing the file matched with the specified directory to be verified;
when the usage rate of the specified directory to be verified reaches a first preset threshold value, stopping the action of repeatedly writing the files, and circularly judging whether the files which are repeatedly written have files with the size larger than the size limit of automatic cleaning in a preset time;
when judging that files larger than the size limit of automatic cleaning exist, judging that the specified directory to be verified in the memory of the server to be tested has abnormal functions, failing to pass the test, and generating a log file;
and when judging that the files larger than the size limit of the automatic cleaning do not exist, judging that the specified directory to be verified of the memory of the server to be tested has normal functions, passing the test, and generating a log file.
2. The memory space monitoring, cleaning and testing method according to claim 1, wherein the specified directory to be verified of the memory is a/var directory, a/conf directory or an/extlog directory;
the automatic cleaning size limit of the/var directory is 10M, the automatic cleaning size limit of the/conf directory is 100KB, and the automatic cleaning size limit of the/extlog directory is 3M.
3. The memory space monitoring, cleaning and testing method according to claim 2, wherein the step of controlling to repeatedly write at least three files matching with the specified directory to be verified into the specified directory to be verified of the server memory to be tested further comprises the following steps:
creating a session, and adding an API (application programming interface) to empty the IDL log;
and establishing connection with the BMC IP through the BMC administrator identity at the client through the ssh instruction.
4. The memory space monitoring and cleaning test method according to claim 3, wherein the step of monitoring the utilization rate of the specified directory to be verified while repeatedly writing the file matched with the specified directory to be verified is followed; when the monitored use rate of the specified directory to be verified reaches a first preset threshold value, the step of stopping the action of repeatedly writing the file also comprises the following steps:
when the usage rate of the specified directory to be verified reaches a second preset threshold value, detecting IDL logs, and judging whether alarm logs with insufficient disk space exist in the IDL logs, wherein the second preset threshold value is smaller than the first preset threshold value;
when judging that an alarm log for recording insufficient disk space exists in the IDL log, continuing to execute the step of stopping the action of repeatedly writing the file when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value;
and when judging that the IDL log does not have an alarm log for recording insufficient disk space, generating a log file with a normal disk space insufficiency alarm function, and continuing to execute the step of stopping the action of repeatedly writing the file when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value.
5. The memory space monitoring and cleaning test method according to claim 4, further comprising the steps of:
according to the functional requirements of the specified directory to be verified of the server to be tested, the first preset threshold value and the second preset threshold value are configured in advance;
the first preset threshold value is used for defining the designated directory utilization rate parameter of the automatic cleaning of the memory space, and the second preset threshold value is used for defining the triggering time limit of the disk space shortage warning function.
6. A memory space monitoring and cleaning test system, the system comprising:
the file writing module is used for controlling repeated writing of at least three files matched with the specified directory to be verified under the specified directory to be verified in the memory of the server to be tested, wherein the at least three files matched with the specified directory to be verified comprise files larger than an automatic cleaning size limit, files equal to the automatic cleaning size limit and files smaller than the automatic cleaning size limit;
the utilization rate monitoring module is used for monitoring the utilization rate of the specified directory to be verified while repeatedly writing the file matched with the specified directory to be verified;
the write-in action stopping module is used for stopping the action of repeatedly writing the file when the use rate of the specified directory to be verified reaches a first preset threshold value;
the file existence judging module is used for circularly judging whether the files which are repeatedly written in exist in the files which are larger than the size limit of automatic cleaning or not within the preset time;
the first judgment module is used for judging that the specified directory to be verified in the memory of the server to be tested has abnormal functions and fails the test when judging that the files larger than the size limit of the automatic cleaning still exist;
the second judgment module is used for judging that the specified directory to be verified in the memory of the server to be tested has normal functions and passes the test when judging that the files larger than the size limit of the automatic cleaning do not exist;
and the first log file generation module is used for generating a log file when the test is judged to pass or not pass.
7. The memory space monitoring, cleaning and testing system according to claim 6, wherein the specified directory to be verified of the memory is a/var directory, a/conf directory or an/extlog directory;
the automatic cleaning size limit of the/var directory is 10M, the automatic cleaning size limit of the/conf directory is 100KB, and the automatic cleaning size limit of the/extlog directory is 3M.
8. The memory space monitoring and cleaning test system according to claim 7, further comprising:
the log adding module is used for creating a session and adding an API (application programming interface) to empty the IDL log;
and the connection module is used for establishing connection with the BMC IP through the BMC administrator identity at the client through the ssh instruction.
9. The method according to claim 8, wherein the system further comprises:
the log detection and judgment module is used for detecting the IDL log when the usage rate of the specified directory to be verified reaches a second preset threshold value, judging whether an alarm log for recording insufficient disk space exists in the IDL log or not, wherein the second preset threshold value is smaller than the first preset threshold value;
a second log file generation module, configured to generate a log file with a normal warning function when it is determined that there is no warning log with insufficient disk space recorded in the IDL log, and continue to perform the step of stopping the action of repeatedly writing the file when it is monitored that the usage rate of the to-be-verified specified directory reaches a first preset threshold value;
and when judging that an alarm log for recording insufficient disk space exists in the IDL log, continuing to execute the step of stopping the action of repeatedly writing the file by the write action stopping module when monitoring that the utilization rate of the specified directory to be verified reaches a first preset threshold value.
10. The memory space monitoring and cleaning test system according to claim 9, further comprising:
the pre-configuration module is used for pre-configuring the first preset threshold value and the second preset threshold value according to the functional requirement of the specified directory to be verified of the server to be tested;
the first preset threshold value is used for defining the designated directory utilization rate parameter of the automatic cleaning of the memory space, and the second preset threshold value is used for defining the triggering time limit of the disk space shortage warning function.
CN201911314682.2A 2019-12-19 2019-12-19 Memory space monitoring and cleaning test method and system Withdrawn CN111367728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911314682.2A CN111367728A (en) 2019-12-19 2019-12-19 Memory space monitoring and cleaning test method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911314682.2A CN111367728A (en) 2019-12-19 2019-12-19 Memory space monitoring and cleaning test method and system

Publications (1)

Publication Number Publication Date
CN111367728A true CN111367728A (en) 2020-07-03

Family

ID=71208048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911314682.2A Withdrawn CN111367728A (en) 2019-12-19 2019-12-19 Memory space monitoring and cleaning test method and system

Country Status (1)

Country Link
CN (1) CN111367728A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711567A (en) * 2021-01-06 2021-04-27 湖南同有飞骥科技有限公司 Session file use space cleaning method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711567A (en) * 2021-01-06 2021-04-27 湖南同有飞骥科技有限公司 Session file use space cleaning method and system
CN112711567B (en) * 2021-01-06 2023-04-25 湖南同有飞骥科技有限公司 Session file use space cleaning method and system

Similar Documents

Publication Publication Date Title
TWI552158B (en) Systems and methods for testing memory
CN103568863A (en) Real-time monitoring diagnostic system and diagnostic method for electromobile battery management system
CN111104275A (en) Automatic testing method and device for flash SSD hard disk power supply
CN104268076A (en) Testing method suitable for automatically testing memory bandwidth of each processor platform
US20180062970A1 (en) Methods, systems, and computer readable media for utilizing loopback operations to identify a faulty subsystem layer in a multilayered system
CN113960391B (en) Device and method for testing abnormal power failure of storage medium
CN114664369A (en) Memory chip testing method and device
WO2019184612A1 (en) Terminal and electronic device
CN109741786A (en) A kind of solid state hard disk monitoring method, device and equipment
CN111367728A (en) Memory space monitoring and cleaning test method and system
CN113010423B (en) Electric energy meter software reliability detection method and device, computer equipment and medium
CN101706752B (en) Method and device for in-situ software error positioning
CN113851180A (en) System for detecting SSD (solid State disk) standby power reliability, test fixture and SSD
CN107357700A (en) A kind of method and system of test NVME hard disk order stability
CN107562565A (en) A kind of method for verifying internal memory Patrol Scurb functions
CN117607595A (en) Device improvement method, apparatus, device, storage medium, and program product
CN116230067A (en) Automatic testing method, system, equipment and medium for solid state disk
CN117373525A (en) ECC function test method and device, electronic equipment and storage medium
CN110688268A (en) Fault positioning method, device, equipment and medium for NVME SSD
CN109215724B (en) Method and device for automatically detecting and repairing memory
CN113094221A (en) Fault injection method and device, computer equipment and readable storage medium
CN111858136A (en) Method and system for detecting abnormal data of solid state disk, electronic device and storage medium
CN111857573A (en) Intelligent replacement method and system based on RAID (redundant array of independent disks) fault member disk
CN110993015B (en) Hard disk differential signal quality detection method, hard disk differential signal quality detection device, main control and medium
CN114020608B (en) Method for realizing regression test of railway CTC system background program

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200703