Memory mapping file storage method and device

文档序号:1963599 发布日期:2021-12-14 浏览:20次 中文

阅读说明:本技术 内存映象文件的存储方法及装置 (Memory mapping file storage method and device ) 是由 汪庆权 于 2021-08-24 设计创作,主要内容包括:本公开涉及一种内存映象文件的存储方法、装置、电子设备及计算机可读介质。该方法包括:在进程出现故障时,生成内存映象文件;基于系统配置将所述内存映象文件存储到第一目录中,所述第一目录位于本地内存系统中;文件监控系统对所述第一目录进行实时监控;在所述第一目录中监控到内存映象文件生成时,将所述内存映象文件存储到第二目录中,所述第二目标位于移动存储设备中。本公开涉及的内存映象文件的存储方法、装置、电子设备及计算机可读介质,能够在低速存储设备上,快速保存内存映象文件,以便于能够利用内存映象文件更方便地发现问题、定位问题,利于程序快速重启,减少了影响业务的时间,大大提升了系统的可维护性,降低了运营成本。(The disclosure relates to a memory mapping file storage method, a memory mapping file storage device, electronic equipment and a computer readable medium. The method comprises the following steps: when a process fails, generating a memory mapping file; storing the memory mapping file into a first directory based on system configuration, wherein the first directory is located in a local memory system; the file monitoring system monitors the first directory in real time; and when the generation of the memory mapping file is monitored in the first directory, the memory mapping file is stored in a second directory, and the second target is located in the mobile storage device. The memory image file can be rapidly stored on the low-speed storage device, so that problems and positioning problems can be conveniently found by using the memory image file, the rapid restart of a program is facilitated, the time influencing the service is reduced, the maintainability of the system is greatly improved, and the operation cost is reduced.)

1. A method for storing a memory map file, comprising:

when a process fails, generating a memory mapping file;

storing the memory mapping file into a first directory based on system configuration, wherein the first directory is located in a local memory system;

the file monitoring system monitors the first directory in real time;

and when the generation of the memory mapping file is monitored in the first directory, the memory mapping file is stored in a second directory, and the second target is located in the mobile storage device.

2. The method of claim 1, further comprising:

creating the first directory in a local memory system;

and allocating the maximum occupied space for the files in the first directory.

3. The method of claim 2, wherein creating the first directory in a local memory system further comprises:

and mounting a temporary file system to the first directory through a partition hanging command.

4. The method of claim 1, further comprising:

creating the second directory in a mobile storage device.

5. The method of claim 1, further comprising:

setting the core unloading file directory of the memory mapping file as the first directory;

and setting a file naming rule of the memory mapping file.

6. The method of claim 1, wherein generating a memory map file in the event of a process failure comprises:

and when the process fails, generating the memory mapping file according to a preset signal mechanism.

7. The method of claim 1, wherein the file monitoring system monitors the first directory in real time, comprising:

and the file monitoring system monitors the first directory in real time through a file change notification mechanism.

8. The method of claim 1, wherein storing the memory map file in a second directory comprises:

acquiring the file capacity of the memory mapping file;

acquiring the residual capacity of the second directory;

and when the residual capacity is larger than the file capacity, storing the memory mapping file into a second directory.

9. A memory map file storage device, comprising:

the file module is used for generating a memory mapping file when a process fails;

the first storage module is used for storing the memory mapping file into a first directory based on system configuration, and the first directory is located in a local memory system;

the monitoring module is used for monitoring the first directory in real time by the file monitoring system;

and the second storage module is used for storing the memory mapping file into a second directory when the generation of the memory mapping file is monitored in the first directory, and the second target is positioned in the mobile storage device.

10. The apparatus of claim 9, further comprising:

the first creating module is used for creating the first directory in a local memory system; allocating a maximum occupied space for the files in the first directory;

and the second creating module is used for creating the second catalogue in the mobile storage device.

