CN110134496A - Container monitors method, apparatus, equipment and computer readable storage medium - Google Patents

Container monitors method, apparatus, equipment and computer readable storage medium Download PDF

Info

Publication number
CN110134496A
CN110134496A CN201910427740.6A CN201910427740A CN110134496A CN 110134496 A CN110134496 A CN 110134496A CN 201910427740 A CN201910427740 A CN 201910427740A CN 110134496 A CN110134496 A CN 110134496A
Authority
CN
China
Prior art keywords
container
specified directory
directory
host
user space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910427740.6A
Other languages
Chinese (zh)
Inventor
张世富
史浩
杨琦
孟庆轶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201910427740.6A priority Critical patent/CN110134496A/en
Publication of CN110134496A publication Critical patent/CN110134496A/en
Pending legal-status Critical Current

Links

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/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Landscapes

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

Abstract

The present invention provides a kind of container monitors method, apparatus, equipment and computer readable storage medium.Method of the invention, by the way that when starting container, the target directory of the customized User space file system of host where the container to be mounted to the specified directory of the container;By the specified directory of the User space file storage of the container of generation to the container;Pass through the proxy module in the container after container starting, the monitoring data of the container is acquired from the specified directory of the container, so as to inquire the resource information of each container in real time, it can flexibly realize the monitoring to each container, container O&M efficiency is improved, the difficulty of container O&M is reduced.

Description

