US11714740B2 - Storage-based log file management - Google Patents

Storage-based log file management Download PDF

Info

Publication number
US11714740B2
US11714740B2 US17/492,785 US202117492785A US11714740B2 US 11714740 B2 US11714740 B2 US 11714740B2 US 202117492785 A US202117492785 A US 202117492785A US 11714740 B2 US11714740 B2 US 11714740B2
Authority
US
United States
Prior art keywords
log file
storage
storage device
processing device
free 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.)
Active
Application number
US17/492,785
Other versions
US20220027254A1 (en
Inventor
Michael Kolesnik
Mordechay Asayag
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.)
Red Hat Inc
Original Assignee
Red Hat Inc
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 Red Hat Inc filed Critical Red Hat Inc
Priority to US17/492,785 priority Critical patent/US11714740B2/en
Assigned to RED HAT, INC. reassignment RED HAT, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: ASAYAG, MORDECHAY, KOLESNIK, MICHAEL
Publication of US20220027254A1 publication Critical patent/US20220027254A1/en
Application granted granted Critical
Publication of US11714740B2 publication Critical patent/US11714740B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates generally to log files. More specifically, but not by way of limitation, this disclosure relates managing storage space for event log files, such as those log files used to record error events or processing events related to an operating system, service, or application.
  • Log files are used to record events. These events, as examples, may take place during the execution of an operating system service, an application, or an external service. Such event log files can be used to provide an audit trail to be referred to in the future to diagnose problems, or to enable an understanding of how the computer system operates over time.
  • a service can generate large numbers of log entries in a relatively short amount of time, for example, if the service encounters a problem executing that causes it to experience large numbers of errors.
  • FIG. 1 is a block diagram of an example of a system that provides storage-based log file management according to some aspects of the disclosure.
  • FIG. 2 is a block diagram of another example of a system that provides storage-based log file management according to some aspects of the disclosure.
  • FIG. 3 is a flowchart of an example of a process for providing storage-based log file management according to some aspects of the disclosure.
  • FIG. 4 is a flowchart of another example of a process for providing storage-based log file management according to some aspects of the disclosure.
  • Event logs can be used to provide an audit trail to be referred to in the future to diagnose problems, or for other purposes.
  • a service or application might start generating large event log files or large numbers of log files due to a persistent error or other problem.
  • the log files can become undesirably large or large numbers of log files might be generated in a relatively short period of time.
  • storage space on workstations and servers has steadily increased with the complexity of software, storage space for other types of computer systems can be limited. Cloud storage is costly and there is a desire on the part of most users to minimize expense.
  • Embedded systems are often designed to minimize cost, space, or power consumption, meaning storage space must be limited. Such a system might run out of storage space and stall due to extensive logging, adversely affecting multiple services and applications, and possibly requiring immediate attention. Low storage space can also prevent memory swapping, slowing performance.
  • Some examples of the present disclosure overcome one or more of the issues mentioned above by providing a process that monitors free space on a storage device, and based on preset log file parameters, can act to reduce the space being occupied by log files in case the device the log files are being stored on or written to comes close to running out of storage space.
  • Log file parameters can specify the log file location or service being used and identify on which device the log resides. The process then monitors the device free space as reported by the file system to identify the space utilization.
  • a threshold of free space can be specified as one of the log file parameters.
  • a log file action can also be specified as one of the log file parameters and is an action designed to reduce the space being used by a log file or log files. Once the system recognizes that the free space is under the threshold it will perform the configured action.
  • a processing device in a system can monitor free space for at least one storage device while at least one log file is residing on or being written to the storage device.
  • the processing device can compare the free space for the storage device to a free space threshold and execute at least one log file action when the free space for the storage device falls below the free space threshold.
  • log file storage parameters are set by a user through a user input device.
  • the log file storage parameters may include the free space threshold and at least one log file action.
  • the log file storage parameters can also include a log file identifier or identifiers, a log file directory, a log file priority, or any combination of these.
  • a log file action includes log file deletion, log file rotation, log file write prevention or any combination of these.
  • the log file action includes rotating a log file to produce a closed log file and then compress the closed log file.
  • FIG. 1 is a block diagram of an example of a system 100 for storage-based log file management.
  • the system 100 includes the processing device 104 that can execute computer program code, also referred to as instructions, program code, or program code instructions 105 .
  • the computer program code is executable for performing operations as described herein.
  • Processing device 104 is communicatively coupled to the memory device 106 .
  • the processing device 104 can include one processing device or multiple processing devices. Non-limiting examples of the processing device 104 include a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a microprocessor, an embedded processor, a digital signal processor, etc.
  • the processing device 104 can execute one or more operations for storage-based log file management.
  • memory device 106 can include one memory device or multiple memory devices.
  • the memory device 106 can be non-volatile and may include any type of memory device that retains stored information when powered off.
  • at least some of the memory device can include a non-transitory computer-readable medium from which the processing device 104 can read instructions 105 .
  • a computer-readable medium can include electronic, optical, magnetic, or other storage devices capable of providing the processing device with computer-readable instructions 105 or other program code.
  • the memory device 106 can also include a stored value 107 for free space remaining in memory device 106 , and a stored value 108 for a free space threshold for memory device 106 .
  • memory device 106 also stores the log file 110 , as might be the case in the example where system 100 is an embedded system, where storage may be limited to minimize cost and power consumption. Storage on a mobile device may be limited for similar reasons.
  • FIG. 2 is a block diagram of an example of a system 200 that provides storage-based log file management.
  • the system 200 is implemented by computing device 202 and includes a processing device 204 that can execute computer program code 203 , also referred to as instructions or program code instructions, for performing operations related to storage-based log file management.
  • the system 200 monitors free space on the storage system used by log files maintained remotely on a network 250 , such as in the case of a system using cloud-based storage.
  • Processing device 204 is communicatively coupled to a memory device 206 .
  • the processing device 204 can include one processing device or multiple processing devices. Non-limiting examples of the processing device 204 include a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a microprocessor, etc.
  • FPGA field-programmable gate array
  • ASIC application-specific integrated circuit
  • microprocessor etc.
  • the processing device 204 can execute one or more operations for storage-based log file management.
  • the processing device 204 can execute program code 203 stored in the memory device 206 to perform the operations.
  • the instructions 203 include processor-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, such as C, C++, C#, Python, etc.
  • Computing device 202 also includes an input/output (I/O) module or modules 210 , and a random access memory (RAM) 240 .
  • I/O input/output
  • RAM random access memory
  • a bus or interconnect 244 is also provided to allow for inter- and intra-device communications using, for example, I/O module 210 .
  • Memory device 206 can include one memory device or multiple memory devices.
  • the memory device 206 can be non-volatile and may include any type of memory device that retains stored information when powered off.
  • Non-limiting examples of the memory device 206 include electrically erasable and programmable read-only memory (EEPROM), flash memory, or any other type of non-volatile memory.
  • at least some of the memory device can include a non-transitory computer-readable medium from which the processing device 204 can read instructions 203 .
  • a computer-readable medium can include electronic, optical, magnetic, or other storage devices capable of providing the processing device with computer-readable instructions 203 or other program code.
  • Non-limiting examples of a computer-readable medium include magnetic disk(s), memory chip(s), ROM, random-access memory (RAM), an ASIC, a configured processor, optical storage, or any other medium from which a computer processor can read instructions 203 .
  • the memory device 206 can also include one or more files.
  • memory device 206 can serve as a storage device for the value of free space remaining 205 , and log file storage parameters 208 . These stored values can be used to monitor free space on a cloud-based virtual storage device 260 as log files 261 are being written over network 250 through I/O module 210 , which can include a network interface (not shown).
  • I/O module 210 which can include a network interface (not shown).
  • memory device 206 serves as a first storage device including the instructions 203 and storage device 260 serves as a second storage device to which a log file is written.
  • additional log files can be written to memory device 206 .
  • log files can be written by an operating system process, an application, a service, and any of these can be running in a virtual machine.
  • Stored values for free space remaining and log file parameters can be temporarily retained in RAM 240 as cached information 270 for faster access by processing device 204 .
  • Log file storage parameters and a log file action or actions can be specified by a user through a user interface in client device 272 .
  • Log file storage parameters 208 can include log file storage parameters and actions as well as the log file identifier and log file directory for log file 261 .
  • memory device has been used in parts of the description to refer to the storage device that is local to the computing device executing the log file management process
  • storage device has been used parts of the description to refer to the storage device where event log files are recorded.
  • these terms as used in this description can refer to either volatile or non-volatile storage devices, to either physical or virtual storage devices, and to storage devices based on any type of media, including, but not limited to those based on electronic circuitry, organic materials, magnetic materials, or optical materials.
  • a computing device such as processing device 104 can perform one or more of the operations shown in FIG. 3 to provide storage-based log file management. In other examples, the computing device can implement more operations, fewer operations, different operations, or a different order of the operations depicted in FIG. 3 .
  • Process 300 of FIG. 3 is described below with reference to components discussed above.
  • the processing device 104 monitors the free space available in memory device 106 while at least one log file 110 is stored on the memory device.
  • free space can be periodically checked by the service that is monitoring log file space utilization issuing a command through the operating system that returns the space remaining on the storage device of interest.
  • the “df” command can be used.
  • the remaining free space is compared to a free space threshold 108 that is predetermined and stored.
  • the free space threshold can be specified as a percentage of total space of the storage device being free, or a certain amount of space needing to remain free, such as a certain number of megabytes or gigabytes of the available storage space of the storage device being free.
  • processing device 104 executes at least one log file action in response to detecting that the free space for memory device 106 is below the free space threshold 108 .
  • computing device 202 can perform the operations of process 400 of FIG. 4 using processing device 204 to provide storage-based log file management according to some aspects of the disclosure. In other examples, the computing device 202 can implement more operations, fewer operations, different operations, or a different order of the operations depicted in FIG. 4 .
  • Process 400 of FIG. 4 is described below with reference to components discussed above.
  • processing device 204 receives, as input, log file storage parameters.
  • the input can be received from a user input device such as client device 272 or can be received by accessing stored log file storage parameters.
  • log file storage parameters can include, as examples, a free space threshold, a log file identifier, a log file directory, and a log file priority.
  • the free space threshold has been discussed above.
  • the log file identifier is the file identifier of a log file for which space utilization is to be, at least indirectly, monitored.
  • a log file directory is the name of a directory where the log file or multiple such log files reside.
  • a log file priority may be specified if there are multiple log files being monitored.
  • the log file priority can indicate an order of log files on which log file actions are to be taken when the free space drops below the threshold.
  • the log file priority can, for example, indicate the largest log file is acted on first. Alternatively, the log file priority can specify an order of action based on file names or on when the log file was last written to.
  • processing device 204 monitors free space on storage device 260 while at least one log file 261 is being written to the storage device.
  • the “dr” command can be issued, which will cause the operating system to return a value representing remaining free space.
  • the process can proceed to block 412 .
  • the processing device 204 executes at least one log file action such as log file deletion, log file rotation, log file locking, or logging prevention.
  • Log file deletion can include deleting older even log files in the specified directory or that correspond to the log file specified by the log file identifier.
  • Log file deletion can also or alternatively include deleting a current event log file and allowing the logging process to start anew.
  • either the log file or the logging commands for the offending process can be locked or stopped. Locking a log file may cause the offending application or service to stop, but the rest of the system will keep operating and have enough storage space.
  • Log file rotation can also be initiated based on the free space available on or in the storage device. Log rotation would otherwise normally be done based on a schedule, based on re-starts of the logging service, or when requested by a user.
  • a combination of the log file actions listed can also be executed by the processing device 204 . In some aspects, the log file action or actions can be specified by user input.
  • log file rotation was initiated at block 414 in response to the free space remaining on the storage device being below the specified threshold, a closed log file listing event descriptors for events up until the rotation normally results.
  • This closed log file is compressed at block 416 to recover storage space.