Technical Field

The present disclosure relates to the field of computer information processing, and in particular, to a method and an apparatus for storing a memory map file, an electronic device, and a computer-readable medium.

Background

In a Linux system, when a program crashes, it typically generates a memory image (core) file under the specified directory. The core file is simply a memory image (plus debug information) that is primarily used for debugging, and the process terminates and generates the core file in response to a specific signal. Generally, the process also has a core file size limit value, and the value defaults to 0, which indicates that no core file is generated; setting to a value other than 0 indicates that a core file is generated, and if the length of data to be recorded in the core file exceeds the value, the core file is truncated to the limit value. Only partial information of the process exiting the site is recorded in the truncated core file, which may affect the problem location.

For network devices, such as firewalls, routers, switches, and the like, storage devices are generally small and slow, generally CF cards and SD cards, read-write speed of the CF cards and SD cards differs from that of a hard disk by several tens of times, writing is slow, and if a core file is generated to be large, it takes a long time to store the core file, which may seriously affect the program restart speed.

Therefore, a new memory map file storage method, apparatus, electronic device and computer readable medium are needed.

The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.

Disclosure of Invention

In view of the above, the present disclosure provides a memory map file storage method, device, electronic device, and computer readable medium, which can store a memory map file on a low-speed storage device, such as a network device of a CF card or an SD card, so that the memory map file can be used to find and locate problems more conveniently, and a program can be restarted quickly, thereby reducing the time for affecting services, greatly improving the maintainability of a system, and reducing the operation cost.

According to an aspect of the present disclosure, a method for storing a memory map file is provided, the method including: when a process fails, generating a memory mapping file; storing the memory mapping file into a first directory based on system configuration, wherein the first directory is located in a local memory system; the file monitoring system monitors the first directory in real time; and when the generation of the memory mapping file is monitored in the first directory, the memory mapping file is stored in a second directory, and the second target is located in the mobile storage device.

In an exemplary embodiment of the present disclosure, further comprising: creating the first directory in a local memory system; and allocating the maximum occupied space for the files in the first directory.

In an exemplary embodiment of the present disclosure, creating the first directory in a local memory system further includes: and mounting a temporary file system to the first directory through a partition hanging command.

In an exemplary embodiment of the present disclosure, further comprising: creating the second directory in a mobile storage device.

In an exemplary embodiment of the present disclosure, further comprising: setting the core unloading file directory of the memory mapping file as the first directory; and setting a file naming rule of the memory mapping file.

In an exemplary embodiment of the present disclosure, generating a memory map file when a process fails includes: and when the process fails, generating the memory mapping file according to a preset signal mechanism.

In an exemplary embodiment of the present disclosure, the file monitoring system performs real-time monitoring on the first directory, including: and the file monitoring system monitors the first directory in real time through a file change notification mechanism.

In an exemplary embodiment of the present disclosure, storing the memory map file in a second directory includes: acquiring the file capacity of the memory mapping file; acquiring the residual capacity of the second directory; and when the residual capacity is larger than the file capacity, storing the memory mapping file into a second directory.

According to an aspect of the present disclosure, a memory device for storing a memory map file is provided, the device including: the file module is used for generating a memory mapping file when a process fails; the first storage module is used for storing the memory mapping file into a first directory based on system configuration, and the first directory is located in a local memory system; the monitoring module is used for monitoring the first directory in real time by the file monitoring system; and the second storage module is used for storing the memory mapping file into a second directory when the generation of the memory mapping file is monitored in the first directory, and the second target is positioned in the mobile storage device.

In an exemplary embodiment of the present disclosure, further comprising: the first creating module is used for creating the first directory in a local memory system; allocating a maximum occupied space for the files in the first directory; and the second creating module is used for creating the second catalogue in the mobile storage device.

According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.

According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.

