CN115168124A - Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium - Google Patents
Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium Download PDFInfo
- Publication number
- CN115168124A CN115168124A CN202210867461.3A CN202210867461A CN115168124A CN 115168124 A CN115168124 A CN 115168124A CN 202210867461 A CN202210867461 A CN 202210867461A CN 115168124 A CN115168124 A CN 115168124A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- test
- stability
- files
- testing
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000013112 stability test Methods 0.000 title claims description 8
- 238000012360 testing method Methods 0.000 claims abstract description 194
- 238000010586 diagram Methods 0.000 claims abstract description 31
- 101100226364 Arabidopsis thaliana EXT1 gene Proteins 0.000 claims abstract description 25
- 238000000638 solvent extraction Methods 0.000 claims abstract description 19
- 238000012430 stability testing Methods 0.000 claims abstract description 6
- 238000005192 partition Methods 0.000 claims description 34
- 230000008569 process Effects 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 9
- 230000002159 abnormal effect Effects 0.000 claims description 7
- 238000012545 processing Methods 0.000 claims description 2
- 238000012544 monitoring process Methods 0.000 claims 1
- 238000010998 test method Methods 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 9
- 238000013461 design Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2268—Logging of test results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to the technical field of computers, and particularly discloses a stability testing method for a hard disk to concurrently execute a plurality of files, a stability testing device for a hard disk to concurrently execute a plurality of files, computer equipment and a computer readable storage medium. The method for testing the stability of the multiple files concurrently executed by the hard disk comprises the following steps: partitioning a hard disk to be tested, creating a file system of EXT4 and mounting the file system to a specified directory; before testing, smart information and system logs of a hard disk are collected; executing a plurality of file opening tests on the hard disk concurrently and collecting updated hard disk information and system logs after the test is finished; and drawing a waveform diagram according to the test result to detect the stability of the hard disk operation performance. The test method can detect the performance of executing a plurality of files on the hard disk mounted under the file system. According to the technical scheme, the function test points can be at least efficiently and quickly covered, and labor is saved by one-click calling.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method for testing stability of a hard disk concurrently executing multiple files, an apparatus for testing stability of a hard disk concurrently executing multiple files, a computer device, and a computer-readable storage medium.
Background
With the rapid development of internet technology, especially with the rapid development of new technologies such as cloud computing, big data, artificial intelligence, internet of things and the like in recent years, hard disks are widely applied to servers, and meanwhile, higher requirements are made on the performance of the hard disks. Most of the existing methods for testing the performance of hard disks are basically writing by overwriting, namely, the data of the original hard disk can be erased, and the file structure is also damaged. In addition, the above method is not suitable for testing the performance of the hard disk to most files.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a method for testing stability of a hard disk concurrently executing multiple files. The test method can detect the performance of executing a plurality of files on the hard disk mounted under the file system. The function test point can be efficiently and quickly covered, and manpower is saved by one-key calling.
Based on the foregoing object, an aspect of the embodiments of the present invention provides a method for testing stability of multiple files concurrently executed by a hard disk. The stability test method for the concurrent execution of a plurality of files by the hard disk comprises the steps of partitioning the hard disk to be tested, creating a file system of EXT4 and mounting the file system to a specified directory; collecting smart information and system logs of a hard disk before testing; executing a plurality of file opening tests on the hard disk concurrently and collecting updated hard disk information and system logs after the test is finished; and drawing a waveform diagram according to the test result to detect the stability of the hard disk operation performance.
In some embodiments, the partitioning a hard disk to be tested, creating a file system of EXT4, and mounting the file system to a designated directory includes: partitioning the hard disk to be tested in a Linux system, creating an EXT4 file system in each partition, and mounting the partitions to a directory specified by the Linux system.
In some embodiments, the method for testing the stability of the hard disk by concurrently executing a plurality of files further comprises: and checking the upper limit of the number of handles which can be opened by a single process of the Linux system, and modifying the upper limit of the number of handles if the upper limit of the number of handles does not reach 2000.
In some embodiments, the step of collecting smart information and a system log of the hard disk before testing comprises: and entering a Linux system, and acquiring smart information and system logs of the hard disk to be tested before executing the multi-file startup test on the hard disk concurrently.
In some embodiments, the step of concurrently performing a plurality of file open tests on the hard disk and collecting updated hard disk information and system logs after the test is finished includes: checking whether the test is normally started or not through an iostat tool, and after the test is started, executing a plurality of 64M small files on the hard disk partition to be tested in a concurrent manner under different block size configurations; after the test is finished, the test result corresponding to each block size is stored in a test _ log folder of the corresponding disk character directory, wherein the test result comprises new hard disk information and a system log.
In some embodiments, the step of drawing a waveform graph according to the test result to detect the stability of the hard disk operation performance includes: drawing log files in different block size folders into a waveform diagram with time on an x-axis and bandwidth on a y-axis; and checking the stability of the performance of the hard disk to be tested through the oscillogram.
In some embodiments, the method for testing the stability of the multiple files executed concurrently by the hard disk further includes: and comparing smart log and error log before and after operation, and checking whether the exception record is newly added or not to determine whether the hard disk and the system are abnormal or not.
On the other hand, the embodiment of the invention also provides a device for testing the stability of the concurrent execution of a plurality of files by the hard disk. The stability testing device for the hard disk to concurrently execute a plurality of files comprises a creating unit, a pre-test collecting unit, a testing unit and a comparing unit. The creating unit is configured to partition the hard disk to be tested, create a file system of EXT4 and mount the file system to a specified directory; the pre-test collection unit is configured to collect smart information and system logs of the hard disk before testing; the test unit is configured to concurrently execute a plurality of file opening tests on the hard disk and collect updated hard disk information and system logs after the tests are finished; and the comparison unit is configured to draw a waveform diagram according to the test result to detect the stability of the hard disk operation performance.
In some embodiments, the creating unit is configured to partition the hard disk to be tested, create a file system of EXT4, and mount the file system to a specified directory.
In some embodiments, the pre-test collection unit is configured to collect smart information and system logs of the hard disk before testing.
In some embodiments, the test unit is configured to concurrently perform a plurality of file open tests on the hard disk and collect updated hard disk information and system logs after the test is completed.
In some embodiments, the comparison unit is configured to draw a waveform diagram according to the test result to detect the stability of the hard disk operation performance.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing steps of the method comprising: partitioning a hard disk to be tested, creating a file system of EXT4 and mounting the file system to a specified directory; before testing, smart information and system logs of a hard disk are collected; executing a plurality of file opening tests on the hard disk concurrently and collecting updated hard disk information and system logs after the test is finished; and drawing a waveform diagram according to the test result to detect the stability of the hard disk operation performance.
In some embodiments, partitioning the hard disk to be tested, creating a file system of EXT4, and mounting the file system to a specified directory includes: partitioning the hard disk to be tested in a Linux system, creating an EXT4 file system in each partition, and mounting the partitions to a directory specified by the Linux system.
In some embodiments, the method for testing the stability of the hard disk by concurrently executing a plurality of files further comprises: and checking the upper limit of the number of handles which can be opened by a single process of the Linux system, and modifying the upper limit of the number of handles if the upper limit of the number of handles does not reach 2000.
In some embodiments, collecting smart information and system logs of the hard disk before testing comprises: and entering a Linux system, and acquiring smart information and system logs of the hard disk to be tested before executing the multi-file startup test on the hard disk concurrently.
In some embodiments, concurrently performing multiple file open tests on a hard disk and collecting updated hard disk information and system logs after the tests are completed comprises: checking whether the test is normally started or not through an iostat tool, and after the test is started, executing a plurality of 64M small files on the hard disk partition to be tested in a concurrent manner under different block size configurations; after the test is finished, the test result corresponding to each block size is stored in a test _ log folder of a corresponding disk character directory, wherein the test result comprises new hard disk information and a system log.
In some embodiments, drawing a waveform graph according to the test result to detect the stability of the hard disk operation performance includes: drawing log files in different block size folders into a waveform diagram with time on an x-axis and bandwidth on a y-axis; and checking the performance stability of the hard disk to be tested through the oscillogram.
In some embodiments, the method for testing the stability of the multiple files executed concurrently by the hard disk further includes: and comparing smart log and error log before and after operation, and checking whether the exception record is newly added or not to determine whether the hard disk and the system are abnormal or not.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has at least the following beneficial technical effects:
in the process of concurrently executing a plurality of files in the file system, the hard disk to be tested finally generates a test report by testing the stability of the performance of the hard disk, and records the execution result of each test item. By using the design scheme, the function test points can be efficiently and quickly covered, the original manual execution test tools are respectively modularized, the executed process is converted into a calling module to be executed, one-key calling is performed, and labor is saved while the complex test task is overcome.
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, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a schematic diagram of an embodiment of a method for concurrently executing stability tests on multiple files by a hard disk according to the present invention;
FIG. 2 is a schematic diagram of an embodiment of a device for testing stability of a hard disk concurrently executing a plurality of files according to the present invention;
FIG. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention;
FIG. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above, a first aspect of the embodiments of the present invention provides an embodiment of a method for testing stability of a plurality of files concurrently executed by a hard disk. Fig. 1 is a schematic diagram illustrating an embodiment of a method for concurrently executing stability tests on multiple files by a hard disk according to the present invention. As shown in fig. 1, the method for testing the stability of multiple files concurrently executed by a hard disk according to the embodiment of the present invention includes the following steps:
001. partitioning a hard disk to be tested, creating a file system of EXT4 and mounting the file system to a specified directory;
002. before testing, smart information and system logs of a hard disk are collected;
003. executing a plurality of file opening tests on the hard disk concurrently and collecting updated hard disk information and system logs after the test is finished;
004. and drawing a waveform diagram according to the test result to detect the stability of the hard disk operation performance.
In this embodiment, a test method for concurrently executing multiple files on a hard disk is shown. The testing method comprises the steps of collecting smart information of the hard disk before and after testing, comparing the smart information with a system log, and drawing a waveform diagram to detect the stability of the running performance of the hard disk.
In some embodiments of the present invention, the partitioning a hard disk to be tested, creating a file system of EXT4, and mounting the file system to a specified directory includes: partitioning the hard disk to be tested in a Linux system, creating an EXT4 file system in each partition, and mounting the partitions to a directory specified by the Linux system.
In this embodiment, the disk partition mainly has two formats, MBR and GPT, and the two formats have different partition workers. EXT4 is a widely used Linux log file system. It has significant advantages such as improved design, better performance, reliability and new functionality. And initializing the newly-built partition, wherein if the file system initialization is not performed on the newly-built partition, the partition cannot be normally used. The partition can be mounted for use after initialization, before mounting, a mounting point needs to be determined, the mounting point is a directory, and the directory is an entry into the disk partition, but before mounting, it needs to be determined: a single file system should not be repeatedly mounted on different mounting points; a single mount point should not mount multiple file systems repeatedly; the directory to be a mount point should be an empty directory in theory, and if a file system is mounted under a non-empty directory, the contents under the directory disappear temporarily after mounting, and it needs to be noticed, not covered, and only hidden temporarily.
In some embodiments of the present invention, the method for testing the stability of the multiple files executed concurrently by the hard disk further includes: and checking the upper limit of the number of handles which can be opened by a single process of the Linux system, and modifying the upper limit of the number of handles if the upper limit of the number of handles does not reach 2000.
In the embodiment, after the partition is mounted to the specified directory, the upper limit of the number of handles of a single process of the Linux system needs to be checked first. The Linux system has a limit to the number of default handles that can be opened by a single process, and when the number of default handles is larger than the limit of the Linux system, a program throws a large number of errors which can not open files. The upper limit of the number of handles that can be opened is generally 1024, which is sufficient for general programs, but insufficient for many programs that require opening a large number of files or a large number of socket connections. ulimit is used to limit the resources, such as CPU, memory, handles, etc., that each user can use. The upper limit of the number of handles that can be opened can be viewed through ulimit-a. If the number of handles which can be opened is less than 2000, the upper limit number of the handles can be modified, and the handles are modified through ulimit-nx.
In some embodiments of the present invention, the step of collecting smart information and system logs of the hard disk before the test includes: and entering a Linux system, and acquiring smart information and system logs of the hard disk to be tested before executing the multi-file startup test on the hard disk concurrently.
In this embodiment, before a multi-file startup test is concurrently performed on a hard disk, a system call check module collects smart information of the hard disk to be tested and log information such as a current system log. The detection module is a module for detecting logs of the hard disk and the system before and after the test of the sent file.
In some embodiments of the present invention, the step of concurrently performing multiple file open tests on the hard disk and collecting updated hard disk information and system logs after the tests are finished includes: checking whether the test is normally started or not through an iostat tool, and after the test is started, executing a plurality of 64M small files on the hard disk partition to be tested in a concurrent manner under different block size configurations; after the test is finished, the test result corresponding to each block size is stored in a test _ log folder of the corresponding disk character directory, wherein the test result comprises new hard disk information and a system log.
In the present embodiment, iostat in the Linux system is an abbreviation of I/O statistics, and iostat commands are used to monitor the usage of system input and output devices and CPUs. It is characterized by that it can report disk activity statistical condition, at the same time can report CPU service condition. If the test is found to be started, issuing a plurality of 64M small files (nrfiles = 2000. The test result is a performance result of the hard disk generated after the multi-file test is completed, wherein the performance result includes smart information and system log information of the updated hard disk.
In some embodiments of the present invention, the step of drawing a waveform diagram according to the test result to detect the stability of the hard disk operation performance includes: drawing log files in different block size folders into a waveform diagram with time on an x-axis and bandwidth on a y-axis; and checking the stability of the performance of the hard disk to be tested through the oscillogram.
In this embodiment, data of log files in different block size folders are called, and a waveform diagram is drawn. The stable performance of the operation of executing a plurality of small files can be intuitively seen according to the generated oscillogram.
In some embodiments of the present invention, the method for testing stability of multiple files concurrently executed by a hard disk further includes: and comparing smart log and error log before and after operation, and checking whether the exception record is newly added or not to determine whether the hard disk and the system are abnormal or not.
In this embodiment, the error log is a text file used to record runtime error information. And comparing smart logs and error logs collected before and after the test respectively, and determining whether the hard disk and the system work normally or not by adding new visual factors.
In the process of concurrently executing a plurality of files in the file system, the hard disk to be tested finally generates a test report by testing the stability of the performance of the hard disk and records the execution result of each test item. By using the design scheme, the function test points can be efficiently and quickly covered, the original manual execution test tools are respectively modularized, the executed process is converted into a calling module to be executed, one-key calling is performed, and labor is saved while the complex test task is overcome.
In view of the above, a second aspect of the embodiments of the present invention provides a stability testing apparatus for concurrently executing multiple files on a hard disk. Fig. 2 is a schematic diagram illustrating an embodiment of a stability testing apparatus for concurrently executing multiple files by a dedicated hard disk according to the present invention. As shown in fig. 2, the apparatus for testing the stability of the hard disk concurrently executing a plurality of files according to the embodiment of the present invention includes: the system comprises a creating unit 011 and a processing unit, wherein the creating unit 011 is configured to partition a hard disk to be tested, create a file system of EXT4 and mount the file system to a specified directory; a pre-test collection unit 012, where the pre-test collection unit 012 is configured to collect smart information and system logs of a hard disk before a test; the system comprises a test unit 013, a comparison unit 014 and a control unit, wherein the test unit 013 is configured to concurrently execute a plurality of file opening tests on the hard disk and collect updated hard disk information and system logs after the test is finished, and the comparison unit 014 is configured to draw a waveform diagram according to a test result to detect stability of the hard disk operation performance.
In some embodiments of the present invention, the creating unit 011 is further configured to partition the hard disk to be tested in the Linux system, create a file system of EXT4 in each partition, and mount the partition in a directory specified by the Linux system.
In some embodiments of the present invention, the pre-test collection unit 012 is further configured to enter a Linux system, and obtain smart information and a system log of a hard disk to be tested before concurrently executing a multi-file startup test on the hard disk.
In some embodiments of the present invention, the test unit 013 is further configured to check whether the test has been started normally through the iostat tool, and after the test is started, concurrently execute a plurality of 64M small files on the hard disk partition to be tested in different block size configurations; after the test is finished, the test result corresponding to each block size is stored in a test _ log folder of the corresponding disk character directory, wherein the test result comprises new hard disk information and a system log.
In some embodiments of the present invention, the comparing unit 014 is further configured to draw log files in different block size folders into a waveform diagram with time on the x-axis and bandwidth on the y-axis, check the stability of the performance of the hard disk to be tested through the waveform diagram, compare smart log and error log before and after running, and check whether an exception record is newly added to determine whether the hard disk and the system are abnormal.
The stability test apparatus for concurrently executing a plurality of files on a disk according to an embodiment of the present invention employs four units, which are a creation unit 011, a pre-test collection unit 012, a test unit 013, and a comparison unit 014, respectively. The four units are matched with each other, and smart information and system logs of the hard disk to be tested before and after the hard disk to be tested is tested can be collected. The function test points can be efficiently and quickly covered, the original manual execution test tool is modularized, the execution process is converted into a calling module to be executed, one-key calling is performed, and labor is saved while a complex test task is overcome. And the oscillogram is adopted to ensure that the test result is more intuitive and the stability of the reaction performance is ensured.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, the computer apparatus of the embodiment of the present invention includes the following means: at least one processor 021; and a memory 022, the memory 022 storing computer instructions 023 executable on the processor, the instructions when executed by the processor implementing steps of the method comprising: partitioning a hard disk to be tested, creating a file system of EXT4 and mounting the file system to a specified directory; before testing, smart information and system logs of a hard disk are collected; executing a plurality of file opening tests on the hard disk concurrently and collecting updated hard disk information and system logs after the test is finished; and drawing a waveform diagram according to the test result to detect the stability of the hard disk operation performance.
In some embodiments, the partitioning the hard disk to be tested, creating a file system of EXT4, and mounting the file system to a specified directory includes: partitioning the hard disk to be tested in a Linux system, creating an EXT4 file system in each partition, and mounting the partitions to a directory specified by the Linux system.
In some embodiments, the method for testing the stability of the multiple files executed concurrently by the hard disk further includes: and checking the upper limit of the number of handles which can be opened by a single process of the Linux system, and modifying the upper limit of the number of handles if the upper limit does not reach 2000.
In some embodiments, the step of collecting smart information and a system log of the hard disk before testing includes: and entering a Linux system, and acquiring smart information and system logs of the hard disk to be tested before executing the multi-file startup test on the hard disk concurrently.
In some embodiments, the step of concurrently performing a plurality of file open tests on the hard disk and collecting updated hard disk information and system logs after the test is finished includes: checking whether the test is normally started or not through an iostat tool, and after the test is started, executing a plurality of 64M small files on the hard disk partition to be tested in a concurrent manner under different block size configurations; after the test is finished, the test result corresponding to each block size is stored in a test _ log folder of the corresponding disk character directory, wherein the test result comprises new hard disk information and a system log.
In some embodiments, the step of drawing a waveform graph according to the test result to detect the stability of the hard disk operation performance includes: drawing log files in different block size folders into a waveform diagram with time on an x axis and bandwidth on a y axis; and checking the stability of the performance of the hard disk to be tested through the oscillogram.
In some embodiments, the method for testing the stability of the multiple files executed concurrently by the hard disk further includes: and comparing smart log and error log before and after operation, and checking whether the exception record is newly added or not to determine whether the hard disk and the system are abnormal or not.
The invention also provides a computer readable storage medium. FIG. 4 is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer readable storage medium 031 stores a computer program 032 which, when executed by a processor, performs the method of the present invention, and specifically, the method includes:
partitioning a hard disk to be tested, creating a file system of EXT4 and mounting the file system to a specified directory; before testing, smart information and system logs of a hard disk are collected; executing a plurality of file opening tests on the hard disk concurrently and collecting updated hard disk information and system logs after the test is finished; and drawing a waveform diagram according to the test result to detect the stability of the hard disk operation performance.
In some embodiments, the partitioning a hard disk to be tested, creating a file system of EXT4, and mounting the file system to a designated directory includes: partitioning the hard disk to be tested in a Linux system, creating an EXT4 file system in each partition, and mounting the partitions to a directory specified by the Linux system.
In some embodiments, the method for testing the stability of the multiple files executed concurrently by the hard disk further includes: and checking the upper limit of the number of handles which can be opened by a single process of the Linux system, and modifying the upper limit of the number of handles if the upper limit of the number of handles does not reach 2000.
In some embodiments, the step of collecting smart information and a system log of the hard disk before testing includes: and entering a Linux system, and acquiring smart information and system logs of the hard disk to be tested before executing the multi-file startup test on the hard disk concurrently.
In some embodiments, the step of concurrently performing a plurality of file open tests on the hard disk and collecting updated hard disk information and system logs after the test is finished includes: checking whether the test is normally started or not through an iostat tool, and after the test is started, executing a plurality of 64M small files on the hard disk partition to be tested in a concurrent manner under different block size configurations; after the test is finished, the test result corresponding to each block size is stored in a test _ log folder of the corresponding disk character directory, wherein the test result comprises new hard disk information and a system log.
In some embodiments, the step of drawing a waveform graph according to the test result to detect the stability of the hard disk operation performance includes: drawing log files in different block size folders into a waveform diagram with time on an x-axis and bandwidth on a y-axis; and checking the stability of the performance of the hard disk to be tested through the oscillogram.
In some embodiments, the method for testing the stability of the multiple files executed concurrently by the hard disk further includes: and comparing smart log and error log before and after operation, and checking whether the exception record is newly added or not to determine whether the hard disk and the system are abnormal or not. .
Finally, it should be noted that, as one of ordinary skill in the art can appreciate that all or part of the processes in the methods of the above embodiments can be implemented by a computer program to instruct related hardware, and the program of the method for centralized server testing can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods as described above. The storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM), or a Random Access Memory (RAM). The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the methods disclosed according to embodiments of the invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (D0L), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, D0L, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing are exemplary embodiments of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the above embodiments of the present invention are merely for description, and do not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A stability test method for a hard disk to concurrently execute a plurality of files is characterized in that the stability test method for the hard disk to concurrently execute the plurality of files comprises the following steps:
partitioning a hard disk to be tested, creating a file system of EXT4 and mounting the file system to a specified directory;
before testing, smart information and system logs of a hard disk are collected;
executing a plurality of file opening tests on the hard disk concurrently and collecting updated hard disk information and system logs after the test is finished; and
and drawing a waveform diagram according to the test result to detect the stability of the hard disk operation performance.
2. The method for testing the stability of the concurrent execution of the plurality of files by the hard disk according to claim 1, wherein the steps of partitioning the hard disk to be tested, creating a file system of EXT4, and mounting the file system to a specified directory comprise:
partitioning the hard disk to be tested in a Linux system, creating an EXT4 file system in each partition, and mounting the partitions to a directory specified by the Linux system.
3. The method for testing the stability of the hard disk for the concurrent execution of the plurality of files according to claim 2, wherein the method for testing the stability of the hard disk for the concurrent execution of the plurality of files further comprises: and checking the upper limit of the number of handles which can be opened by a single process of the Linux system, and modifying the upper limit of the number of handles if the upper limit does not reach 2000.
4. The method for testing the stability of the concurrent execution of the plurality of files by the hard disk according to claim 1, wherein the step of collecting smart information and system logs of the hard disk before testing comprises: and entering a Linux system, and acquiring smart information and system logs of the hard disk to be tested before executing the multi-file startup test on the hard disk concurrently.
5. The method for testing the stability of the concurrent execution of the plurality of files by the hard disk according to claim 1, wherein the step of concurrently executing the plurality of file opening tests on the hard disk and collecting the updated hard disk information and the system log after the test is finished comprises:
checking whether the test is normally started or not through an iostat tool, and after the test is started, executing a plurality of 64M small files on the hard disk partition to be tested in a concurrent manner under different block size configurations;
after the test is finished, the test result corresponding to each block size is stored in a test _ log folder of the corresponding disk character directory, wherein the test result comprises new hard disk information and a system log.
6. The method for testing the stability of the concurrent execution of the plurality of files on the hard disk according to claim 5, wherein the step of drawing the waveform diagram according to the test result to detect the stability of the operation performance of the hard disk comprises:
drawing log files in different block size folders into a waveform diagram with time on an x-axis and bandwidth on a y-axis; and
and checking the stability of the performance of the hard disk to be tested through the oscillogram.
7. The method for testing the stability of the hard disk for the concurrent execution of the plurality of files according to claim 1, wherein the method for testing the stability of the hard disk for the concurrent execution of the plurality of files further comprises: and comparing smart log and error log before and after operation, and checking whether the exception record is newly added or not to determine whether the hard disk and the system are abnormal or not.
8. A stability testing device for a hard disk to concurrently execute a plurality of files is characterized by comprising: the system comprises a creating unit, a judging unit and a processing unit, wherein the creating unit is configured to partition a hard disk to be tested, create a file system of EXT4 and mount the file system to a specified directory; the system comprises a pre-test collecting unit, a pre-test collecting unit and a pre-test monitoring unit, wherein the pre-test collecting unit is configured to collect smart information and system logs of a hard disk before testing; the system comprises a test unit, a storage unit and a control unit, wherein the test unit is configured to concurrently execute a plurality of file opening tests on a hard disk and collect updated hard disk information and system logs after the test is finished; and the comparison unit is configured to draw a waveform diagram according to the test result so as to detect the stability of the hard disk operation performance.
9. A computer device, comprising: at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210867461.3A CN115168124A (en) | 2022-07-22 | 2022-07-22 | Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210867461.3A CN115168124A (en) | 2022-07-22 | 2022-07-22 | Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115168124A true CN115168124A (en) | 2022-10-11 |
Family
ID=83497160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210867461.3A Pending CN115168124A (en) | 2022-07-22 | 2022-07-22 | Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115168124A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115686960A (en) * | 2022-10-31 | 2023-02-03 | 中科可控信息产业有限公司 | Test method, test device, electronic equipment and storage medium |
-
2022
- 2022-07-22 CN CN202210867461.3A patent/CN115168124A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115686960A (en) * | 2022-10-31 | 2023-02-03 | 中科可控信息产业有限公司 | Test method, test device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107341098B (en) | Software performance testing method, platform, equipment and storage medium | |
CN107506451B (en) | Abnormal information monitoring method and device for data interaction | |
CN111897724B (en) | Automatic testing method and device suitable for cloud platform | |
CN102880546B (en) | Software integration testing method and system based on extensible markup language (XML) database | |
CN110704277B (en) | Method for monitoring application performance, related equipment and storage medium | |
CN110457277A (en) | Service process performance analysis method, device, equipment and storage medium | |
CN115080398A (en) | Automatic interface test system and method | |
US8850407B2 (en) | Test script generation | |
CN115827436A (en) | Data processing method, device, equipment and storage medium | |
CN115168124A (en) | Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium | |
CN111274130A (en) | Automatic testing method, device, equipment and storage medium | |
CN114003269A (en) | Component processing method and device, electronic equipment and storage medium | |
CN110727565B (en) | Network equipment platform information collection method and system | |
CN115454856B (en) | Multi-application security detection method, device, medium and electronic equipment | |
CN111400171A (en) | Interface testing method, system, device and readable storage medium | |
CN115022201B (en) | Data processing function test method, device, equipment and storage medium | |
CN117033099A (en) | Pressure testing method, system and device for system hard disk and storage medium | |
CN114090514A (en) | Log retrieval method and device for distributed system | |
CN114816914A (en) | Data processing method, equipment and medium based on Kubernetes | |
CN115248782A (en) | Automatic testing method and device and computer equipment | |
JP2024526023A (en) | A self-optimizing analysis system for core dumps | |
CN114185656A (en) | Test task processing method, device, equipment and storage medium | |
CN114064510A (en) | Function testing method and device, electronic equipment and storage medium | |
CN113535575A (en) | Benchmark testing method and device for basic environment of software and hardware product | |
CN113238940A (en) | Interface test result comparison method, device, equipment and storage medium |
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 |