Abstract

A process in a system can monitor available free storage space on a storage device, and, based on preset log file parameters, can act upon log files being stored on or written to the storage device to keep the storage device from running out of storage space due to excessive logging. The process monitors the device free space as reported by the file system to determine space utilization. A threshold of free space can be specified as a parameter. A log file action can also be specified as a parameter and is an action designed to reduce the space being used by a log file or log files. Once the process recognizes that the free space is under the threshold it will perform the configured action.

Description

CROSS-REFERENCE TO RELATED APPLICATION
This is a continuation of and claims priority to U.S. patent application Ser. No. 16/404,120, filed May 6, 2019, the entire disclosure of which is incorporated herein by reference.
TECHNICAL FIELD
The present disclosure relates generally to log files. More specifically, but not by way of limitation, this disclosure relates managing storage space for event log files, such as those log files used to record error events or processing events related to an operating system, service, or application.
BACKGROUND
Operating systems provide for the creation and storage of log files. Log files are used to record events. These events, as examples, may take place during the execution of an operating system service, an application, or an external service. Such event log files can be used to provide an audit trail to be referred to in the future to diagnose problems, or to enable an understanding of how the computer system operates over time. In some circumstances, a service can generate large numbers of log entries in a relatively short amount of time, for example, if the service encounters a problem executing that causes it to experience large numbers of errors.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of an example of a system that provides storage-based log file management according to some aspects of the disclosure.
FIG. 2 is a block diagram of another example of a system that provides storage-based log file management according to some aspects of the disclosure.
FIG. 3 is a flowchart of an example of a process for providing storage-based log file management according to some aspects of the disclosure.
FIG. 4 is a flowchart of another example of a process for providing storage-based log file management according to some aspects of the disclosure.
DETAILED DESCRIPTION
Event logs can be used to provide an audit trail to be referred to in the future to diagnose problems, or for other purposes. When a system runs, a service or application might start generating large event log files or large numbers of log files due to a persistent error or other problem. The log files can become undesirably large or large numbers of log files might be generated in a relatively short period of time. While storage space on workstations and servers has steadily increased with the complexity of software, storage space for other types of computer systems can be limited. Cloud storage is costly and there is a desire on the part of most users to minimize expense. Embedded systems are often designed to minimize cost, space, or power consumption, meaning storage space must be limited. Such a system might run out of storage space and stall due to extensive logging, adversely affecting multiple services and applications, and possibly requiring immediate attention. Low storage space can also prevent memory swapping, slowing performance.
Some examples of the present disclosure overcome one or more of the issues mentioned above by providing a process that monitors free space on a storage device, and based on preset log file parameters, can act to reduce the space being occupied by log files in case the device the log files are being stored on or written to comes close to running out of storage space. Log file parameters can specify the log file location or service being used and identify on which device the log resides. The process then monitors the device free space as reported by the file system to identify the space utilization. A threshold of free space can be specified as one of the log file parameters. A log file action can also be specified as one of the log file parameters and is an action designed to reduce the space being used by a log file or log files. Once the system recognizes that the free space is under the threshold it will perform the configured action.
As an example, a processing device in a system can monitor free space for at least one storage device while at least one log file is residing on or being written to the storage device. The processing device can compare the free space for the storage device to a free space threshold and execute at least one log file action when the free space for the storage device falls below the free space threshold.
In some examples, log file storage parameters are set by a user through a user input device. The log file storage parameters may include the free space threshold and at least one log file action. The log file storage parameters can also include a log file identifier or identifiers, a log file directory, a log file priority, or any combination of these. In some examples a log file action includes log file deletion, log file rotation, log file write prevention or any combination of these. In some examples the log file action includes rotating a log file to produce a closed log file and then compress the closed log file.
These illustrative examples are given to introduce the reader to the general subject matter discussed here and are not intended to limit the scope of the disclosed concepts. The following sections describe various additional features and examples with reference to the drawings in which like numerals indicate like elements but, like the illustrative examples, should not be used to limit the present disclosure.
FIG. 1 is a block diagram of an example of a system 100 for storage-based log file management. The system 100 includes the processing device 104 that can execute computer program code, also referred to as instructions, program code, or program code instructions 105. The computer program code is executable for performing operations as described herein. Processing device 104 is communicatively coupled to the memory device 106. The processing device 104 can include one processing device or multiple processing devices. Non-limiting examples of the processing device 104 include a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a microprocessor, an embedded processor, a digital signal processor, etc. The processing device 104 can execute one or more operations for storage-based log file management.
Still referring to FIG. 1 , memory device 106 can include one memory device or multiple memory devices. The memory device 106 can be non-volatile and may include any type of memory device that retains stored information when powered off. In some examples, at least some of the memory device can include a non-transitory computer-readable medium from which the processing device 104 can read instructions 105. A computer-readable medium can include electronic, optical, magnetic, or other storage devices capable of providing the processing device with computer-readable instructions 105 or other program code.
The memory device 106 can also include a stored value 107 for free space remaining in memory device 106, and a stored value 108 for a free space threshold for memory device 106. In this example, memory device 106 also stores the log file 110, as might be the case in the example where system 100 is an embedded system, where storage may be limited to minimize cost and power consumption. Storage on a mobile device may be limited for similar reasons.
FIG. 2 is a block diagram of an example of a system 200 that provides storage-based log file management. The system 200 is implemented by computing device 202 and includes a processing device 204 that can execute computer program code 203, also referred to as instructions or program code instructions, for performing operations related to storage-based log file management. The system 200 monitors free space on the storage system used by log files maintained remotely on a network 250, such as in the case of a system using cloud-based storage. Processing device 204 is communicatively coupled to a memory device 206. The processing device 204 can include one processing device or multiple processing devices. Non-limiting examples of the processing device 204 include a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a microprocessor, etc.
The processing device 204 can execute one or more operations for storage-based log file management. The processing device 204 can execute program code 203 stored in the memory device 206 to perform the operations. In some examples, the instructions 203 include processor-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, such as C, C++, C#, Python, etc. Computing device 202 also includes an input/output (I/O) module or modules 210, and a random access memory (RAM) 240. A bus or interconnect 244 is also provided to allow for inter- and intra-device communications using, for example, I/O module 210.
Memory device 206 can include one memory device or multiple memory devices. The memory device 206 can be non-volatile and may include any type of memory device that retains stored information when powered off. Non-limiting examples of the memory device 206 include electrically erasable and programmable read-only memory (EEPROM), flash memory, or any other type of non-volatile memory. In some examples, at least some of the memory device can include a non-transitory computer-readable medium from which the processing device 204 can read instructions 203. A computer-readable medium can include electronic, optical, magnetic, or other storage devices capable of providing the processing device with computer-readable instructions 203 or other program code. Non-limiting examples of a computer-readable medium include magnetic disk(s), memory chip(s), ROM, random-access memory (RAM), an ASIC, a configured processor, optical storage, or any other medium from which a computer processor can read instructions 203.
The memory device 206 can also include one or more files. For example, memory device 206 can serve as a storage device for the value of free space remaining 205, and log file storage parameters 208. These stored values can be used to monitor free space on a cloud-based virtual storage device 260 as log files 261 are being written over network 250 through I/O module 210, which can include a network interface (not shown). Thus, in system 200 of FIG. 2 , memory device 206 serves as a first storage device including the instructions 203 and storage device 260 serves as a second storage device to which a log file is written. In other examples, additional log files can be written to memory device 206. Any of the log files can be written by an operating system process, an application, a service, and any of these can be running in a virtual machine. Stored values for free space remaining and log file parameters can be temporarily retained in RAM 240 as cached information 270 for faster access by processing device 204. Log file storage parameters and a log file action or actions can be specified by a user through a user interface in client device 272. Log file storage parameters 208 can include log file storage parameters and actions as well as the log file identifier and log file directory for log file 261.
For convenience, the term memory device has been used in parts of the description to refer to the storage device that is local to the computing device executing the log file management process, while the term storage device has been used parts of the description to refer to the storage device where event log files are recorded. However, these terms as used in this description can refer to either volatile or non-volatile storage devices, to either physical or virtual storage devices, and to storage devices based on any type of media, including, but not limited to those based on electronic circuitry, organic materials, magnetic materials, or optical materials.
In some examples, a computing device such as processing device 104 can perform one or more of the operations shown in FIG. 3 to provide storage-based log file management. In other examples, the computing device can implement more operations, fewer operations, different operations, or a different order of the operations depicted in FIG. 3 . Process 300 of FIG. 3 is described below with reference to components discussed above.
In block 302 of FIG. 3 , the processing device 104 monitors the free space available in memory device 106 while at least one log file 110 is stored on the memory device. As an example, free space can be periodically checked by the service that is monitoring log file space utilization issuing a command through the operating system that returns the space remaining on the storage device of interest. In Linux, as an example, the “df” command can be used.
At block 304, the remaining free space is compared to a free space threshold 108 that is predetermined and stored. As examples, the free space threshold can be specified as a percentage of total space of the storage device being free, or a certain amount of space needing to remain free, such as a certain number of megabytes or gigabytes of the available storage space of the storage device being free. At block 306, processing device 104 executes at least one log file action in response to detecting that the free space for memory device 106 is below the free space threshold 108.
As another example, computing device 202 can perform the operations of process 400 of FIG. 4 using processing device 204 to provide storage-based log file management according to some aspects of the disclosure. In other examples, the computing device 202 can implement more operations, fewer operations, different operations, or a different order of the operations depicted in FIG. 4 . Process 400 of FIG. 4 is described below with reference to components discussed above.
At block 402, processing device 204 receives, as input, log file storage parameters. The input can be received from a user input device such as client device 272 or can be received by accessing stored log file storage parameters. These log file storage parameters can include, as examples, a free space threshold, a log file identifier, a log file directory, and a log file priority.
The free space threshold has been discussed above. The log file identifier is the file identifier of a log file for which space utilization is to be, at least indirectly, monitored. A log file directory is the name of a directory where the log file or multiple such log files reside. A log file priority may be specified if there are multiple log files being monitored. The log file priority can indicate an order of log files on which log file actions are to be taken when the free space drops below the threshold. The log file priority can, for example, indicate the largest log file is acted on first. Alternatively, the log file priority can specify an order of action based on file names or on when the log file was last written to.
Continuing with FIG. 4 , at block 408, processing device 204 monitors free space on storage device 260 while at least one log file 261 is being written to the storage device. For example, in a Linux system, the “dr” command can be issued, which will cause the operating system to return a value representing remaining free space.
If the free space is below the free space threshold at block 410, the process can proceed to block 412. In block 412, the processing device 204 executes at least one log file action such as log file deletion, log file rotation, log file locking, or logging prevention. Log file deletion can include deleting older even log files in the specified directory or that correspond to the log file specified by the log file identifier. Log file deletion can also or alternatively include deleting a current event log file and allowing the logging process to start anew. In this example, in addition to these choices, either the log file or the logging commands for the offending process can be locked or stopped. Locking a log file may cause the offending application or service to stop, but the rest of the system will keep operating and have enough storage space. Log file rotation can also be initiated based on the free space available on or in the storage device. Log rotation would otherwise normally be done based on a schedule, based on re-starts of the logging service, or when requested by a user. A combination of the log file actions listed can also be executed by the processing device 204. In some aspects, the log file action or actions can be specified by user input.
Still referring to FIG. 4 , if log file rotation was initiated at block 414 in response to the free space remaining on the storage device being below the specified threshold, a closed log file listing event descriptors for events up until the rotation normally results. This closed log file is compressed at block 416 to recover storage space.
Unless specifically stated otherwise, it is appreciated that throughout this specification that terms such as “operations,” “processing,” “computing,” “comparing,” and “determining” or the like refer to actions or processes of a computing device, such as one or more computers or a similar electronic computing device or devices, that manipulate or transform data represented as physical electronic or magnetic quantities within memories, or other information storage devices, transmission devices, or display devices of the computing platform. The order of the blocks presented in the examples above can be varied—for example, blocks can be re-ordered, combined, or broken into sub-blocks. Certain blocks or processes can be performed in parallel. Terms such as “above,” “below,” when referring to numerical comparisons can encompass the concept of equality.
The foregoing description of certain examples, including illustrated examples, has been presented only for the purpose of illustration and description and is not intended to be exhaustive or to limit the disclosure to the precise forms disclosed. Numerous modifications, adaptations, and uses thereof will be apparent to those skilled in the art without departing from the scope of the disclosure.