According to the memory mapping file storage method, the memory mapping file storage device, the electronic equipment and the computer readable medium, when a process fails, a memory mapping file is generated; storing the memory mapping file into a first directory based on system configuration, wherein the first directory is located in a local memory system; the file monitoring system monitors the first directory in real time; when the generation of the memory mapping file is monitored in the first directory, the memory mapping file is stored in the second directory, and the mode that the second target is located in the mobile storage device can quickly store the memory mapping file on the network device of the low-speed storage device such as a CF card and an SD card, so that the problems and the positioning problems can be found more conveniently by using the memory mapping file, meanwhile, the program can be restarted quickly, the time of influencing the service is reduced, the maintainability of the system is greatly improved, and the operation cost is reduced.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.

Fig. 1 is a system block diagram illustrating a method and apparatus for storing a memory map file according to an exemplary embodiment.

Fig. 2 is a flowchart illustrating a method for storing a memory map file according to an exemplary embodiment.

Fig. 3 is a flowchart illustrating a method of storing a memory map file according to another exemplary embodiment.

FIG. 4 is a block diagram illustrating a memory map file storage device in accordance with an exemplary embodiment.

FIG. 5 is a block diagram illustrating a memory map file storage device in accordance with another exemplary embodiment.

FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.

FIG. 7 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.

Detailed Description

Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.

Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.

The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.

The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.

It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.

It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.

The inventor of the present disclosure finds that, on a Linux system, the core file mechanism of a process is as follows:

the core file switch defaults to a forbidden state, and is started by maintenance personnel when needing to be started, or the core file size is set in the source code of each application program through setrlimit to be appointed to be opened;

the signal for triggering the generation of the core file is predefined, namely the process can generate the core file only when receiving the specific signal, and then the process exits; the core file generated by each process is defaulted under the work directory of the current process, a core file path and the name of the core file can be set through a proc file system interface "/proc/sys/kernel/core _ pattern" variable, the name of the core file is defaulted to be the core, and some related information can be assigned, such as a process name, a process ID, a triggered signal value, a timestamp of the generation time (the number of seconds since the time of the birth date 0 in 1970), and the like.

For network devices, such as firewalls, routers, switches, and the like, storage devices are generally small and slow, generally CF cards and SD cards, read-write speed of the CF cards and SD cards differs from that of a hard disk by several tens of times, writing is slow, and if a core file is generated to be large, it takes a long time to store the core file, which may seriously affect the program restart speed. Generally, a background program needs to restart to continue providing services, such as a bgp routing process and an osfp routing process, because of a large number of routes, a core file is generally large, the time spent for storing the core file is long, and the influence on the service is avoided, so a network device generally sets that the core file is not generated or the size of the core file is generally limited, but because the core file is incomplete, the problem positioning is possibly influenced, and the problem cannot be timely positioned.

In view of the technical problems in the prior art, the present disclosure provides a method for storing a memory image file, which can quickly store a core file on a network device using a low-speed storage device, such as a CF card or an SD card, so that problems and location problems can be found more conveniently by using the core file. The technical content of the present disclosure is described in detail below with reference to specific embodiments.

Fig. 1 is a system block diagram illustrating a method and an apparatus for storing a memory map file according to an exemplary embodiment.

As shown in fig. 1, the system architecture 10 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.

The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.

The server 105 may be a server that provides various services, such as a background management server that manages the terminal devices 101, 102, 103. The background management server can manage and maintain the system of the terminal devices 101, 102, 103.

The server 105 may create the first directory, for example, in a local memory system of the terminal device 101, 102, 103; and allocating the maximum occupied space for the files in the first directory.

The server 105 may create the second directory, for example, in a mobile storage device corresponding to the terminal device 101, 102, 103.

The server 105 may set the core dump file directory of the memory map file as the first directory, for example, on the terminal devices 101, 102, 103; and setting a file naming rule of the memory mapping file.

The terminal device 101, 102, 103 may create the first directory, for example, in a local memory system; and allocating the maximum occupied space for the files in the first directory.