Container monitors method, apparatus, equipment and computer readable storage medium
Technical field
The present invention relates to Container Management technical field more particularly to a kind of container monitors method, apparatus, equipment and computer Readable storage medium storing program for executing.
Background technique
With the development of Docker container technique, Docker container technique using more and more extensive.Container technique is benefit The resource isolation carried out with the characteristic of (SuSE) Linux OS, the resource for being more sufficiently and efficiently uses, but also gives container simultaneously Management and O&M bring new challenge.The monitoring of Docker container is exactly one aspect.
Docker container is incomplete in the isolation of operating system level, all Docker containers and host on host Machine shares proc file system, and in Docker container operational process, user uses common resource viewing command, and what is obtained is all The resource information of host can not inquire the resource information of each Docker container.At present by mesos/marathon or The Docker cluster management method of person kubernetes, to realize the monitoring to Docker container, but both schemes all must Existing specification must be followed, inflexible, the monitoring threshold of Docker container is high, and difficulty is big.
Summary of the invention
The present invention provides a kind of container monitors method, apparatus, equipment and computer readable storage medium, existing to solve Existing specification must comply with to the monitoring method of Docker container in technology, inflexible, the monitoring threshold of container is high, and difficulty is big The problem of.
It is an aspect of the invention to provide a kind of container monitors methods, comprising:
When starting container, the target directory of the customized User space file system of host where the container is mounted to The specified directory of the container;
By the specified directory of the User space file storage of the container of generation to the container;
By the proxy module in the container, the monitoring data of the container is acquired from the specified directory of the container.
Another aspect of the present invention is to provide a kind of container monitors device, comprising:
Carry mapping block, when for starting container, by the customized User space file system of host where the container The target directory of system is mounted to the specified directory of the container;
Data memory module, the User space file of the container for that will generate store the specified mesh to the container Record;
Monitoring module, for acquiring the appearance from the specified directory of the container by the proxy module in the container The monitoring data of device.
Another aspect of the present invention is to provide a kind of host characterized by comprising
Memory, processor, and it is stored in the computer journey that can be run on the memory and on the processor Sequence,
The processor realizes container monitors method described above when running the computer program.
Another aspect of the present invention is to provide a kind of computer readable storage medium, is stored with computer program,
The computer program realizes container monitors method described above when being executed by processor.
Container monitors method, apparatus, equipment and computer readable storage medium provided by the invention, by starting container When, the target directory of the customized User space file system of host where the container is mounted to the specified mesh of the container Record;By the specified directory of the User space file storage of the container of generation to the container;By described after container starting Proxy module in container acquires the monitoring data of the container from the specified directory of the container, so as to look into real time The resource information of each container is ask, can flexibly realize the monitoring to each container, improves container O&M efficiency, is reduced The difficulty of container O&M.
Detailed description of the invention
Fig. 1 is the container monitors method flow diagram that the embodiment of the present invention one provides;
Fig. 2 is container monitors method flow diagram provided by Embodiment 2 of the present invention;
Fig. 3 is the structural schematic diagram for the container monitors device that the embodiment of the present invention three provides;
Fig. 4 is the structural schematic diagram for the container monitors device that the embodiment of the present invention four provides;
Fig. 5 is the structural schematic diagram for the host that the embodiment of the present invention five provides.
Through the above attached drawings, it has been shown that the specific embodiment of the present invention will be hereinafter described in more detail.These attached drawings It is not intended to limit the scope of the inventive concept in any manner with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate idea of the invention.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Noun according to the present invention is explained first:
LXCFS is the User space file system (Filesystem based on linux kernel of an open source InUserspace, FUSE).LXCFS is developed based on C language, and current more use is in LXC container.
Proc file system is a pseudo file system, it is only existed in memory, and is not take up external space.It is with text The mode of part system provides interface to access the operation of system kernel data.User and application program can pass through proc file system System obtains the information of system, and can change certain parameters of kernel.
In addition, term " first ", " second " etc. are used for description purposes only, it is not understood to indicate or imply relatively important Property or implicitly indicate the quantity of indicated technical characteristic.In the description of following embodiment, the meaning of " plurality " is two More than a, unless otherwise specifically defined.
These specific embodiments can be combined with each other below, may be at certain for the same or similar concept or process It is repeated no more in a little embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
Embodiment one
Fig. 1 is the container monitors method flow diagram that the embodiment of the present invention one provides.The embodiment of the present invention is directed to the prior art In existing specification must comply with to the monitoring method of Docker container, inflexible, the monitoring threshold of container is high, and difficulty is big to ask Topic, provides container monitors method.Method in the present embodiment is applied to host where container.As shown in Figure 1, this method has Steps are as follows for body:
Step S101, when starting container, by the target directory of the customized User space file system of host where container It is mounted to the specified directory of container.
In the present embodiment, the customized User space file system of compiling installation in advance on the host of each Docker container System.Optionally, customized User space file system can be LXCFS.
Customized User space file system can be provided inside Docker container a virtual proc file system and The directory tree of the control group (Control Group, abbreviation cgroup) of Docker container itself.Customized User space file is opening The target directory of a User space file system need to be specified when dynamic, which is the file system of all containers on host The catalogue at place.For example, the target directory of User space file system can specify are as follows:/valivar/lib/lxcfs.
Step S102, by the specified directory of the User space file storage of the container of generation to container.
In the present embodiment, the specified directory of container is used for the User space file of storing containers itself.The User space text of container Part may include: the file for recording CPU information, such as cpuinfo file;For the file of recording disc information, such as Diskstats file;For recording the file of memory information, such as meminfo file;For recording cpu clock piece information File, such as stat file;For recording the file of exchange partition information, such as swaps file;When for recording system starting Between information file, such as uptime file;Etc..
In container starting or in container operational process, the User space file of the container of generation can be stored in by host In the specified directory of container.In addition, host can also be in container operational process, in real time in the specified directory of more new container Container User space file content.
Step S103, by the proxy module in container, from the monitoring data of the specified directory collection container of container.
In the present embodiment, in component Docker mirror image, is installed inside container and act on behalf of mould for acquire monitoring data Block.After container starting, host can be by the proxy module in container, from the monitoring number of the specified directory collection container of container According to.Container monitoring resource eliminates the reliance on the open port API Docker, realizes through the proxy module collection container in container Resource data carry out container monitors form, realize a kind of new model of Docker container monitors.
The embodiment of the present invention is by when starting container, by the customized User space file system of host where container Target directory is mounted to the specified directory of container;By the specified directory of the User space file storage of the container of generation to container;? By the proxy module in container after container starting, from the monitoring data of the specified directory collection container of container, so as to reality When inquire the resource information of each container, can flexibly realize the monitoring to each container, improve container O&M effect Rate reduces the difficulty of container O&M.
Embodiment two
Fig. 2 is container monitors method flow diagram provided by Embodiment 2 of the present invention.On the basis of the above embodiment 1, originally In embodiment, by the proxy module in container, after the monitoring data of the specified directory collection container of container, according to acquisition Container monitoring data, calculate container at least one of achievement data, and by container at least one of achievement data deposit Storage.In addition, the read path that method can also include: each resource viewing command in procps software package by container is revised as The specified directory of container, wherein resource viewing command includes at least top order and free order.After starting container, receive When being executed instruction to the resource viewing command to container, the corresponding resource of execution is executed instruction according to resource viewing command and checks life It enables, corresponding monitoring data is obtained from the specified directory of container.
As shown in Fig. 2, specific step is as follows for this method:
Step S101, when starting container, by the target directory of the customized User space file system of host where container It is mounted to the specified directory of container.
In the present embodiment, the customized User space file system of compiling installation in advance on the host of each Docker container System.Optionally, customized User space file system can be LXCFS.
Customized User space file system can be provided inside Docker container a virtual proc file system and The directory tree of the cgroup of Docker container itself.Customized User space file needs to specify a User space file system on startup The target directory of system, the target directory are the catalogues on host where the file system of all containers.For example, User space file The target directory of system can specify are as follows:/valivar/lib/lxcfs.
When starting container, host is by the target directory carry of the customized User space file system of host where container To the specified directory of container, to establish the target directory of the customized User space file system of host and the specified directory of container Mapping.
For example, the target directory of the User space file system of host can be with are as follows:/valivar/lib/lxcfs, container Specified directory can be/docker/proc, in this step by by the target of the customized User space file system of host Catalogue is mounted to the specified directory of container, can establish target directory/valivar/ of the User space file system of host The specified directory of lib/lxcfs to container can be/docker/proc.
Optionally, when starting customized User space file system, customized User space file system is set by predetermined directory The target directory of system.
Wherein, predetermined directory can be set according to actual needs by technical staff, for example, predetermined directory can be set For/valivar/lib/lxcfs, the present embodiment is not specifically limited herein.
Step S102, by the specified directory of the User space file storage of the container of generation to container.
In the present embodiment, the specified directory of container is used for the User space file of storing containers itself.The User space text of container Part may include: the file for recording CPU information, such as cpuinfo file;For the file of recording disc information, such as Diskstats file;For recording the file of memory information, such as meminfo file;For recording cpu clock piece information File, such as stat file;For recording the file of exchange partition information, such as swaps file;When for recording system starting Between information file, such as uptime file;Etc..
In container starting or in container operational process, the User space file of the container of generation can be stored in by host In the specified directory of container.In addition, host can also be in container operational process, in real time in the specified directory of more new container Container User space file content.
Optionally, target directory can be mounted to the specified directory of container in a manner of carry book by host.
Step S103, by the proxy module in container, from the monitoring data of the specified directory collection container of container.
In the present embodiment, in component Docker mirror image, is installed inside container and act on behalf of mould for acquire monitoring data Block.After container starting, host can be by the proxy module in container, from the monitoring number of the specified directory collection container of container According to.Container monitoring resource eliminates the reliance on the open port API Docker, realizes through the proxy module collection container in container Resource data carry out container monitors form, realize a kind of new model of Docker container monitors.
After container starting, the proxy module in container be can be automatically operated, from the specified directory collection container of container Monitoring data.Proxy module in container can may include container with the data information stored in the specified directory of collection container CPU information, memory information, cpu clock piece information, exchange partition information, system start-up time information, etc..
In addition, the program realization that any development language carries out customized exploitation can be used in the proxy module in container.
Step S104, according to the monitoring data of the container of acquisition, calculate container at least one of achievement data, and by container At least one of achievement data stored.
It, can also be according to preset rules to the monitoring number of container after collecting container monitors data in the present embodiment According to statistics and analysis processing is carried out, at least one achievement data of container is calculated.For example, the achievement data of container can be For indicating the statistical result of cpu usage, memory service condition etc..
In addition, specifically calculate which achievement data and parameter data preset rules can by technical staff according to Actual needs is set, and the present embodiment is not specifically limited herein.
Optionally, host can store at least one achievement data of container into database, for example, can will hold At least one achievement data of device is sent to Hbase cluster, stored in Hbase database in a distributed manner to achievement data.
Optionally, the centrally stored of achievement data can be with the clouds such as MondoDb database or ElasticSearch equal part The mode of cloth storage is stored, and the present embodiment is not specifically limited the storage mode of achievement data.
Step S105, at least one achievement data is shown by display device.
The step is optional step, and after at least one achievement data of container is calculated, host can be controlled Display device processed shows at least one achievement data of container.For example, can show at least the one of container by front end web page Item achievement data.
Optionally, after at least one achievement data of container is calculated, host can also be by container at least One achievement data is sent to the client device where specified monitoring system, show container with client device at least one Item achievement data.
Step S106, the read path of each resource viewing command in the procps software package of container is revised as container Specified directory.
Wherein, resource viewing command includes at least top order and free order.
Docker mirror image based on (SuSE) Linux OS generally can all install procps software package, include in the software package The source code of the common resource query order of the O&Ms such as top, free.
In the present embodiment, host is by modifying the source code that these are ordered, by each money in the procps software package of container The read path of source viewing command is revised as the specified directory of container, and procps software package is upgraded.
Specifically, container is revised as by the path (such as/proc) of file system in the path that proc file data is read Specified directory (such as/docker/proc), complete procps software package upgrading.Then installation is compiled in component mirror image Procps software package after upgrading, the included procps software package of replacement foundation image, can be realized and transport in docker container Check that container real resources utilize state by executing the resource queries orders such as top, free when dimension.
Step S107, it receives when being executed instruction to the resource viewing command of container, is referred to according to the execution of resource viewing command It enables and executes corresponding resource viewing command, corresponding monitoring data is obtained from the specified directory of container.
In the present embodiment, read path that host passes through each resource viewing command in the procps software package to container It is revised as the specified directory of container, completes the upgrading of procps software package.It is held receiving the resource viewing command to container When row instruction, host can obtain corresponding prison by executing corresponding resource viewing command from the specified directory of container Data are controlled, complete to obtain monitoring data to the inquiry of the resource behaviour in service of container.
The embodiment of the present invention is by the procps software packet upgrade to container, by each money in the procps software package of container The read path of source viewing command is revised as the specified directory of container, and in container operational process, host is by executing correspondence Resource viewing command, can obtain corresponding monitoring data from the specified directory of container, complete to use the resource of container The inquiry of situation, obtains monitoring data, realizes and directly inquires the true resource service condition of container by resource query order, It can flexibly realize the monitoring to each container, further improve container O&M efficiency, reduce the difficulty of container O&M.
Embodiment three
Fig. 3 is the structural schematic diagram for the container monitors device that the embodiment of the present invention three provides.It is provided in an embodiment of the present invention Container monitors device can execute the process flow of container monitors embodiment of the method offer.As shown in figure 3, the device 30 includes: Carry mapping block 301, data memory module 302 and monitoring module 303.
Specifically, when carry mapping block 301 is used to start container, by the customized User space text of host where container The target directory of part system is mounted to the specified directory of container.
Specified directory of the User space file storage for the container that data memory module 302 is used to generate to container.
Monitoring module 303 is used for by the proxy module in container, from the monitoring number of the specified directory collection container of container According to.
Device provided in an embodiment of the present invention can be specifically used for executing embodiment of the method provided by above-described embodiment one, Details are not described herein again for concrete function.
The embodiment of the present invention is by when starting container, by the customized User space file system of host where container Target directory is mounted to the specified directory of container;By the specified directory of the User space file storage of the container of generation to container;? By the proxy module in container after container starting, from the monitoring data of the specified directory collection container of container, so as to reality When inquire the resource information of each container, can flexibly realize the monitoring to each container, improve container O&M effect Rate reduces the difficulty of container O&M.
Example IV
Fig. 4 is the structural schematic diagram for the container monitors device that the embodiment of the present invention four provides.In the base of above-described embodiment three On plinth, in the present embodiment, monitoring module is also used to: according to the monitoring data of the container of acquisition, calculating at least one finger of container Data are marked, and at least one achievement data of container is stored.
Optionally, carry mapping block is also used to:
In a manner of carry book, target directory is mounted to the specified directory of container.
In the present embodiment, as shown in figure 4, container monitors device 30 can also include: software packet upgrade module 304.
Specifically, software packet upgrade module 304 is used for each resource viewing command in the procps software package of container Read path is revised as the specified directory of container.
Optionally, monitoring module is also used to:
It receives when being executed instruction to the resource viewing command of container, is executed instruction according to resource viewing command and execute correspondence Resource viewing command, corresponding monitoring data is obtained from the specified directory of container.
Device provided in an embodiment of the present invention can be specifically used for executing embodiment of the method provided by above-described embodiment two, Details are not described herein again for concrete function.
The embodiment of the present invention is by the procps software packet upgrade to container, by each money in the procps software package of container The read path of source viewing command is revised as the specified directory of container, and in container operational process, host is by executing correspondence Resource viewing command, can obtain corresponding monitoring data from the specified directory of container, complete to use the resource of container The inquiry of situation, obtains monitoring data, realizes and directly inquires the true resource service condition of container by resource query order, It can flexibly realize the monitoring to each container, further improve container O&M efficiency, reduce the difficulty of container O&M.
Embodiment five
Fig. 5 is the structural schematic diagram for the host that the embodiment of the present invention five provides.As shown in figure 5, in the present embodiment, the place Host 50 can run multiple containers.The host 50 includes: processor 501, memory 502, and is stored in memory 502 Computer program that is upper and being executed by processor 501.
Processor 501 realizes any of the above-described embodiment of the method when executing and storing in the computer program on memory 502 The vessel process of offer.
The embodiment of the present invention is by when starting container, by the customized User space file system of host where container Target directory is mounted to the specified directory of container;By the specified directory of the User space file storage of the container of generation to container;? By the proxy module in container after container starting, the monitoring data of the container is acquired from the specified directory of container, so as to To inquire the resource information of each container in real time, the monitoring to each container can be flexibly realized, improve container fortune Efficiency is tieed up, the difficulty of container O&M is reduced.
In addition, the embodiment of the present invention also provides a kind of computer readable storage medium, it is stored with computer program, the meter Calculation machine program realizes the container monitors method that any of the above-described embodiment of the method provides when being executed by processor.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.The present invention is directed to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claims are pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is only limited by appended claims System.