Claims (20)

The invention claimed is:
1. A system comprising:
a processing device; and
at least one storage device including instructions for an application or service that are executable by the processing device for causing the processing device to perform operations comprising:
receiving, from an operating system, a value representing remaining free space on the at least one storage device while at least one log file is being written to the at least one storage device by the application or service, the free space configured for use by multiple applications or services;
comparing the value representing the remaining free space on the at least one storage device to a predetermined threshold indicative of storage space to be maintained as free space on the at least one storage device; and
executing at least one log file action in response to the value as reported by the operating system for the at least one storage device falling below the predetermined threshold.
2. The system of claim 1, wherein the at least one storage device comprises a first storage device for storing the instructions and a second storage device for storing the at least one log file.
3. The system of claim 1, wherein the operations further comprise receiving or accessing log file storage parameters, the log file storage parameters including the predetermined threshold and the at least one log file action.
4. The system of claim 3, further comprising a user input device configured to receive the log file storage parameters.
5. The system of claim 3, wherein the log file storage parameters further include at least one of a log file identifier, a log file directory, or a log file priority.
6. The system of claim 3, wherein the operation of executing the at least one log file action further comprises an operation executing at least one of log file deletion, log file rotation, or log file write prevention.
7. The system of claim 1, wherein the operation of executing at least one log file action comprises the operations of:
rotating the at least one log file to produce a closed log file;
and compressing the closed log file.
8. A method comprising:
receiving, by a processing device executing an application or service and from an operating system, a value representing remaining free space on a storage device while at least one log file is being written to the storage device by the application or service, the free space being used by multiple applications or services;
comparing, by the processing device, the value for the storage device to a predetermined threshold indicative of storage space to be maintained as free space on the storage device; and
executing, by the processing device, at least one log file action in response to the value as reported by the operating system for the storage device falling below the predetermined threshold.
9. The method of claim 8, further comprising receiving or accessing log file storage parameters, the log file storage parameters including the predetermined threshold and the at least one log file action.
10. The method of claim 9, further wherein the log file storage parameters are received through a user input device.
11. The method of claim 9, wherein the log file storage parameters further include at least one of a log file identifier, a log file directory, or a log file priority.
12. The method of claim 9, wherein the at least one log file action includes at least one of log file deletion, log file rotation, or log file write prevention.
13. The method of claim 8, wherein the at least one log file action comprises:
rotating the at least one log file to produce a closed log file; and
compressing the closed log file.
14. A non-transitory computer-readable medium comprising program code for an application or service that is executable by a processing device for causing the processing device to:
receive, from an operating system, a value representing remaining free space on a storage device while at least one log file is being written to the storage device by the application or service, the free space configured for use by multiple applications or services;
compare the value for the storage device to a predetermined threshold indicative of storage space to be maintained as free space on the storage device; and
execute at least one log file action in response to the value as reported by the operating system for the storage device falling below the predetermined threshold.
15. The non-transitory computer-readable medium of claim 14, wherein the storage device comprises the non-transitory computer-readable medium.
16. The non-transitory computer-readable medium of claim 14, wherein the program code is executable by the processing device for causing the processing device to receive or access log file storage parameters, the log file storage parameters including the predetermined threshold and the at least one log file action.
17. The non-transitory computer-readable medium of claim 16, wherein the program code is executable by the processing device for causing the processing device to receive the log file storage parameters through a user input device.
18. The non-transitory computer-readable medium of claim 16, wherein the log file storage parameters further include at least one of a log file identifier, a log file directory, or a log file priority.
19. The non-transitory computer-readable medium of claim 16, wherein the program code that is executable by the processing device for causing the processing device to execute at least one log file action further causes the processing device to execute at least one of log file deletion, log file rotation, or log file write prevention.
20. The non-transitory computer-readable medium of claim 14, wherein the program code is executable by the processing device for causing the processing device to:
rotate the at least one log file to produce a closed log file; and
compress the closed log file.
US17/492,785 2019-05-06 2021-10-04 Storage-based log file management Active US11714740B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/492,785 US11714740B2 (en) 2019-05-06 2021-10-04 Storage-based log file management

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US16/404,120 US11169901B2 (en) 2019-05-06 2019-05-06 Storage-based log file management
US17/492,785 US11714740B2 (en) 2019-05-06 2021-10-04 Storage-based log file management

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US16/404,120 Continuation US11169901B2 (en) 2019-05-06 2019-05-06 Storage-based log file management