The terminal devices 101, 102, 103 may create the second directory, for example, in their corresponding mobile storage devices.

The terminal device 101, 102, 103 may set a core dump file directory of the memory map file as the first directory, for example; and setting a file naming rule of the memory mapping file.

The terminal devices 101, 102, 103 may generate a memory map file, for example, when a process fails; the terminal device 101, 102, 103 may store the memory map file into a first directory, for example, based on the system configuration, the first directory being located in the local memory system; the terminal devices 101, 102, 103 may monitor the first directory in real time, for example, by using a file monitoring system; the terminal device 101, 102, 103 may, for example, upon monitoring the generation of the memory map file in the first directory, store the memory map file in a second directory, the second target being located in the mobile storage device.

The server 105 may be a physical server, or may be composed of a plurality of servers, for example, it should be noted that the storage method of the memory map file provided by the embodiment of the present disclosure may be executed by the terminal devices 101, 102, 103 and/or the server 105, and accordingly, the storage device of the memory map file may be disposed in the terminal devices 101, 102, 103 and/or the server 105.

Fig. 2 is a flowchart illustrating a method for storing a memory map file according to an exemplary embodiment. The method 20 for storing the memory map file at least includes steps S202 to S208.

As shown in fig. 2, in S202, when a process fails, a memory map file is generated.

In one embodiment, the memory map file may be generated according to a preset signaling mechanism, for example, when a process fails. In the memory mapping file, a core file may be used, and in a Linux system (or other Unix-like systems), when a process exits (receives a specific signal) due to some abnormal reasons, data in a virtual address space of the process, the reason causing the exit, call stack information, and the like may be recorded in a binary file, that is, a core file. The research and development personnel can analyze the core file by utilizing the debugging tool gdb, thereby positioning the specific reason for the process quitting.

In S204, the memory map file is stored in a first directory based on the system configuration, where the first directory is located in the local memory system.

In S206, the file monitoring system monitors the first directory in real time.

In one embodiment, the first directory may be monitored in real time, for example, by a file monitoring system through a file change notification mechanism. The Linux signal mechanism is a method for processing asynchronous events in a Linux system, and is a software interrupt. Each process may send a signal to itself or to other processes during its execution, and the process receiving the signal may perform a corresponding defined or customized action. When a program fails, for example, during running, it is found that the process executes an erroneous memory operation (accessing an illegal memory, repeatedly releasing the memory, etc.), a corresponding signal is sent to the process (the memory operation error is generally SIGBUS, SIGSEGV, or SIGABRT), so that the process generates a core file and exits.

The core file monitoring process can monitor and generate the first directory of the core file through an inotify interface provided by the system, wherein the inotify is a file change notification mechanism and supports monitoring of directory and file operations, such as monitoring of opening, closing, moving/renaming, deleting, creating or attribute changing operations.

In S208, when the generation of the memory map file is monitored in the first directory, the memory map file is stored in a second directory, and the second target is located in the mobile storage device.

In one embodiment, the file capacity of the memory map file may be obtained, for example; acquiring the residual capacity of the second directory; and when the residual capacity is larger than the file capacity, storing the memory mapping file into a second directory.

And when the process has a fault, sending a signal and generating a core file, generating the file to a first directory of the core file according to the system configuration. The core file monitoring process monitors that a core file is generated, and immediately moves the core file to the configured migration save directory, which may be a second directory, for example. If the space for transferring and storing the directory is not enough, the core file of the memory file system can be deleted, and the influence on the service caused by the memory occupied by the core file is avoided.

In one embodiment, the upper limit of the file system size is set during mounting by creating a core file mount directory and then mounting the tmpfs memory file system to the directory. The core file generation directory points to the core file mounting directory, so that the storage speed of the core file is greatly improved, and the storage is finished instantly;

