CN110750411A - Method and device for monitoring, early warning and repairing file index node - Google Patents

Method and device for monitoring, early warning and repairing file index node Download PDF

Info

Publication number
CN110750411A
CN110750411A CN201910787814.7A CN201910787814A CN110750411A CN 110750411 A CN110750411 A CN 110750411A CN 201910787814 A CN201910787814 A CN 201910787814A CN 110750411 A CN110750411 A CN 110750411A
Authority
CN
China
Prior art keywords
partition
monitoring
threshold
change
file
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.)
Granted
Application number
CN201910787814.7A
Other languages
Chinese (zh)
Other versions
CN110750411B (en
Inventor
向荣
张泽远
李阳
李宇龙
刘文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sunmi Technology Group Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sunmi Technology Group Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN201910787814.7A priority Critical patent/CN110750411B/en
Publication of CN110750411A publication Critical patent/CN110750411A/en
Application granted granted Critical
Publication of CN110750411B publication Critical patent/CN110750411B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention provides a method and a device for monitoring, early warning and repairing a file index node, wherein the method comprises the following steps: when a file is created or data is written, if a mount point of the file or the data is in a monitoring partition, monitoring the change percentage of the available index nodes in the partition and the change percentage of the residual space; limiting creation of a file or writing of data if a percentage change of available inodes or a percentage change of remaining space within the partition exceeds a change threshold; monitoring the number of index nodes in the partition; and if the occupancy ratio of the index nodes in the monitoring partition exceeds the early warning threshold, repairing the applications with the occupancy ratio of the index nodes exceeding the sorting threshold, so that the occupancy ratio of the index nodes in the monitoring partition is smaller than the safety threshold. The invention monitors and warns the number of index nodes, and cleans and repairs the index nodes after the number of the index nodes exceeds the number of the index nodes, thereby solving the problem that the file system fails due to the exhaustion of the index nodes.

Description

Method and device for monitoring, early warning and repairing file index node
Technical Field
The embodiment of the invention relates to the field of file management of a Linux operating system, in particular to a method and a device for monitoring, early warning and repairing a file index node.
Background
With the continuous popularization of intelligent terminals, a robust and stable file system is particularly important, especially for an operating system based on Linux, a large amount of files can be read and written when equipment is started, and once the file system fails, the equipment cannot be started or cannot enter the system after being restarted.
In the Linux-based operating system, the possible reasons for the file system failure are roughly: the partition space is severely insufficient or the file inode is exhausted. Because the number of files (corresponding to the number of file index nodes) that can be used in the file system is limited, when the storage device is formatted, the operating system separately allocates an Inode area for storing information contained in the file index nodes, and in the operating system of Linux, one file or folder is an Inode. The file index node mainly stores metadata such as creator, date and size of a file, one index node is occupied when a file is created, and when a large number of files are created, the total number of the file index nodes is used up, so that a large amount of residual disk space exists in the partition, but a new file cannot be created due to the fact that the index nodes are used up.
It should be noted that the above background description is only for the sake of clarity and complete description of the technical solutions of the present invention and for the understanding of those skilled in the art. Such solutions are not considered to be known to the person skilled in the art merely because they have been set forth in the background section of the invention.
Disclosure of Invention
In order to solve the problem that the file system fails due to exhaustion of the file index nodes, monitoring and early warning are introduced to the number of the file index nodes, and cleaning and repairing are performed after the number of the file index nodes exceeds the early warning.
In order to achieve the above object, an embodiment of the present invention provides a method for monitoring, warning, and repairing a file index node, including: when a file is created or data is written, if a mount point of the file or the data is in a monitoring partition, monitoring the change percentage of the available index nodes in the partition and the change percentage of the residual space; limiting creation of a file or writing of data if a percentage change of available inodes or a percentage change of remaining space within the partition exceeds a change threshold; monitoring the number of index nodes in the partition; and if the occupancy ratio of the index nodes in the monitoring partition exceeds the early warning threshold, repairing the applications with the occupancy ratio of the index nodes exceeding the sorting threshold, so that the occupancy ratio of the index nodes in the monitoring partition is smaller than the safety threshold.
Further, a first change threshold and a second change threshold are preset, wherein the first change threshold is smaller than the second change threshold; if the change percentage of the available index nodes in the listening partition or the change percentage of the residual space is not more than or equal to a first change threshold, no processing is needed; if the change percentage of the remaining available index nodes or the change percentage of the remaining space in the listening partition exceeds a first change threshold and does not exceed a second change threshold, limiting the common application from creating the file or writing the data, and not limiting the system application from creating the file or writing the data; restricting all applications from creating files or writing data if a percentage of change of available inodes or a percentage of change of remaining space within the listening partition exceeds a second change threshold.
Further, scanning the number of the files in the monitoring partition, and acquiring the number of index nodes occupied by each application according to the packet name and the scanning result; and calculating the occupation ratio of the index nodes of each application according to the total number of the index nodes in the monitoring partition and the obtained number of the index nodes of each application, and sequencing the applications according to the occupation ratio.
Further, a safety threshold and an early warning threshold of the index node occupation ratio in the monitoring partition are preset; if the occupation ratio of the index nodes in the monitoring partition does not exceed the threshold value of the safety state, the monitoring partition is in the safety state; if the occupation ratio of the index nodes in the monitoring partition exceeds the safety state and does not exceed the early warning threshold value, the monitoring partition is in the early warning state, and the user is enabled to repair the recommended application according to the problems in the reminding message by sending the reminding message to recommend the application with more occupation of the index nodes to the user; and if the occupation ratio of the index nodes in the monitoring partition exceeds the early warning threshold value, the monitoring partition is in a dangerous state, and the applications with the occupation ratios of the index nodes exceeding the sorting threshold value are repaired, so that the occupation ratio of the index nodes in the partition is smaller than the safety threshold value.
In order to achieve the above object, an embodiment of the present invention further provides a device for monitoring, warning and repairing a file index node, including: the monitoring module is used for monitoring the change percentage of the available index nodes and the change percentage of the residual space in the partition if the mount point of the file or the data is in the monitoring partition when the file is created or the data is written, and limiting the creation of the file or the writing of the data if the change percentage of the available index nodes or the change percentage of the residual space in the partition exceeds a change threshold; the scanning module is used for monitoring the number of the index nodes in the partition; the early warning module is used for sending a repair notice to the repair module when the occupation ratio of the index nodes in the monitoring partition exceeds an early warning threshold; and the repairing module is used for repairing the applications with the index node occupation ratio sequence exceeding the sequencing threshold according to the repairing notification, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
Therefore, the method and the device for monitoring, warning and repairing the file index node provided by the embodiment of the invention can be used for actively monitoring the index node in the partition. And when the system creates or deletes the file, acquiring the number state of the index nodes in real time. And scanning all the application data, sequencing the applications in the scanning result according to the occupation ratio of the index nodes, and intelligently recommending the applications needing processing to a user so that the occupation ratio of the index nodes in the monitoring partition is smaller than a safety threshold value. The application layer may also be automatically repaired if the user is not processing. Therefore, the problem that the power cannot be started due to exhaustion of the index nodes can be effectively prevented.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments or the description in the prior art are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for monitoring, warning and repairing a file index node according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a safety state, an early warning state, and a dangerous state according to an embodiment of the present invention.
Fig. 3 is a schematic block diagram of a device for monitoring, warning and repairing a file index node according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention. Furthermore, as used in the examples of the invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
The embodiment of the invention provides a method for monitoring, early warning and repairing a file index node. As shown in fig. 1, the method comprises the steps of:
step S101, when creating a file or writing data, if the mount point of the file or the data is in a monitoring partition, monitoring the change percentage of the available index nodes of the partition and the change percentage of the residual space.
In this step, the Linux VFS (virtual machine file system) is an abstraction layer that provides a uniform file access interface upwards, and is compatible with a variety of different file systems downwards. In the Linux VFS layer, when a user creates a file and writes data, it is checked whether the mount point of the file or data is in a partition to be monitored:
if the mount point of the file or the data is not in the monitoring partition, no processing is needed;
and if the mount point of the file or the data is in a monitoring partition, monitoring the change percentage of the available index nodes of the partition and the change percentage of the residual space.
In a specific embodiment, the total number of index nodes and the total size of space of the listening partition may be obtained through an API (Application Programming Interface), the number of remaining index nodes and the size of remaining space may be obtained in real time, and the change percentage of the available index nodes and the change percentage of the remaining space may be calculated according to the number of remaining index nodes and the size of remaining space of the listening partition, and the total number of index nodes and the total size of space.
In the embodiment of the invention, the change percentage of the available index nodes and the change percentage of the residual space are used as judgment bases, so that the index nodes in the partitions can be more effectively prevented from being used up and the space in the partitions can be more effectively prevented from being used up.
Step S102, if the change percentage of the available index nodes of the listening partition and the change percentage of the remaining space exceed the change threshold, file creation or data writing is limited.
In this step, a change threshold of the change percentage of the available inode or the remaining space is set in advance, for example, the change threshold is set to 1%. If the change percentage of the available index nodes or the remaining space of the partition does not exceed the change threshold, updating the record value; if the change percentage of the available index nodes or the remaining space of the partition exceeds the change threshold, reporting is performed, for example, a message is sent to a listening service through a Netlink.
In order to prevent the inode or the residual space from being used up, which results in abnormal termination of the listening service and cannot be used, file creation or data writing needs to be limited.
Specifically, if the change percentage of the available index nodes or the remaining space is greater than or equal to the first change threshold, no processing is required;
if the change percentage of the remaining available index nodes or the change percentage of the remaining space is smaller than a first change threshold and is larger than or equal to a second change threshold, limiting the common application to create the file or write the data, but not limiting the system application to create the file or write the data;
if the percentage of change of the available inodes or the percentage of change of the remaining space is less than a second change threshold, all applications are restricted from creating files or writing data.
Wherein the general application and the system application can be distinguished according to the EUID (valid user ID).
The first variation threshold is smaller than the second variation threshold, for example, the first variation threshold is 2%, the second variation threshold is 1%, and other values are also possible, which is not limited in the present invention.
And step S103, monitoring the number of index nodes in the partition.
In this step, the number of index nodes of each application in the snoop partition can be obtained by scanning. Every time a file is created, the number of index nodes is increased by one, so that the number of files and the number of index nodes can be in a one-to-one correspondence relationship. For example, the scanning of the number of files under the data/data/directory is executed, and because all folders under the directory are named by the name of the system apk packet, the total number of files created by each application can be known according to the scanning result, and the number of index nodes occupied by each application is also obtained.
Further, the index node occupation ratio of each application is calculated according to the obtained index node number of each application, and the applications are sorted according to the occupation ratio.
Step S104, if the index node occupation ratio of the monitoring partition exceeds the early warning threshold, repairing the applications of which the index node occupation ratio sequence exceeds the sequencing threshold, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
In this step, the number of index nodes in a partition may include three states: safety state, pre-warning state and danger state, as shown in fig. 2.
Correspondingly, a safety threshold and an early warning threshold of the index node occupation ratio are preset.
If the index node occupancy ratio in the monitoring partition does not exceed the safety state threshold value, for example, the index node occupancy ratio does not exceed 85%, the monitoring partition is in a safety state, and processing is not needed at the moment;
the early warning state is established if the inode occupancy ratio within the listening partition exceeds the security state and does not exceed the early warning threshold, e.g., the inode occupancy ratio exceeds 85% and does not exceed 95%. And sending a reminding message to the user, for example, popping up a dialog box to remind the user, recommending that the index node occupies more applications, so that the user can repair the applications according to the problems in the dialog box, for example, selecting manual clearing, and certainly, the user can also select to ignore the problems in the dialog box without processing.
And if the index node occupancy rate in the listening partition exceeds an early warning threshold, for example, the index node occupancy rate exceeds 95%, the listening partition is in a dangerous state. And repairing the applications with the index node occupation ratios exceeding the sorting threshold, for example, repairing the applications with the index node occupation ratios more than the top ten times of the sorting in the listening partition, so that the index node occupation ratios in the listening partition are smaller than the safety threshold.
The method for monitoring, early warning and repairing the file index nodes in the embodiment of the invention monitors the index nodes in the partitions actively. And when the system creates or deletes the file, acquiring the number state of the index nodes in real time. And scanning all the application data, sequencing the applications in the scanning result according to the occupation ratio of the index nodes, and intelligently recommending the applications needing processing to a user so that the occupation ratio of the index nodes in the monitoring partition is smaller than a safety threshold value. The application layer may also be automatically repaired if the user is not processing. Therefore, the problem that the power cannot be started due to exhaustion of the index nodes can be effectively prevented. For terminals with frequent user interaction, such as mobile phones, the user can find problems as soon as possible and make a judgment according to intelligent recommendation, and for unattended commercial terminal equipment, automatic repair can be performed under the condition that the limit is reached. Although the negative result of deleting the user data by mistake can be brought, the serious result brought by the fact that the equipment cannot be started can be effectively prevented.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 1, the present invention provides an embodiment of a device for monitoring, warning, and repairing a file index node, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 1. As shown in fig. 3, an apparatus for monitoring, warning, and repairing a file index node according to an embodiment of the present invention includes:
the monitoring module 31 monitors the change percentage of the available index nodes and the change percentage of the remaining space of the partition if the mount point of the file or the data is in the listening partition when creating the file or writing the data, and restricts creating the file or writing the data if the change percentage of the available index nodes and the change percentage of the remaining space of the listening partition exceed the change threshold;
the scanning module 32 monitors the number of the index nodes in the partition;
the early warning module 33 is configured to notify the repair module 34 when the index node occupancy ratio of the listening partition exceeds an early warning threshold;
and the repairing module 34 is configured to repair the applications with the index node occupancy ratios exceeding the sorting threshold, so that the index node occupancy ratio in the listening partition is smaller than the security threshold.
Wherein the monitoring module is specifically configured to: when a user creates a file and writes data, checking whether a mount point of the file or the data is in a partition to be monitored, if the mount point of the file or the data is not in the partition to be monitored, processing is not needed, and if the mount point of the file or the data is in the partition to be monitored, monitoring the change percentage of available index nodes of the partition and the change percentage of residual space; when the change percentage of the available index nodes of the listening partition or the change percentage of the remaining space is smaller than a first change threshold and larger than or equal to a second change threshold, limiting a common application to create files or write data, but not limiting a system application to create files or write data; when the change percentage of the available index nodes of the monitoring partition or the change percentage of the residual space is smaller than a second change threshold value, limiting all applications to create files or write data; wherein the first variation threshold is less than the second variation threshold.
Wherein the scanning module is specifically configured to: scanning the number of files in the monitoring partition, and acquiring the number of index nodes occupied by each application according to the packet name and the scanning result; calculating the occupation ratio of the index nodes of each application according to the total number of the index nodes in the monitoring partition and the obtained number of the index nodes of each application, and sequencing the applications according to the occupation ratio; and outputting the occupation ratio and the sequence of the application index nodes to an early warning module.
Wherein the early warning module is specifically used for: if the index node occupation ratio in the partition does not exceed the safety state threshold, the partition is in a safety state and does not need to be processed; if the index node occupation ratio in the partition exceeds the safety state and does not exceed the early warning threshold value, the partition is in the early warning state, a dialog box is popped up to remind a user, so that the user can repair the application according to the problems in the dialog box, and the user can also choose to ignore the problem and not process the problem; and if the index node occupation ratio in the partition exceeds the early warning threshold, the partition is in a dangerous state, and the application packet names with the index node occupation ratio sequence exceeding the sequencing threshold are transmitted to the repair module in a broadcast mode by using parameters.
Wherein the repair module is specifically configured to: when the repair message of the early warning module is received, a data cleaning action is executed on the corresponding application according to the application package name carried in the repair message, for example, the data cleaning action can be performed by calling an application data cleaning interface of an Android system, so that the occupation ratio of the index nodes in the partition is smaller than a safety threshold.
The specific technical details of the device for monitoring, warning and repairing the file index node and the method for monitoring, warning and repairing the file index node are similar, and the technical effects achieved in the implementation mode of the device for monitoring, warning and repairing the file index node can also be achieved in the implementation mode of the method for monitoring, warning and repairing the file index node, and are not repeated here in order to reduce repetition. Accordingly, the related technical details mentioned in the implementation of the apparatus for monitoring, warning and repairing a file index node may also be applied to the implementation of the method for monitoring, warning and repairing a file index node.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments.
Finally, it should be noted that: the foregoing description of various embodiments of the invention is provided to those skilled in the art for the purpose of illustration. It is not intended to be exhaustive or to limit the invention to a single disclosed embodiment. Various alternatives and modifications of the invention, as described above, will be apparent to those skilled in the art. Thus, while some alternative embodiments have been discussed in detail, other embodiments will be apparent or relatively easy to derive by those of ordinary skill in the art. The present invention is intended to embrace all such alternatives, modifications, and variances which have been discussed herein, and other embodiments which fall within the spirit and scope of the above application.

Claims (10)

1. A method for monitoring, early warning and repairing a file index node is characterized by comprising the following steps:
when a file is created or data is written, if a mount point of the file or the data is in a monitoring partition, monitoring the change percentage of the available index nodes in the partition and the change percentage of the residual space;
limiting creation of a file or writing of data if a percentage change of available inodes or a percentage change of remaining space within the partition exceeds a change threshold;
monitoring the number of index nodes in the partition;
and if the occupancy ratio of the index nodes in the monitoring partition exceeds the early warning threshold, repairing the applications with the occupancy ratio of the index nodes exceeding the sorting threshold, so that the occupancy ratio of the index nodes in the monitoring partition is smaller than the safety threshold.
2. The method for monitoring, warning and repairing the file index node according to claim 1, wherein when a file is created or data is written, if a mount point of the file or the data is in a listening partition, the method monitors a change percentage of an available index node and a change percentage of a remaining space in the partition, and specifically comprises:
presetting a first change threshold and a second change threshold, wherein the first change threshold is smaller than the second change threshold;
if the change percentage of the available index nodes in the listening partition or the change percentage of the residual space is not more than or equal to a first change threshold, no processing is needed; or
If the change percentage of the remaining available index nodes or the change percentage of the remaining space in the listening partition exceeds a first change threshold and does not exceed a second change threshold, limiting the common application from creating the file or writing the data, and not limiting the system application from creating the file or writing the data; or
Restricting all applications from creating files or writing data if a percentage of change of available inodes or a percentage of change of remaining space within the listening partition exceeds a second change threshold.
3. The method for monitoring, warning and repairing the file index node according to claim 1, wherein the monitoring of the number of the index nodes in the partition specifically comprises:
scanning the number of files in the monitoring partition, and acquiring the number of index nodes occupied by each application according to the packet name and the scanning result;
and calculating the occupation ratio of the index nodes of each application according to the total number of the index nodes in the monitoring partition and the obtained number of the index nodes of each application, and sequencing the applications according to the occupation ratio.
4. The method for monitoring, warning and repairing the file index node according to claim 3, wherein if the index node occupancy ratio in the listening partition exceeds the warning threshold, repairing the application whose index node occupancy ratio sequence exceeds the sequencing threshold, so that the index node occupancy ratio in the listening partition is smaller than the safety threshold, specifically comprising:
presetting a safety threshold and an early warning threshold of an index node occupation ratio in a monitoring partition;
if the occupation ratio of the index nodes in the monitoring partition does not exceed the threshold value of the safety state, the monitoring partition is in the safety state;
if the occupation ratio of the index nodes in the monitoring partition exceeds the safety state and does not exceed the early warning threshold value, the monitoring partition is in an early warning state;
and if the index node occupation ratio in the monitoring partition exceeds the early warning threshold value, the monitoring partition is in a dangerous state.
5. The method for monitoring, warning and repairing the file index node according to claim 4, wherein if the file index node is in the warning state, the index node is recommended to occupy more applications by sending a reminding message to a user, so that the user can repair the recommended applications according to problems existing in the reminding message.
6. The method of claim 4, wherein if the index node is in the dangerous state, repairing applications with index node occupancy ratios that exceed a sorting threshold, so that the index node occupancy ratios in the partition are less than a safety threshold.
7. The utility model provides a device of file index node monitoring early warning and restoration which characterized in that includes:
the monitoring module is used for monitoring the change percentage of the available index nodes and the change percentage of the residual space in the partition if the mount point of the file or the data is in the monitoring partition when the file is created or the data is written, and limiting the creation of the file or the writing of the data if the change percentage of the available index nodes or the change percentage of the residual space in the partition exceeds a change threshold;
the scanning module is used for monitoring the number of the index nodes in the partition;
the early warning module is used for sending a repair notice to the repair module when the occupation ratio of the index nodes in the monitoring partition exceeds an early warning threshold;
and the repairing module is used for repairing the applications with the index node occupation ratio sequence exceeding the sequencing threshold according to the repairing notification, so that the index node occupation ratio in the monitoring partition is smaller than the safety threshold.
8. The apparatus for monitoring, warning and repairing a file inode of claim 7, wherein the monitoring module is specifically configured to:
if the change percentage of the available index nodes in the listening partition or the change percentage of the residual space is not more than or equal to a first change threshold, no processing is needed;
if the change percentage of the remaining available index nodes or the change percentage of the remaining space in the listening partition exceeds a first change threshold and does not exceed a second change threshold, limiting the common application from creating the file or writing the data, and not limiting the system application from creating the file or writing the data;
if the change percentage of the available index nodes in the listening partition or the change percentage of the residual space exceeds a second change threshold, limiting all applications from creating files or writing data;
the first variation threshold is less than the second variation threshold.
9. The apparatus for monitoring, warning, and repairing a file inode of claim 8, wherein the scanning module is specifically configured to:
scanning the number of files in the monitoring partition, and acquiring the number of index nodes occupied by each application according to the packet name and the scanning result; and calculating the occupation ratio of the index nodes of each application according to the total number of the index nodes in the monitoring partition and the obtained number of the index nodes of each application, and sequencing the applications according to the occupation ratio.
10. The apparatus for monitoring, warning and repairing a file inode of claim 9, wherein the warning module is specifically configured to:
if the index node occupation ratio in the partition does not exceed the safety state threshold value, the index node is in a safety state;
if the occupation ratio of the index nodes in the monitoring partition exceeds the safety state and does not exceed the early warning threshold value, the monitoring partition is in the early warning state, and the user is enabled to repair the recommended application according to the problems in the reminding message by sending the reminding message to recommend the application with more occupation of the index nodes to the user;
and if the index node occupancy ratio in the monitoring partition exceeds the early warning threshold value, the monitoring partition is in a dangerous state, and according to the sequencing of the application occupancy ratios obtained by scanning, the application packet names with the index node occupancy ratio sequencing exceeding the sequencing threshold value are transmitted to the repairing module in a broadcast mode by using parameters, so that the repairing module repairs the corresponding application according to the application packet names carried in the repairing message, and the index node occupancy ratio in the monitoring partition is smaller than the safety threshold value.
CN201910787814.7A 2019-08-26 2019-08-26 Method and device for monitoring, early warning and repairing file index node Active CN110750411B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910787814.7A CN110750411B (en) 2019-08-26 2019-08-26 Method and device for monitoring, early warning and repairing file index node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910787814.7A CN110750411B (en) 2019-08-26 2019-08-26 Method and device for monitoring, early warning and repairing file index node

Publications (2)

Publication Number Publication Date
CN110750411A true CN110750411A (en) 2020-02-04
CN110750411B CN110750411B (en) 2023-05-05

Family

ID=69275883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910787814.7A Active CN110750411B (en) 2019-08-26 2019-08-26 Method and device for monitoring, early warning and repairing file index node

Country Status (1)

Country Link
CN (1) CN110750411B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749411A (en) * 2021-01-14 2021-05-04 上海商米科技集团股份有限公司 Hierarchical management and control method and system for android file system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294206A (en) * 2015-05-21 2017-01-04 广州华多网络科技有限公司 A kind of caching data processing method and device
US20170262463A1 (en) * 2016-03-14 2017-09-14 Dell Products L.P. Method and system for managing shrinking inode file space consumption using file trim operations
CN109656885A (en) * 2018-12-18 2019-04-19 Oppo广东移动通信有限公司 Memory space monitoring method and device, electric terminal, storage medium
CN110109868A (en) * 2018-01-18 2019-08-09 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for index file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294206A (en) * 2015-05-21 2017-01-04 广州华多网络科技有限公司 A kind of caching data processing method and device
US20170262463A1 (en) * 2016-03-14 2017-09-14 Dell Products L.P. Method and system for managing shrinking inode file space consumption using file trim operations
CN110109868A (en) * 2018-01-18 2019-08-09 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for index file
CN109656885A (en) * 2018-12-18 2019-04-19 Oppo广东移动通信有限公司 Memory space monitoring method and device, electric terminal, storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749411A (en) * 2021-01-14 2021-05-04 上海商米科技集团股份有限公司 Hierarchical management and control method and system for android file system

Also Published As

Publication number Publication date
CN110750411B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
CN108737132B (en) Alarm information processing method and device
CN107105050B (en) Storage and downloading method and system for service objects
CN107562386A (en) A kind of method for writing data and device of distributed storage cluster
CN105550229A (en) Method and device for repairing data of distributed storage system
CN104537076A (en) File reading and writing method and device
CN103577483B (en) The method and system of date storage method and system and data access
CN104053051A (en) Automated testing method and device achieving compatibility of mobile phone audios and mobile phone videos
CN105550071B (en) System file upgrades and detection method, communication equipment
CN113220540A (en) Service management method, device, computer equipment and storage medium
CN110750411A (en) Method and device for monitoring, early warning and repairing file index node
CN107864209B (en) Data writing method and device and server
CN101526959B (en) Data storing method and device
CN105550230A (en) Method and device for detecting failure of node of distributed storage system
CN111913927A (en) Data writing method and device and computer equipment
CN102231684A (en) Interface board state detection method, multi-core central processing unit, interface board and router
CN109582829A (en) A kind of processing method, device, equipment and readable storage medium storing program for executing
CN114513498A (en) File transmission checking method and device, computer equipment and storage medium
CN110362464B (en) Software analysis method and equipment
CN105812203A (en) Request message processing method and apparatus
CN110955647A (en) Database assistance method, database assistance device, computer equipment and storage medium
CN114666401B (en) Device information processing method, device, computer device and storage medium
CN111833438B (en) Method and device for interrupting reference by three-dimensional model
CN111817899B (en) Alarm method, system, equipment and computer readable storage medium
CN111177091B (en) Video pre-distribution storage method, system and storage medium based on XFS file system
CN107203559A (en) A kind of method and apparatus for dividing data strip

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200204

Assignee: Guangdong Shangjie Information Technology Co.,Ltd.

Assignor: SHANGHAI SHANGMI SCIENCE AND TECHNOLOGY GROUP Co.,Ltd.

Contract record no.: X2023310000072

Denomination of invention: Method and device for monitoring, warning, and repairing file index nodes

Granted publication date: 20230505

License type: Common License

Record date: 20230524