Claims (10)

1. a kind of container monitors method characterized by comprising
When starting container, the target directory of the customized User space file system of host where the container is mounted to described The specified directory of container;
By the specified directory of the User space file storage of the container of generation to the container;
By the proxy module in the container, the monitoring data of the container is acquired from the specified directory of the container.
2. the method according to claim 1, wherein the customized user by host where the container The target directory of state file system is mounted to the specified directory of the container, comprising:
In a manner of carry book, the target directory is mounted to the specified directory of the container.
3. according to the method described in claim 2, it is characterized in that, the proxy module by the container, from described The specified directory of container acquires after the monitoring data of the container, further includes:
According to the monitoring data of the container of acquisition, calculate the container at least one of achievement data, and by the container At least one of achievement data stored.
4. method according to claim 1-3, which is characterized in that the method also includes:
The read path of each resource viewing command in the procps software package of the container is revised as the specified of the container Catalogue.
5. according to the method described in claim 4, it is characterized in that, after starting the container, further includes:
It receives when being executed instruction to the resource viewing command of the container, execution is executed instruction according to the resource viewing command Corresponding resource viewing command, obtains corresponding monitoring data from the specified directory of the container.
6. a kind of container monitors device characterized by comprising
Carry mapping block, when for starting container, by the customized User space file system of host where the container Target directory is mounted to the specified directory of the container;
Data memory module, the User space file of the container for that will generate store the specified directory to the container;
Monitoring module, for acquiring the container from the specified directory of the container by the proxy module in the container Monitoring data.
7. device according to claim 6, which is characterized in that described device further include:
Software packet upgrade module, the read path for each resource viewing command in the procps software package by the container are repaired It is changed to the specified directory of the container.
8. device according to claim 7, which is characterized in that the monitoring module is also used to:
It receives when being executed instruction to the resource viewing command of the container, execution is executed instruction according to the resource viewing command Corresponding resource viewing command, obtains corresponding monitoring data from the specified directory of the container.
9. a kind of host characterized by comprising
Memory, processor, and it is stored in the computer program that can be run on the memory and on the processor,
The processor realizes method according to any one of claims 1 to 5 when running the computer program.
10. a kind of computer readable storage medium, which is characterized in that it is stored with computer program,
The computer program realizes method according to any one of claims 1 to 5 when being executed by processor.
CN201910427740.6A 2019-05-22 2019-05-22 Container monitors method, apparatus, equipment and computer readable storage medium Pending CN110134496A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910427740.6A CN110134496A (en) 2019-05-22 2019-05-22 Container monitors method, apparatus, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910427740.6A CN110134496A (en) 2019-05-22 2019-05-22 Container monitors method, apparatus, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110134496A true CN110134496A (en) 2019-08-16