in one embodiment, a core file generation directory is monitored in real time through an inotify file monitoring mechanism provided by a system, the generated core file is moved to a CF card and an SD card of a slow storage device, and the core file provided by a memory file is deleted at the same time.

According to the storage method of the memory mapping file, when a process fails, the memory mapping file is generated; storing the memory mapping file into a first directory based on system configuration, wherein the first directory is located in a local memory system; the file monitoring system monitors the first directory in real time; when the generation of the memory mapping file is monitored in the first directory, the memory mapping file is stored in the second directory, and the mode that the second target is located in the mobile storage device can quickly store the memory mapping file on the network device of the low-speed storage device such as a CF card and an SD card, so that the problems and the positioning problems can be found more conveniently by using the memory mapping file, meanwhile, the program can be restarted quickly, the time of influencing the service is reduced, the maintainability of the system is greatly improved, and the operation cost is reduced.

The storage method of the memory image file comprises the steps of adding a memory file system, configuring a core file generation directory to a memory file system directory, configuring a core file transfer directory, moving the generated core file to a CF card and an SD card of a slow storage device through a core file monitoring process when the core file is generated, and deleting the core file provided by the memory file, so that the problems that the storage of the core file on the slow storage device is slow and the service is influenced are solved.

It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.

Fig. 3 is a flowchart illustrating a method of storing a memory map file according to another exemplary embodiment. The process 30 shown in fig. 3 is a supplementary description of the process shown in fig. 2.

As shown in fig. 3, in S302, the first directory is created in the local memory system. The first directory may be, for example, tempfsCore, which is used to mount tmpfs. the tmpfs temporary file system is a memory-based file system, which is similar to the virtual disk ramdisk and can use a RAM. The read-write speed is very fast because the read-write speed is almost the same as the access to the memory because the read-write speed is in the RAM.

In S304, a maximum occupied space is allocated for the files in the first directory. the size of the occupied space of tmpfs is dynamic, and the corresponding memory space is released by deleting the file according to the allocation amount of the tmpfs. And the occupied space quota is supported, the maximum space of the file system is supported to be set, and the writing fails after the maximum space is exceeded.

In S306, the temporary file system is mounted to the first directory by a partition mount command. The method includes the steps that tmpfs is mounted to a first directory tempfsCore through a mount command, and meanwhile, a space quota is set for protecting a system, so that the phenomenon that a core file is too large, occupies a memory, influences system service operation and even causes system running is avoided. If mount-t tmpfs-o size is 1G tmpfs/tmpfsCore, this command allocates a memory with an upper limit of 1G to the/tmpfsCore directory, and the above parameter 1G only tells the core that the maximum available memory of this mount point is 1G, but it does not immediately occupy 1G of memory, but uses how much space.

In S308, the second directory is created in the mobile storage device. And configuring a second directory for carrying out core file transfer and storage, such as a directory stored on the CF card or the SD card, such as/log/core file directory.

In S310, the core dump file directory of the memory map file is set as the first directory. The method can also comprise the following steps: and setting a file naming rule of the memory mapping file.

In one embodiment, a Core dump file directory of a Core file and a Core file naming rule can be set, and a formatted Core file saving location or file name format can be set through/proc/sys/kernel/Core _ pattern, for example, through an echo "/tempfsCore/Core-% e-% p-% s-% t" >/proc/sys/kernel/Core _ pattern command, the generated Core file will be controlled to be saved under the/tempfsCore directory, and the generated file name is Core-process name-process pid-timestamp, wherein the meaning of each parameter is as follows: % e indicates a process name,% p indicates a process id,% s indicates a signal for causing the core file to be generated, and t indicates a time for generating the core file.

According to the memory image file storage method, the core file can be stored quickly on the network equipment adopting low-speed storage equipment such as a CF card and an SD card, so that problems and positioning problems can be found more conveniently by using the core file, meanwhile, the program can be restarted quickly, the time influencing the service is reduced, the maintainability of the system is greatly improved, and the operation cost is reduced.

Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.

Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.