Publications (2)

Publication Number Publication Date
US20220027254A1 US20220027254A1 (en) 2022-01-27
US11714740B2 true US11714740B2 (en) 2023-08-01

Family

ID=73046374

Family Applications (2)

Application Number Title Priority Date Filing Date
US16/404,120 Active 2039-10-18 US11169901B2 (en) 2019-05-06 2019-05-06 Storage-based log file management
US17/492,785 Active US11714740B2 (en) 2019-05-06 2021-10-04 Storage-based log file management

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US16/404,120 Active 2039-10-18 US11169901B2 (en) 2019-05-06 2019-05-06 Storage-based log file management

Country Status (1)

Country Link
US (2) US11169901B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11157373B2 (en) * 2019-11-04 2021-10-26 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Prioritized transfer of failure event log data
US11159695B1 (en) * 2021-01-08 2021-10-26 Xerox Corporation System and method for remote user interactive storage management for communal devices
CN113094333A (en) * 2021-03-18 2021-07-09 智道网联科技(北京)有限公司 Method and device for managing running logs of vehicle-mounted terminal
CN113326004B (en) * 2021-06-10 2023-03-03 深圳市移卡科技有限公司 Efficient log centralization method and device in cloud computing environment

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040230763A1 (en) 2003-05-15 2004-11-18 Shy Cohen Memory tracking tool
US20080208530A1 (en) 2007-02-28 2008-08-28 Nedumaran Palani Kumanan Methods and apparatus for assessing health of memory utilization of a program
US20090157767A1 (en) * 2007-12-18 2009-06-18 Microsoft Corporation Circular log amnesia detection
CN102799514A (en) 2011-05-24 2012-11-28 中兴通讯股份有限公司 Method and system for managing log records
JP5509704B2 (en) 2009-07-16 2014-06-04 株式会社リコー Information processing apparatus, log management method, and log management program
US20150112935A1 (en) * 2013-10-17 2015-04-23 International Business Machines Corporation Managing log data using a circular fixed size file
US20150254285A1 (en) * 2012-10-04 2015-09-10 Alcatel Lucent Data logs management in a multi-client architecture
US20160170823A1 (en) * 2014-12-11 2016-06-16 Pure Storage, Inc. Cloud alert to replica
US9372751B2 (en) * 2012-09-06 2016-06-21 International Business Machines Corporation Free space collection in log structured storage systems
US9471237B1 (en) 2015-02-04 2016-10-18 Amazon Technologies, Inc. Memory consumption tracking
US9535981B2 (en) * 2013-07-15 2017-01-03 Netapp, Inc. Systems and methods for filtering low utility value messages from system logs
CN106815124A (en) 2015-12-01 2017-06-09 北京国双科技有限公司 Journal file treating method and apparatus
CN106815363A (en) 2017-01-24 2017-06-09 郑州云海信息技术有限公司 One kind rotates management method and device based on linux daily records
US20180150231A1 (en) 2016-11-30 2018-05-31 Seiko Epson Corporation Data management device, data management method, and robot system
US10212023B2 (en) 2016-10-05 2019-02-19 Vmware, Inc. Methods and systems to identify and respond to low-priority event messages
US10216429B2 (en) 2015-06-26 2019-02-26 International Business Machines Corporation Performing post-processing operations for log file writes
US10437470B1 (en) * 2015-06-22 2019-10-08 Amazon Technologies, Inc. Disk space manager
US20200073981A1 (en) * 2018-08-31 2020-03-05 International Business Machines Corporation Optimizing data entries in a log
US20200242084A1 (en) 2019-01-28 2020-07-30 International Business Machines Corporation Dynamically increasing available storage space in a storage volume

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040230763A1 (en) 2003-05-15 2004-11-18 Shy Cohen Memory tracking tool
US20080208530A1 (en) 2007-02-28 2008-08-28 Nedumaran Palani Kumanan Methods and apparatus for assessing health of memory utilization of a program
US20090157767A1 (en) * 2007-12-18 2009-06-18 Microsoft Corporation Circular log amnesia detection
JP5509704B2 (en) 2009-07-16 2014-06-04 株式会社リコー Information processing apparatus, log management method, and log management program
CN102799514A (en) 2011-05-24 2012-11-28 中兴通讯股份有限公司 Method and system for managing log records
US9372751B2 (en) * 2012-09-06 2016-06-21 International Business Machines Corporation Free space collection in log structured storage systems
US20150254285A1 (en) * 2012-10-04 2015-09-10 Alcatel Lucent Data logs management in a multi-client architecture
US9535981B2 (en) * 2013-07-15 2017-01-03 Netapp, Inc. Systems and methods for filtering low utility value messages from system logs
US9529809B2 (en) 2013-10-17 2016-12-27 International Business Machines Corporation Managing log data using a circular fixed size file
US20150112935A1 (en) * 2013-10-17 2015-04-23 International Business Machines Corporation Managing log data using a circular fixed size file
US20160170823A1 (en) * 2014-12-11 2016-06-16 Pure Storage, Inc. Cloud alert to replica
US9471237B1 (en) 2015-02-04 2016-10-18 Amazon Technologies, Inc. Memory consumption tracking
US10437470B1 (en) * 2015-06-22 2019-10-08 Amazon Technologies, Inc. Disk space manager
US10216429B2 (en) 2015-06-26 2019-02-26 International Business Machines Corporation Performing post-processing operations for log file writes
CN106815124A (en) 2015-12-01 2017-06-09 北京国双科技有限公司 Journal file treating method and apparatus
US10212023B2 (en) 2016-10-05 2019-02-19 Vmware, Inc. Methods and systems to identify and respond to low-priority event messages
US20180150231A1 (en) 2016-11-30 2018-05-31 Seiko Epson Corporation Data management device, data management method, and robot system
CN106815363A (en) 2017-01-24 2017-06-09 郑州云海信息技术有限公司 One kind rotates management method and device based on linux daily records
US20200073981A1 (en) * 2018-08-31 2020-03-05 International Business Machines Corporation Optimizing data entries in a log
US20200242084A1 (en) 2019-01-28 2020-07-30 International Business Machines Corporation Dynamically increasing available storage space in a storage volume

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Managing Logs with Logrotate," Fideloper LLC, Mar. 11, 2014, https://serversforhackers.com/c/managing-logs-with-logrotate.

