Disk space detection method and device, storage medium and electronic equipment
By checking the used space and disk quota of the target disk, determining the remaining space and controlling the simulation process, the simulation exception problem caused by insufficient disk space in the existing technology is solved, and the stable operation of the simulation process is achieved.
Patent Information
- Application Number
- CN202411636936.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art cannot accurately determine the remaining space in the disk, resulting in the remaining space of the disk being filled by the simulation results when the simulation results do not reach the maximum saving number, which leads to simulation exceptions.
Check the used space and disk quota of the target disk by executing a predetermined check command to determine the remaining space of the disk and stop the simulation if the remaining space does not meet the simulation conditions.
It realizes that when the simulation results occupy a large disk space, it is timely determined whether the disk space can be fully stored, avoid simulation exceptions, and ensure the stable operation of the simulation process.
Smart Images

Figure CN119597554A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for detecting disk space. Background Art
[0002] The schematic and layout editing tool (Empyrean Aether, Aether) has built an efficient and convenient analog circuit design platform, which supports schematic editing, layout editing and simulation integrated environment, and is seamlessly integrated with circuit simulation tools (Empyrean ALPS), physical verification tools (Empyrean Argus), parasitic parameter extraction tools (EmpyreanRCExplorer) and power device reliability analysis tools (Empyrean Polas), providing users with a complete, smooth and efficient one-stop design process.
[0003] Currently, during the simulation process, the History Number function in Aether is usually used to control the maximum number of simulation results to be saved, helping users manage simulation data, limit the disk space occupied by simulation results, and then detect whether the remaining space on the disk supports simulation.
[0004] However, using this disk space detection method, since it is impossible to accurately determine the remaining space on the disk, if the remaining space on the disk is small and the simulation results require a large amount of disk space, the remaining disk space will be filled up by the simulation results before the maximum number of simulation results can be saved, which will cause the simulation to fail. Summary of the invention
[0005] In view of this, the present application provides a disk space detection method, device, storage medium and electronic device, the main purpose of which is to improve the current existing technology due to the inability to accurately determine the remaining space in the disk. If the remaining space in the disk is small and the simulation results require a large amount of disk space, the remaining space on the disk will be filled with simulation results when the maximum number of simulation results to be saved has not been reached, which will lead to a technical problem of abnormal simulation.
[0006] In a first aspect, the present application provides a method for detecting disk space, comprising:
[0007] In response to receiving instruction information for performing simulation, executing a predetermined check command to perform a disk space check on a target disk for storing simulation results;
[0008] Based on the disk space check result, determining the used space and disk quota of the target disk;
[0009] Determine the remaining space of the target disk according to the used space and the disk quota;
[0010] The remaining space is detected, and when it is detected that the remaining space does not meet the simulation condition, the simulation is controlled to be stopped.
[0011] Optionally, executing a predetermined check command to check the disk space of a target disk for storing simulation results includes:
[0012] Calling a first environment variable, wherein the value of the first environment variable is an executable text file containing the predetermined inspection command;
[0013] By executing the predetermined check command corresponding to the first environment variable, a disk space check is performed on the target disk, and the predetermined check command is used to determine a first indicator value representing the used space and a second indicator value representing the disk quota corresponding to the target disk.
[0014] Optionally, determining the remaining space of the target disk according to the used space and the disk quota includes:
[0015] Obtaining the first indicator value and the second indicator value obtained by performing a disk space check;
[0016] The first indicator value and the second indicator value are analyzed to determine a third indicator value representing the remaining space of the target disk.
[0017] Optionally, the detecting the remaining space includes:
[0018] Calling a second environment variable, wherein the value of the second environment variable is a remaining space threshold;
[0019] By executing the second environment variable, it is determined whether the remaining space is less than the remaining space threshold.
[0020] Optionally, when it is detected that the remaining space does not meet the simulation condition, controlling to stop the simulation includes:
[0021] If it is determined that the remaining space is less than the remaining space threshold, the simulation is stopped and simulation warning information indicating that the disk space is full is generated.
[0022] Optionally, also include:
[0023] If it is determined that the remaining space is greater than or equal to the remaining space threshold, simulation is performed based on the instruction information.
[0024] In a second aspect, the present application provides a disk space detection device, comprising:
[0025] an execution module, configured to execute a predetermined check command to perform a disk space check on a target disk for storing simulation results in response to receiving instruction information for performing simulation;
[0026] A determination module, configured to determine the used space and disk quota of the target disk based on the disk space check result;
[0027] The determination module is further configured to determine the remaining space of the target disk according to the used space and the disk quota;
[0028] The detection module is configured to detect the remaining space and control the simulation to stop if it is detected that the remaining space does not meet the simulation condition.
[0029] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the disk space detection method described in the first aspect.
[0030] In a fourth aspect, the present application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the disk space detection method described in the first aspect when executing the computer program.
[0031] In a fifth aspect, the present application provides a computer program product, which includes a computer program, characterized in that when the computer program is executed by a processor, it implements the disk space detection method described in the first aspect.
[0032] By means of the above technical scheme, the present application provides a disk space detection method, device, storage medium and electronic device. Compared with the current existing technology, the present application checks the used space and disk quota of the disk by executing a predetermined check command, and then obtains the remaining space of the disk based on the used space and the disk quota, and stops the simulation when the remaining space does not meet the simulation conditions. When the simulation results occupy a large amount of disk space, it can be judged in time whether the disk space can be fully stored, avoiding simulation anomalies caused by insufficient disk space during the simulation process, ensuring the stable operation of the simulation process, realizing the detection of disk space by the simulation software, and maintaining the safe operation of the simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0035] Figure 1 A schematic diagram of a process flow of a disk space detection method provided by an embodiment of the present application is shown;
[0036] Figure 2 A schematic diagram of a process flow of a disk space detection method provided by an embodiment of the present application is shown;
[0037] Figure 3 A schematic diagram of the structure of a disk space detection device provided in an embodiment of the present application is shown;
[0038] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0039] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0040] In order to improve the technical problem that the existing technology cannot accurately determine the remaining space on the disk, if the remaining space on the disk is small and the disk space required by the simulation results is large, the remaining space on the disk will be filled up by the simulation results before the maximum number of simulation results is saved, which will cause the simulation to be abnormal. This embodiment provides a method for detecting disk space, such as Figure 1 As shown, the method includes:
[0041] Step 101 : In response to receiving instruction information for performing simulation, executing a predetermined check command to perform a disk space check on a target disk for storing simulation results.
[0042] In the embodiment of the present application, the execution subject of the embodiment of the present application can be a simulation software tool in the command line interface (Linux console), such as a schematic and layout editing tool (Empyrean Aether). Specifically, the Linux console is a powerful tool for interacting with the Linux operating system. Through the console, users can perform various tasks, such as file management, system configuration, network management, process control, etc. Among them, Aether is mainly a tool for managing and deploying containerized applications on Linux systems.
[0043] Correspondingly, the instruction information for performing simulation can be triggered by the user, and the user clicks to perform simulation, thereby generating the instruction information for performing simulation. After receiving the instruction information for performing simulation, the simulation can be started.
[0044] In some examples, the predetermined check command may be a check command pre-configured in the simulation software, and the check command in the embodiment of the present application may check the used space and the remaining space of the disk.
[0045] For this embodiment, the target disk can be the disk for storing the simulation results obtained in this simulation. For example, if simulation result A needs to be stored in disk A, and simulation result B needs to be stored in disk B, then when the instruction to start simulation is received, it is necessary to determine whether to simulate A or B. If this is simulation A, it is necessary to check the disk space of disk A, and so on. Examples are not given one by one here.
[0046] Step 102: Based on the disk space check result, determine the used space and disk quota of the target disk.
[0047] In some examples, the used disk space is the space that has been occupied by the disk. Accordingly, the disk quota is a mechanism for limiting the disk space and number of files used by users or groups in the file system. By setting disk quotas, system administrators can effectively manage and control the use of disk resources to prevent a user or group from occupying too much disk space, thereby affecting the normal operation of other users or the system.
[0048] In the embodiment of the present application, the disk space check result consists of two specific values, which are used to represent the used space of the disk and the disk quota respectively.
[0049] Step 103: Determine the remaining space of the target disk based on the used space and the disk quota.
[0050] For this embodiment, the remaining space of the disk can be the difference between the disk quota and the used space of the disk, and the remaining space of the disk can also be obtained by calculating the used space and the disk quota in other ways. The specific calculation method of the remaining space of the disk is not limited in the embodiment of this application.
[0051] Step 104: Detect the remaining space, and control to stop the simulation if it is detected that the remaining space does not meet the simulation condition.
[0052] In some examples, the remaining disk space is detected to determine whether the remaining disk space supports simulation, that is, whether the remaining disk space can store the simulation results. If it can be stored, simulation can be performed. If it cannot be stored, simulation cannot be performed. If simulation is started, simulation exceptions or simulation exit will occur during the simulation process.
[0053] In an embodiment of the present application, the simulation condition may be that the remaining disk space is less than a remaining space threshold, or the remaining disk space is not greater than a remaining space threshold, etc. It should be noted that the simulation condition must ensure that the remaining disk space can store the simulation results.
[0054] Compared with the current existing technology, this embodiment checks the used space and disk quota of the disk by executing a predetermined check command, and then obtains the remaining space of the disk based on the used space and the disk quota, and stops the simulation when the remaining space does not meet the simulation conditions. It can timely determine whether the disk space can be fully stored when the simulation results occupy a large amount of disk space, avoiding simulation anomalies caused by insufficient disk space during the simulation process, ensuring the stable operation of the simulation process, realizing the detection of disk space by the simulation software, and maintaining the safe operation of the simulation.
[0055] As a refinement and extension of the above embodiment, when executing the predetermined check command to check the disk space of the target disk for storing the simulation results, the following methods may be used but are not limited to: Figure 2 As shown, the method includes:
[0056] Step 201: Call the first environment variable.
[0057] The value of the first environment variable is an executable text file containing a predetermined inspection command.
[0058] In the embodiments of the present application, environment variables are a very important configuration tool, which can be used to control the behavior of simulation software, set paths, configure parameters, etc. Different simulation software may support different environment variables.
[0059] In some examples, the first environment variable may be AETHER_CHECK_DISK_SPACE_CMD. Specifically, AETHER_CHECK_DISK_SPACE_CMD is an environment variable in the Aether project, which is used to specify a command or script for checking disk space. By setting this environment variable, Aether can automatically check whether the disk space is sufficient before performing certain operations to avoid operation failures due to insufficient disk space.
[0060] For example, this application needs to set the environment variable AETHER_CHECK_DISK_SPACE_CMD in advance in the code of the simulation software. The value of this environment variable is: the command to check the disk space, referred to as the check command. The check command should be an executable text file. The command to check the disk space is written in this text file, including any text that can be automatically executed by the Linux system, such as Shell scripts, Python scripts, etc.
[0061] Step 202: Perform a disk space check on the target disk by executing a predetermined check command corresponding to the first environment variable.
[0062] The predetermined checking command is used to determine a first indicator value indicating the used space and a second indicator value indicating the disk quota corresponding to the target disk.
[0063] Further, based on step 201, during the running process of the simulation software, the environment variable AETHER_CHECK_DISK_SPACE_CMD can be directly called to detect the used space and disk quota in the disk.
[0064] It should be noted that the scheduled check command needs to be able to return two values. In other words, after the check command is run in the Linux console, two numbers need to be printed in the Linux console, with the first number and the second number separated by a space. The first number needs to mean: the used disk space (Usage), and the second number needs to mean: the disk quota (Quota).
[0065] Further, when determining the remaining space of the target disk based on the used space and the disk quota, the following method may be used but is not limited to the following method, including:
[0066] Step 11: Obtain the first indicator value and the second indicator value obtained by performing a disk space check.
[0067] In some examples, the first indicator value is a value representing the used space of the disk, and the second indicator value is a value representing the disk quota.
[0068] Exemplarily, executing AETHER_CHECK_DISK_SPACE_CMD once is equivalent to executing a check command. This check command has been set in the simulation software, and the check command will print two numbers to the Linux console, the first number is the used disk space, that is, the first indicator value in this embodiment, and the second number is the disk quota, that is, the second indicator value in this embodiment.
[0069] For example, after receiving the simulation instruction, the check command AETHER_CHECK_DISK_SPACE_CMD is executed, and the check command will print a first indicator value representing the used disk space and a second indicator value representing the disk quota.
[0070] Step 12: Analyze the first indicator value and the second indicator value to determine a third indicator value representing the remaining space of the target disk.
[0071] In the embodiment of the present application, the third indicator value is a value representing the remaining space on the disk. Specifically, the third indicator value can be obtained by subtracting the first indicator value from the second indicator value. For example, if the first indicator value is 5 and the second indicator value is 7, the third indicator value can be obtained by subtracting the first indicator value from the second indicator value, that is, 7-5=2, so the third indicator value can be obtained as 2, and so on. Examples are not given one by one here.
[0072] Optionally, when performing the detection of the remaining space, the following method may be used but is not limited to the following method, including:
[0073] Step 21: Call the second environment variable.
[0074] The value of the second environment variable is the remaining space threshold.
[0075] In an embodiment of the present application, the second environment variable may be AETHER_DISK_SPACE_LIMIT. The value of the environment variable is the disk remaining space limit, in GB. If the second environment variable is not set, the disk remaining space limit is the default value, for example, the default value may be 100MB.
[0076] Specifically, AETHER_DISK_SPACE_LIMIT is an environment variable that specifies the minimum threshold for disk space. If the available disk space falls below this threshold, Aether will stop performing certain operations to avoid problems caused by insufficient disk space.
[0077] It should be noted that the value of the second environment variable is the disk remaining space threshold, which can be set according to user needs. If the user does not set it, the disk remaining space threshold is the default threshold.
[0078] Furthermore, the values of the second environment variable and the first environment variable are pre-configured in the simulation software. Before starting the simulation, the simulation software can directly call the first environment variable and the second environment variable to jointly detect whether the disk space can be simulated.
[0079] Exemplarily, the writing process of the first environment variable and the second environment variable may include the following examples, but is not limited thereto:
[0080] Example 1: Write the command to check disk space into the environment variable so that the software can automatically call the environment variable to monitor the disk space in real time.
[0081] Example 2: Write the command to check disk space into another text file, such as disk_check.sh, dick_check.py, or convert it into any other form of computer information, and then write this file or computer information into an environment variable so that the software can automatically call the environment variable to monitor the disk space in real time.
[0082] Example 3: Write the script that checks disk space into the environment variable so that the software can automatically call the environment variable to monitor the disk space in real time.
[0083] Example 4: Write a special command, script or any file (the special feature of which is that it can return the current remaining disk space, disk quota, and any other disk space-related information) into the environment variable, or directly write it into the software code in the form of text, string, or file, so that the software can automatically call any information carrier such as environment variables, executable text, executable commands, executable files, etc. to monitor the disk space in real time.
[0084] Step 22: Determine whether the remaining space is less than the remaining space threshold by executing the second environment variable.
[0085] Exemplarily, based on step 21, AETHER_DISK_SPACE_LIMIT can specify a minimum disk space threshold (in KB), and the simulation software will compare the current available disk space with this threshold. If the current available space is lower than the threshold, the simulation software will stop executing certain operations.
[0086] For example, if the remaining space threshold in the second environment variable is 3, and the remaining space of the disk detected by the first environment variable is 2, it is necessary to compare the remaining space threshold with the detected remaining space of the disk.
[0087] Optionally, when controlling to stop the simulation when it is detected that the remaining space does not meet the simulation conditions, the following method can be adopted but is not limited to, the method including: if it is determined that the remaining space is less than the remaining space threshold, controlling to stop the simulation and generating a simulation alarm message indicating that the disk space is full.
[0088] Further, based on step 22, if the remaining space is less than the remaining space threshold, it means that the remaining space of the disk cannot store all the obtained simulation results, and it is necessary to stop the current simulation and generate a pop-up window to warn the user that the disk space is full. After that, the software continues to occupy the previous memory and continues to run normally. Because the simulation has been stopped, the memory will not be full or exceed the remaining space, and the simulation software will not exit abnormally.
[0089] Optionally, the method of this embodiment further includes: if it is determined that the remaining space is greater than or equal to a remaining space threshold, performing simulation based on the instruction information.
[0090] Further, based on step 22, if the remaining space is greater than or equal to the remaining space threshold, it means that the remaining space of the disk can store the simulation results, and the simulation can be performed normally.
[0091] Compared with the current existing technology, this embodiment checks the used space and disk quota of the disk by executing a predetermined check command, and then obtains the remaining space of the disk based on the used space and the disk quota, and stops the simulation when the remaining space does not meet the simulation conditions. It can timely determine whether the disk space can be fully stored when the simulation results occupy a large amount of disk space, avoiding simulation anomalies caused by insufficient disk space during the simulation process, ensuring the stable operation of the simulation process, realizing the detection of disk space by the simulation software, and maintaining the safe operation of the simulation.
[0092] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in the embodiment provides a disk space detection device, such as Figure 3 As shown, the device includes: an execution module 31, a determination module 32, and a detection module 33.
[0093] The execution module 31 is configured to execute a predetermined check command to perform a disk space check on a target disk for storing simulation results in response to receiving instruction information for performing simulation;
[0094] A determination module 32 is configured to determine the used space and disk quota of the target disk based on the disk space check result;
[0095] The determination module 32 is further configured to determine the remaining space of the target disk according to the used space and the disk quota;
[0096] The detection module 33 is configured to detect the remaining space, and control the simulation to stop if it is detected that the remaining space does not meet the simulation condition.
[0097] In some examples of this embodiment, the execution module 31 is specifically configured to call a first environment variable, the value of which is an executable text file containing the predetermined check command; by executing the predetermined check command corresponding to the first environment variable, a disk space check is performed on the target disk, and the predetermined check command is used to determine a first indicator value representing the used space and a second indicator value representing the disk quota corresponding to the target disk.
[0098] In some examples of this embodiment, the determination module 32 is specifically configured to obtain the first indicator value and the second indicator value obtained by performing a disk space check; analyze the first indicator value and the second indicator value to determine a third indicator value representing the remaining space of the target disk.
[0099] In some examples of this embodiment, the detection module 33 is specifically configured to call a second environment variable, the value of which is a remaining space threshold; by executing the second environment variable, it is determined whether the remaining space is less than the remaining space threshold.
[0100] In some examples of this embodiment, the detection module 33 is further configured to control the simulation to stop if it is determined that the remaining space is less than the remaining space threshold, and generate simulation warning information indicating that the disk space is full.
[0101] In some examples of this embodiment, the detection module 33 is further configured to perform simulation based on the instruction information if it is determined that the remaining space is greater than or equal to the remaining space threshold.
[0102] It should be noted that for other corresponding descriptions of the functional units involved in the disk space detection device provided in this embodiment, reference can be made to Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0103] Based on the above Figure 1 and Figure 2 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The method shown.
[0104] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0105] like Figure 4 The figure shows a hardware structure diagram of an electronic device of the present invention, including:
[0106] at least one processor 401; and,
[0107] A memory 402 is communicatively connected to at least one of the processors 401; wherein,
[0108] The memory 402 stores instructions that can be executed by at least one of the processors. The instructions are executed by at least one of the processors so that the at least one of the processors can perform the disk space detection method as described above.
[0109] Figure 4 A processor 401 is taken as an example.
[0110] The electronic device may further include: an input device 403 and a display device 404 .
[0111] The processor 401, the memory 402, the input device 403 and the display device 404 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0112] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the disk space detection method in the embodiment of the present application, for example, Figure 1 and Figure 2 The processor 401 executes various functional applications and data processing by running the non-volatile software programs, instructions and modules stored in the memory 402, that is, the method for detecting the disk space in the above embodiment is implemented.
[0113] The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the disk space detection method, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 402 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to a device for executing the disk space detection method via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0114] The input device 403 can receive user clicks and generate signal inputs related to user settings of the disk space detection method and function control. The display device 404 can include display devices such as a display screen.
[0115] The one or more modules are stored in the memory 402, and when executed by the one or more processors 401, the disk space detection method in any of the above method embodiments is executed.
[0116] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0117] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0118] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the solution of this embodiment, compared with the current prior art, this embodiment checks the used space and disk quota of the disk by executing a predetermined check command, and then obtains the remaining space of the disk based on the used space and disk quota, and stops the simulation when the remaining space does not meet the simulation conditions. When the simulation results occupy a large amount of disk space, it can be determined in time whether the disk space can be fully stored, avoiding simulation anomalies caused by insufficient disk space during the simulation process, ensuring the stable operation of the simulation process, realizing the detection of disk space by the simulation software, and maintaining the safe operation of the simulation.
[0120] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0121] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.
Claims
1. A method for detecting disk space, characterized in that: include: In response to receiving instruction information for performing simulation, executing a predetermined check command to perform a disk space check on a target disk for storing simulation results; Based on the disk space check result, determining the used space and disk quota of the target disk; Determine the remaining space of the target disk according to the used space and the disk quota; The remaining space is detected, and when it is detected that the remaining space does not meet the simulation condition, the simulation is controlled to be stopped.
2. The method according to claim 1, characterized in that The executing of a predetermined check command to check the disk space of a target disk for storing simulation results includes: Calling a first environment variable, wherein the value of the first environment variable is an executable text file containing the predetermined inspection command; By executing the predetermined check command corresponding to the first environment variable, a disk space check is performed on the target disk, and the predetermined check command is used to determine a first indicator value representing the used space and a second indicator value representing the disk quota corresponding to the target disk.
3. The method according to claim 2, characterized in that The determining the remaining space of the target disk according to the used space and the disk quota includes: Obtaining the first indicator value and the second indicator value obtained by performing a disk space check; The first indicator value and the second indicator value are analyzed to determine a third indicator value representing the remaining space of the target disk.
4. The method according to claim 3, characterized in that The detecting the remaining space includes: Calling a second environment variable, wherein the value of the second environment variable is a remaining space threshold; By executing the second environment variable, it is determined whether the remaining space is less than the remaining space threshold.
5. The method according to claim 4, characterized in that The controlling to stop the simulation when it is detected that the remaining space does not meet the simulation condition includes: If it is determined that the remaining space is less than the remaining space threshold, the simulation is stopped and simulation warning information indicating that the disk space is full is generated.
6. The method according to claim 5, characterized in that The method further comprises: If it is determined that the remaining space is greater than or equal to the remaining space threshold, simulation is performed based on the instruction information.
7. A disk space detection device, characterized in that: include: an execution module, configured to execute a predetermined check command to perform a disk space check on a target disk for storing simulation results in response to receiving instruction information for performing simulation; A determination module, configured to determine the used space and disk quota of the target disk based on the disk space check result; The determination module is further configured to determine the remaining space of the target disk according to the used space and the disk quota; The detection module is configured to detect the remaining space and control the simulation to stop if it is detected that the remaining space does not meet the simulation condition.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
9. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.