Family

ID=67572128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910427740.6A Pending CN110134496A (en) 2019-05-22 2019-05-22 Container monitors method, apparatus, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110134496A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781001A (en) * 2019-10-23 2020-02-11 广东浪潮大数据研究有限公司 Kubernetes-based container environment variable checking method
CN111522659A (en) * 2020-04-15 2020-08-11 联想(北京)有限公司 Space using method and device
CN113296872A (en) * 2020-04-13 2021-08-24 阿里巴巴集团控股有限公司 Container state query method, device, equipment, storage medium and system
CN115858101A (en) * 2023-01-31 2023-03-28 天翼云科技有限公司 Method and device for isolating container resource view and electronic equipment
WO2023093127A1 (en) * 2021-11-26 2023-06-01 北京百度网讯科技有限公司 Method and apparatus for monitoring a cluster, and electronic device
CN117076005A (en) * 2023-10-16 2023-11-17 龙芯中科技术股份有限公司 Application running method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106681800A (en) * 2017-01-13 2017-05-17 济南浪潮高新科技投资发展有限公司 Docker-based resource monitoring implementation method
CN108509254A (en) * 2018-04-17 2018-09-07 中山市华南理工大学现代产业技术研究院 The monitoring method and system of Docker Container
US20190080118A1 (en) * 2016-11-17 2019-03-14 International Business Machines Corporation Container update system
US10270841B1 (en) * 2016-03-04 2019-04-23 Quest Software Inc. Systems and methods of real-time container deployment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10270841B1 (en) * 2016-03-04 2019-04-23 Quest Software Inc. Systems and methods of real-time container deployment
US20190080118A1 (en) * 2016-11-17 2019-03-14 International Business Machines Corporation Container update system
CN106681800A (en) * 2017-01-13 2017-05-17 济南浪潮高新科技投资发展有限公司 Docker-based resource monitoring implementation method
CN108509254A (en) * 2018-04-17 2018-09-07 中山市华南理工大学现代产业技术研究院 The monitoring method and system of Docker Container

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ADMIN: "Docker容器资源限制问题", 《HTTPS://WWW.LINUX-NOTE.CN/?P=12》 *
DOCKONE: "基于Lxcfs的docker容器Procps软件包升级方案(二)--修改free源码", 《HTTPS://WWW.COLABUG.COM/2017/1023/1762497/》 *
青岛英谷教育科技股份有限公司: "《云计算与虚拟化技术》", 28 February 2018 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781001A (en) * 2019-10-23 2020-02-11 广东浪潮大数据研究有限公司 Kubernetes-based container environment variable checking method
CN110781001B (en) * 2019-10-23 2023-03-28 广东浪潮大数据研究有限公司 Kubernetes-based container environment variable checking method
CN113296872A (en) * 2020-04-13 2021-08-24 阿里巴巴集团控股有限公司 Container state query method, device, equipment, storage medium and system
CN111522659A (en) * 2020-04-15 2020-08-11 联想(北京)有限公司 Space using method and device
CN111522659B (en) * 2020-04-15 2024-04-19 联想(北京)有限公司 Space use method and device
WO2023093127A1 (en) * 2021-11-26 2023-06-01 北京百度网讯科技有限公司 Method and apparatus for monitoring a cluster, and electronic device
CN115858101A (en) * 2023-01-31 2023-03-28 天翼云科技有限公司 Method and device for isolating container resource view and electronic equipment
CN117076005A (en) * 2023-10-16 2023-11-17 龙芯中科技术股份有限公司 Application running method and device, electronic equipment and storage medium
CN117076005B (en) * 2023-10-16 2024-03-01 龙芯中科技术股份有限公司 Application running method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110134496A (en) Container monitors method, apparatus, equipment and computer readable storage medium
US20210218796A1 (en) Efficient, automated distributed-search methods and systems
CN104714822B (en) For the method and system for the real-time update for performing operating system
US8627274B2 (en) Software tool and method for generating a virtual appliance
CN117055957A (en) Containerized deployment of micro-services based on monolithic legacy applications
CN111901294A (en) Method for constructing online machine learning project and machine learning system
US10120928B2 (en) Method and system for clustering event messages and managing event-message clusters
US7958511B1 (en) Mechanism for estimating the computing resources needed to execute a job
CN110580197A (en) Distributed computing architecture for large model deep learning
US10019293B2 (en) Enhanced command selection in a networked computing environment
CN106982137A (en) Hadoop cluster Automation arranging methods based on kylin cloud computing platform
US10025630B2 (en) Operating programs on a computer cluster
US11762851B2 (en) Methods and systems that provide a general query interface to multiple management services and applications
CN112099800B (en) Code data processing method, device and server
EP4055477A1 (en) Just-in-time containers
Zhang et al. In‐memory staging and data‐centric task placement for coupled scientific simulation workflows
US20130212276A1 (en) Command management in a networked computing environment
CN109885535A (en) A kind of method and relevant apparatus of file storage
WO2021053422A1 (en) Correspondence of external operations to containers and mutation events
WO2023056793A1 (en) Optimizing a just-in-time compilation process
US8745620B2 (en) Software tool and method for updating a virtual appliance
CN107436790A (en) A kind of component upgrade management method and device
CN109101253A (en) The management method and device of host in cloud computing system
CN109960522A (en) A kind of method for upgrading software and device
CN113535695B (en) Archive updating method based on process scheduling

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190816

RJ01 Rejection of invention patent application after publication