Also Published As

Publication number Publication date
US20220027254A1 (en) 2022-01-27
US20200356460A1 (en) 2020-11-12
US11169901B2 (en) 2021-11-09

Similar Documents

Publication Publication Date Title
US11714740B2 (en) Storage-based log file management
US10817386B2 (en) Virtual machine recovery method and virtual machine management device
US8909876B2 (en) Snapshots in a hybrid storage device comprising a magnetic disk and a solid state disk
US8682867B2 (en) Deleted data recovery in data storage systems
US20140032833A1 (en) Dynamic Disk Space Management In A File System
EP4062278A1 (en) Data management
US11556400B2 (en) Handling large messages via pointer and log
WO2019140738A1 (en) Method for avoiding excess return visits, and electronic apparatus and computer-readable storage medium
CN116450287A (en) Method, device, equipment and readable medium for managing storage capacity of service container
US20150378829A1 (en) Resource pre-configuration
CN114595038A (en) Data processing method, computing device and computer storage medium
US10430115B2 (en) System and method for optimizing multiple packaging operations in a storage system
US8682944B2 (en) File system location verification using a sentinel
CN117131014A (en) Database migration method, device, equipment and storage medium
US20190065065A1 (en) Data protection method and storage server
CN111522598A (en) Method and device for recording restart information of embedded equipment
US11226875B2 (en) System halt event recovery
CN114518985B (en) Failure indication for storage system commands
CN111475335B (en) Method, system, terminal and storage medium for quickly recovering database
CN113656358A (en) Database log file processing method and system
US20130227226A1 (en) Electronic device and method for data backup
US20140355148A1 (en) Transport agnostic sequential drive recovery with mode data snooping
US11175830B2 (en) Storage system and data restoration method
CN112866218B (en) Processing method for remotely collecting system information and related equipment
JP7181531B2 (en) Data erasure method, data erasure program and management server

Legal Events

Date Code Title Description
AS Assignment

Owner name: RED HAT, INC., NORTH CAROLINA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:KOLESNIK, MICHAEL;ASAYAG, MORDECHAY;REEL/FRAME:057685/0757

Effective date: 20190605

FEPP Fee payment procedure

Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STPP Information on status: patent application and granting procedure in general

Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED

STCF Information on status: patent grant

Free format text: PATENTED CASE