Summary of the invention
In view of the deficiencies of the prior art, the space the bucket accounting based on minio file system that the present invention provides a kind of
Statistical method, comprising the following steps:
S1, connection telefile control system;
S2, memory space is traversed, identify bucket unit and generates bucket list;
S3, it calls bucket list and extracts bucket unit information;
S4, different bucket units are traversed respectively based on bucket unit information and generate corresponding level list;
S5, it calls different levels list and extracts corresponding hierarchical information;
S6, different levels are traversed respectively based on hierarchical information and generate corresponding document list;
S7, different listed files are called and extract corresponding document information;
S8, different files are traversed respectively based on the file information and generate corresponding configuration information;
S9, all configuration informations are pre-processed and generate level-one report;
S10, further data processing is carried out to level-one report based on presupposed information and generates reference listing;
S11, reference listing is uploaded to server.
Further, the memory space includes at least a bucket unit.
Further, the bucket unit information include at least bucket, the address bucket, shared amount of memory with
And newest modification time.
Further, the bucket unit includes at least a level.
Further, the hierarchical information includes at least level name, level address and shared amount of memory.
Further, the level includes at least a file.
Further, the file information includes at least filename, file address and shared amount of memory.
Further, the generation of level-one list is referred specifically to by traversal time to bucket unit all in memory space, no
With the sequence of the progress of the corresponding document information of the corresponding level and different levels of bucket unit.
Further, the presupposed information includes at least the sequence of storage time, occupies the sequence of amount of memory and account for
With the accounting of amount of memory.
A kind of space bucket accounting statistic device based on minio file system, comprising:
It insmods, for connecting telefile control system;
Total spider module, for being traversed to memory space, identifying bucket unit and generating bucket list;
Bucket calling module, for calling bucket list and extracting bucket unit information;
Bucket spider module, for being traversed respectively to different bucket units and generating corresponding level list;
Level calling module, for calling different levels list and extracting corresponding hierarchical information;
Level spider module, for being traversed respectively to different levels and generating corresponding document list;
File calling module, for calling different listed files and extracting corresponding document information;
File traversal module, for being traversed respectively to different files and generating corresponding configuration information;
Preprocessing module, for being pre-processed to all configuration informations and generating level-one report;
Analysis module, for carrying out further data processing to level-one report and generating reference listing;And
Uploading module, for uploading reference listing to server.
The invention has the benefit that can be carried out in the memory space of minio file system for the space bucket
Effective space accounting statistics, greatly facilitates management of the staff to file system, improves work efficiency.
Specific embodiment
It should be appreciated that the embodiment of the present invention can be by computer hardware, the combination of hardware and software or by depositing
The computer instruction in non-transitory computer-readable memory is stored up to be effected or carried out.Standard volume can be used in the method
Journey technology-includes that the non-transitory computer-readable storage media configured with computer program is realized in computer program,
In configured in this way storage medium computer is operated in a manner of specific and is predefined --- according in a particular embodiment
The method and attached drawing of description.Each program can with the programming language of level process or object-oriented come realize with department of computer science
System communication.However, if desired, the program can be realized with compilation or machine language.Under any circumstance, which can be volume
The language translated or explained.In addition, the program can be run on the specific integrated circuit of programming for this purpose.
In addition, the operation of process described herein can be performed in any suitable order, unless herein in addition instruction or
Otherwise significantly with contradicted by context.Process described herein (or modification and/or combination thereof) can be held being configured with
It executes, and is can be used as jointly on the one or more processors under the control of one or more computer systems of row instruction
The code (for example, executable instruction, one or more computer program or one or more application) of execution, by hardware or its group
It closes to realize.The computer program includes the multiple instruction that can be performed by one or more processors.
Further, the method can be realized in being operably coupled to suitable any kind of computing platform, wrap
Include but be not limited to PC, mini-computer, main frame, work station, network or distributed computing environment, individual or integrated
Computer platform or communicated with charged particle tool or other imaging devices etc..Each aspect of the present invention can be to deposit
The machine readable code on non-transitory storage medium or equipment is stored up to realize no matter be moveable or be integrated to calculating
Platform, such as hard disk, optical reading and/or write-in storage medium, RAM, ROM, so that it can be read by programmable calculator, when
Storage medium or equipment can be used for configuration and operation computer to execute process described herein when being read by computer.This
Outside, machine readable code, or part thereof can be transmitted by wired or wireless network.When such media include combining microprocessor
Or other data processors realize steps described above instruction or program when, invention as described herein including these and other not
The non-transitory computer-readable storage media of same type.When methods and techniques according to the present invention programming, the present invention
It further include computer itself.
Computer program can be applied to input data to execute function as described herein, to convert input data with life
At storing to the output data of nonvolatile memory.Output information can also be applied to one or more output equipments as shown
Device.In the preferred embodiment of the invention, the data of conversion indicate physics and tangible object, including the object generated on display
Reason and the particular visual of physical objects are described.
It should be noted that such as without Special Statement, in the disclosure used in the "an" of singular, " described " and
"the" is also intended to including most forms, unless the context clearly indicates other meaning.In addition, unless otherwise defined, this paper institute
All technical and scientific terms used are identical as the normally understood meaning of those skilled in the art.This paper specification
Used in term be intended merely to description specific embodiment, be not intended to be limiting of the invention.Term as used herein
"and/or" includes the arbitrary combination of one or more listed items.
(" such as ", " such as ") makes it should be appreciated that provided in this article any and all example or exemplary language
With being intended merely to that the embodiment of the present invention is better described, and unless the context requires otherwise, otherwise the scope of the present invention will not be applied
Limitation.
Next specific embodiments of the present invention are described further in conjunction with attached drawing:
It show overview flow chart according to the present invention referring to Fig.1, specifically includes the following steps:
S1, connection telefile control system;
S2, memory space is traversed, identify bucket unit and generates bucket list;The memory space is at least
Including a bucket unit;
S3, it calls bucket list and extracts bucket unit information;The bucket unit information includes at least
Bucket, the address bucket, shared amount of memory and newest modification time;
S4, different bucket units are traversed respectively based on bucket unit information and generate corresponding level list;
The bucket unit includes at least a level;
S5, it calls different levels list and extracts corresponding hierarchical information;The hierarchical information includes at least level name, level
Address and shared amount of memory;
S6, different levels are traversed respectively based on hierarchical information and generate corresponding document list;
S7, different listed files are called and extract corresponding document information;The level includes at least a file;
S8, different files are traversed respectively based on the file information and generate corresponding configuration information;The file information
Including at least filename, file address and shared amount of memory;
S9, all configuration informations are pre-processed and generate level-one report;The generation of level-one list is referred specifically to by traversal
Time is to the corresponding level of bucket unit all in memory space, difference bucket unit and the corresponding text of different levels
The sequence of the progress of part information;
S10, further data processing is carried out to level-one report based on presupposed information and generates reference listing;The default letter
Breath includes at least the sequence of storage time, occupies the sequence of amount of memory and occupies the accounting of amount of memory;
S11, reference listing is uploaded to server.
It is shown apparatus according to the invention connection figure referring to Fig. 2, specifically includes following part:
It insmods, realization interaction is connect with total spider module, for connecting telefile control system;
Total spider module connect realization interaction with Bucket calling module, for traversing to memory space, identifies
Bucket unit simultaneously generates bucket list;
Bucket calling module connect realization interaction with Bucket spider module, for calling bucket list and extracting
Bucket unit information;
Bucket spider module, connect with level calling module realization interaction, for different bucket units respectively into
Row traverses and generates corresponding level list;
Level calling module connect realization interaction with level spider module, for calling different levels list and extracting phase
Answer hierarchical information;
Level spider module connect realization interaction with file calling module, for being traversed respectively simultaneously to different levels
Generate corresponding document list;
File calling module connect realization interaction with file traversal module, for calling different listed files and extracting phase
Answer the file information;
File traversal module connect realization interaction with preprocessing module, for different files to be traversed and given birth to respectively
At corresponding configuration information;
Preprocessing module connect realization interaction with analysis module, for all configuration informations to be pre-processed and generated
Level-one report;
Analysis module connect realization interaction with uploading module, for carrying out further data processing and life to level-one report
At reference listing;And
Uploading module, for uploading reference listing to server.
The schematic diagram of A according to embodiments of the present invention is shown referring to Fig. 3, embodiment A shows in minio file system
The list of different bucket units can be ranked up according to its occupied space size or newest modification time, pass through this column
The form of table can the open-and-shut memory state for showing memory space;In the actual use environment, program can be with certain
Period or number carry out data acquisition, the long term maintenance suitable for server.
The schematic diagram of B according to embodiments of the present invention is shown referring to Fig. 4, embodiment B shows based in embodiment A
The table that list is further beautified, in the actual use environment, staff can be periodically by this form to O&Ms
Or other related practitioners send the disk occupancy situation of bucket.
The above, only presently preferred embodiments of the present invention, the invention is not limited to above embodiment, as long as
It reaches technical effect of the invention with identical means, all should belong to protection scope of the present invention.In protection model of the invention
Its technical solution and/or embodiment can have a variety of different modifications and variations in enclosing.