The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.

FIG. 4 is a block diagram illustrating a memory map file storage device in accordance with another exemplary embodiment. As shown in fig. 4, the memory map file storage device 40 includes: a file module 402, a first storage module 404, a monitoring module 406, and a second storage module 408.

The file module 402 is configured to generate a memory map file when a process fails; the file module 402 is further configured to generate the memory mapping file according to a preset signal mechanism when a process fails.

The first storage module 404 is configured to store the memory map file into a first directory based on system configuration, where the first directory is located in a local memory system;

the monitoring module 406 is configured to monitor the first directory in real time by a file monitoring system; the monitoring module 406 is further configured to perform real-time monitoring on the first directory by the file monitoring system through a file change notification mechanism.

The second storage module 408 is configured to store the memory map file into a second directory when the generation of the memory map file is monitored in the first directory, where the second target is located in the mobile storage device. The second storage module 408 is further configured to obtain a file capacity of the memory map file; acquiring the residual capacity of the second directory; and when the residual capacity is larger than the file capacity, storing the memory mapping file into a second directory.

FIG. 5 is a block diagram illustrating a memory map file storage device in accordance with an exemplary embodiment. As shown in fig. 5, the memory device 50 for memory map files includes: a first creation module 502 and a second creation module 504.

The first creating module 502 is configured to create the first directory in a local memory system; allocating a maximum occupied space for the files in the first directory; the first creating module 502 is further configured to mount the temporary file system to the first directory through a partition mount command.

The second creating module 504 is configured to create the second directory in the mobile storage device. The second creating module 504 is further configured to set the core dump file directory of the memory map file as the first directory. The creating module 504 is further configured to set a file naming rule of the memory map file.

According to the memory device of the memory mapping file, when a process fails, the memory mapping file is generated; storing the memory mapping file into a first directory based on system configuration, wherein the first directory is located in a local memory system; the file monitoring system monitors the first directory in real time; when the generation of the memory mapping file is monitored in the first directory, the memory mapping file is stored in the second directory, and the mode that the second target is located in the mobile storage device can quickly store the memory mapping file on the network device of the low-speed storage device such as a CF card and an SD card, so that the problems and the positioning problems can be found more conveniently by using the memory mapping file, meanwhile, the program can be restarted quickly, the time of influencing the service is reduced, the maintainability of the system is greatly improved, and the operation cost is reduced.

FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.

An electronic device 600 according to this embodiment of the disclosure is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present disclosure.

As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.

Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs the steps described in this specification in accordance with various exemplary embodiments of the present disclosure. For example, the processing unit 610 may perform the steps shown in fig. 2 and 3.

The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.

The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.

Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

The electronic device 600 may also communicate with one or more external devices 600' (e.g., keyboard, pointing device, bluetooth device, etc.), such that a user can communicate with devices with which the electronic device 600 interacts, and/or any device (e.g., router, modem, etc.) with which the electronic device 600 can communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.

Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 7, the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present disclosure.

The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).

The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: when a process fails, generating a memory mapping file; storing the memory mapping file into a first directory based on system configuration, wherein the first directory is located in a local memory system; the file monitoring system monitors the first directory in real time; and when the generation of the memory mapping file is monitored in the first directory, the memory mapping file is stored in a second directory, and the second target is located in the mobile storage device. The computer readable medium may also implement the following functions: creating the first directory in a local memory system; and allocating the maximum occupied space for the files in the first directory. The computer readable medium may also implement the following functions: and mounting a temporary file system to the first directory through a partition hanging command. The computer readable medium may also implement the following functions: creating the second directory in a mobile storage device. The computer readable medium may also implement the following functions: setting the core unloading file directory of the memory mapping file as the first directory; and setting a file naming rule of the memory mapping file.

Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.

Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:智能告警分析方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!