System and method for utilizing generational file names for diagnostic data files
First Claim
1. A method for utilizing file names of diagnostic data files that are automatically generated by a runtime environment operatively coupled to a file system, the method comprising:
- initializing a generation number (Z) corresponding to a current instance of the runtime environment such that a number of the diagnostic data files in the file system for all instances of the runtime environment does not exceed a predetermined maximum number of the diagnostic data files permitted in the file system and such that the file system keeps an old diagnostic data file that had been generated by a previous instance of the runtime environment while operating the current instance of the runtime environment, wherein said initializing is performed at startup of each instance of the runtime environment, wherein a file counter base (X) defines the predetermined maximum number of the diagnostic data files permitted in the file system, wherein each diagnostic data file of said diagnostic data files is uniquely identified by a respective file name (N) that comprises a respective file counter (F), and wherein said each diagnostic data file stores information selected from the group consisting of memory dumps of a physical platform in which the runtime environment operates, traces of the physical platform, heap statistics of the physical platform, a respective process identifier of a process in the physical platform that creates said each diagnostic data file, a respective timestamp when said each diagnostic data file is created, and combinations thereof;
setting a file counter (F) for the current instance of the runtime environment to the initialized generation number (Z) such that the file counter (F) differentiates the diagnostic data files generated by the current instance of the runtime environment from the old diagnostic data file generated by the previous instance of the runtime environment;
storing a diagnostic data file generated by the current instance of the runtime environment in the file system by a file name (N) comprising the file counter (F) from said setting; and
subsequent to said storing, recalculating a new value of the file counter (F) from a current value of the file counter (F) by assigning a value resulting from a mathematical modulo operation on the current value of the file counter (F) incremented by one (1) and the file counter base (X), that is ((F+1) MOD X), to the new value of the file counter (F) such that another diagnostic data file generated by the current instance of the runtime environment is identified by another file name distinctive from the file name (N).
1 Assignment
0 Petitions
Accused Products
Abstract
A system and associated method for utilizing file names for diagnostic data files generated by a runtime environment. The method employs a file counter base that defines a predefined maximum number of files permitted in a file system, a generation number that indicates an instance of the runtime environment, and a file counter that comprises a file name. The file counter circulates by a cycle equal to the file counter base such that the file system uses only a limited disk space. The method determines the generation number per instance of the runtime environment by examining file counters of existing files in the file system. The generation number initializes the file counter for creating file names in the instance of the runtime environment. The method guarantees a longest life span of a diagnostic data file in a file system that has a limited number of files.
-
Citations
14 Claims
-
1. A method for utilizing file names of diagnostic data files that are automatically generated by a runtime environment operatively coupled to a file system, the method comprising:
-
initializing a generation number (Z) corresponding to a current instance of the runtime environment such that a number of the diagnostic data files in the file system for all instances of the runtime environment does not exceed a predetermined maximum number of the diagnostic data files permitted in the file system and such that the file system keeps an old diagnostic data file that had been generated by a previous instance of the runtime environment while operating the current instance of the runtime environment, wherein said initializing is performed at startup of each instance of the runtime environment, wherein a file counter base (X) defines the predetermined maximum number of the diagnostic data files permitted in the file system, wherein each diagnostic data file of said diagnostic data files is uniquely identified by a respective file name (N) that comprises a respective file counter (F), and wherein said each diagnostic data file stores information selected from the group consisting of memory dumps of a physical platform in which the runtime environment operates, traces of the physical platform, heap statistics of the physical platform, a respective process identifier of a process in the physical platform that creates said each diagnostic data file, a respective timestamp when said each diagnostic data file is created, and combinations thereof; setting a file counter (F) for the current instance of the runtime environment to the initialized generation number (Z) such that the file counter (F) differentiates the diagnostic data files generated by the current instance of the runtime environment from the old diagnostic data file generated by the previous instance of the runtime environment; storing a diagnostic data file generated by the current instance of the runtime environment in the file system by a file name (N) comprising the file counter (F) from said setting; and subsequent to said storing, recalculating a new value of the file counter (F) from a current value of the file counter (F) by assigning a value resulting from a mathematical modulo operation on the current value of the file counter (F) incremented by one (1) and the file counter base (X), that is ((F+1) MOD X), to the new value of the file counter (F) such that another diagnostic data file generated by the current instance of the runtime environment is identified by another file name distinctive from the file name (N). - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer program product, comprising a computer usable storage medium having a computer readable program code embodied therein, said computer readable program code containing instructions that when executed by a processor of a computer system implement a method for utilizing file names of diagnostic data files that are automatically generated by a runtime environment operatively coupled to a file system, the method comprising:
-
initializing a generation number (Z) corresponding to a current instance of the runtime environment such that a number of the diagnostic data files in the file system for all instances of the runtime environment does not exceed a predetermined maximum number of the diagnostic data files permitted in the file system and such that the file system keeps an old diagnostic data file that had been generated by a previous instance of the runtime environment while operating the current instance of the runtime environment, wherein said initializing is performed at startup of each instance of the runtime environment, wherein a file counter base (X) defines the predetermined maximum number of the diagnostic data files permitted in the file system, wherein each diagnostic data file of said diagnostic data files is uniquely identified by a respective file name (N) that comprises a respective file counter (F), and wherein said each diagnostic data file stores information selected from the group consisting of memory dumps of a physical platform in which the runtime environment operates, traces of the physical platform, heap statistics of the physical platform, a respective process identifier of a process in the physical platform that creates said each diagnostic data file, a respective timestamp when said each diagnostic data file is created, and combinations thereof; setting a file counter (F) for the current instance of the runtime environment to the initialized generation number (Z) such that the file counter (F) differentiates the diagnostic data files generated by the current instance of the runtime environment from the old diagnostic data file generated by the previous instance of the runtime environment; storing a diagnostic data file generated by the current instance of the runtime environment in the file system by a file name (N) comprising the file counter (F) from said setting; and subsequent to said storing, recalculating a new value of the file counter (F) from a current value of the file counter (F) by assigning a value resulting from a mathematical modulo operation on the current value of the file counter (F) incremented by one (1) and the file counter base (X), that is ((F+1) MOD X), to the new value of the file counter (F) such that another diagnostic data file generated by the current instance of the runtime environment is identified by another file name distinctive from the file name (N). - View Dependent Claims (7, 8, 9, 10)
-
-
11. A computer system comprising a processor and a computer readable memory unit coupled to the processor, said memory unit containing instructions that when executed by the processor implement a method for utilizing file names of diagnostic data files that are automatically generated by a runtime environment operatively coupled to a file system, the method comprising:
-
initializing a generation number (Z) corresponding to a current instance of the runtime environment such that a number of the diagnostic data files in the file system for all instances of the runtime environment does not exceed a predetermined maximum number of the diagnostic data files permitted in the file system and such that the file system keeps an old diagnostic data file that had been generated by a previous instance of the runtime environment while operating the current instance of the runtime environment, wherein said initializing is performed at startup of each instance of the runtime environment, wherein a file counter base (X) defines the predetermined maximum number of the diagnostic data files permitted in the file system, wherein each diagnostic data file of said diagnostic data files is uniquely identified by a respective file name (N) that comprises a respective file counter (F), and wherein said each diagnostic data file stores information selected from the group consisting of memory dumps of a physical platform in which the runtime environment operates, traces of the physical platform, heap statistics of the physical platform, a respective process identifier of a process in the physical platform that creates said each diagnostic data file, a respective timestamp when said each diagnostic data file is created, and combinations thereof; setting a file counter (F) for the current instance of the runtime environment to the initialized generation number (Z) such that the file counter (F) differentiates the diagnostic data files generated by the current instance of the runtime environment from the old diagnostic data file generated by the previous instance of the runtime environment; storing a diagnostic data file generated by the current instance of the runtime environment in the file system by a file name (N) comprising the file counter (F) from said setting; and subsequent to said storing, recalculating a new value of the file counter (F) from a current value of the file counter (F) by assigning a value resulting from a mathematical modulo operation on the current value of the file counter (F) incremented by one (1) and the file counter base (X), that is ((F+1) MOD X), to the new value of the file counter (F) such that another diagnostic data file generated by the current instance of the runtime environment is identified by another file name distinctive from the file name (N). - View Dependent Claims (12, 13, 14)
-
Specification