Abstract:
An operation report creation system comprises CPU operation status obtaining means for obtaining, at a regular interval, an execution address at which a CPU is performing execution and for checking and recording a program identifier of a program in execution from the obtained execution address; CPU operation time obtaining means for obtaining an operation time of the CPU during an operation period; and operation report creation means for obtaining a total number of program identifiers, recorded by the CPU operation status obtaining means, for a predetermined period for each program identifier or each group of a plurality of predetermined program identifiers and for outputting a value, obtained by multiplying a ratio of the total number of program identifiers for each program identifier or each group of the plurality of predetermined program identifiers to a total number of program identifiers recorded by the CPU operation status obtaining means for the predetermined period and the CPU operation time obtained by the CPU operation time obtaining means, as a CPU operation time required for execution of a program corresponding to the program identifier or of a program group corresponding to the plurality of predetermined program identifiers.

Description:
BACKGROUND OF THE INVENTION  
         [0001]    1. Field of the Invention  
           [0002]    The present invention relates to an operation report creation system, an operation report creation method, and an operation report creation program, and more particularly to an operation report creation system, an operation report creation method, and an operation report creation program that allow the user to create reports effectively.  
           [0003]    2. Description of the Related Art  
           [0004]    As shown in FIG. 10, a conventional operation report creation system comprises a central processing unit X 1  that operates under program control, a program X 2  that is executed by the central processing unit, program execution control means X 3 , program execution result output means X 4 , program execution history file X 5 , operation report creation means X 6 , and an operation report X 7 .  
           [0005]    The conventional operation report creation system with the configuration described above operates as described below.  
           [0006]    That is, the program execution control means X 3  controls the start and end of the execution of each program X 2 . When the program ends, the program execution result output means X 4  writes the CPU time used by the program to the program execution history file X 5 .  
           [0007]    After that, when creating an operation report, the operation report creation means X 6  reads information from the program execution history file X 5  and outputs the CPU occupation time to the operation report X 7 .  
           [0008]    However, the conventional technology described above has the following problems:  
           [0009]    First, when the totaling period of an operation report is long or when there are a large number of programs for which totals must be calculated, a large amount of history information is used to calculate the total. This is because the CPU occupation times of all programs that run during the operation period must be totaled.  
           [0010]    Second, an operation report does not include information on the programs that constantly run during system operation. This is because an operation report is created using execution information produced at the end of program execution and, therefore, execution information cannot be totaled before the program ends.  
           [0011]    Third, changing the total unit of an operation report requires modifications to the operating system that controls programs for the totals are to be calculated. This is because operation report source information is closely related with the control of the operating system under which programs are executed or execution results are output.  
         SUMMARY AND OBJECTS OF THE INVENTION  
         [0012]    It is an object of the present invention to provide an operation report creation system that does not require a large amount of history information for calculating a total even when the totaling period of the operation report is long or when there are a large number of programs for which totals must be calculated and that can total execution information on constantly-running programs.  
           [0013]    A first operation report creation system according to the present invention comprises CPU operation status obtaining means for obtaining, at a regular interval, an execution address at which a CPU is performing execution and for checking and recording a program identifier of a program in execution from the obtained execution address; CPU operation time obtaining means for obtaining an operation time of the CPU during an operation period; and operation report creation means for obtaining a total number of program identifiers, recorded by the CPU operation status obtaining means, for a predetermined period for each program identifier or each group of a plurality of predetermined program identifiers and for outputting a value, obtained by multiplying a ratio of the total number of program identifiers for each program identifier or each group of the plurality of predetermined program identifiers to a total number of program identifiers recorded by the CPU operation status obtaining means for the predetermined period and the CPU operation time obtained by the CPU operation time obtaining means, as a CPU operation time required for execution of a program corresponding to the program identifier or of a program group corresponding to the plurality of predetermined program identifiers.  
           [0014]    A second operation report creation system according to the present invention is the first operation report creation system, wherein the CPU operation status obtaining means records a CPU operation status history record into a CPU operation status history file, the record being composed of at least the program identifier of the program and a time interval between a time a previous execution address was obtained and a time a current execution address is obtained, wherein the CPU operation time obtaining means obtains, at a regular interval, an operation time of the CPU during the time interval and records a CPU operation time history record into a CPU operation time history file, the record being composed of at least the operation time of the CPU, and wherein the operation report creation means reads the CPU operation time history record stored in the CPU operation time history file, cumulates the operation time of the CPU included in the CPU operation time history record to calculate the operation time of the CPU during the operation period, reads the CPU operation status history record stored in the CPU operation status history file, cumulates the time interval included in the CPU operation status history record for each program identifier or each group of the plurality of predetermined program identifiers, and outputs avalue, obtained by multiplying a ratio of the time interval cumulated for each program identifier or each group of the plurality of predetermined program identifiers to a total of the time intervals recorded by the CPU operation status obtaining means during the predetermined period and the operation time of the CPU during the operation period, as a CPU operation time required for execution of a program corresponding to the program identifier or to a program group corresponding to the plurality of predetermined program identifiers.  
           [0015]    A third operation report creation system according to the present invention is the second operation report creation system, further comprising a conversion table that indicates a relation between a total identifier which is a total unit for cumulating the time intervals and the program identifier; and conversion table updating means for updating the conversion table, wherein the operation report creation means cumulates the time interval for each total identifier stored in the conversion table.  
           [0016]    A first operation report creation method according to the present invention comprises a CPU operation status obtaining step for obtaining at a regular interval, by a computer, an execution address at which a CPU is performing execution and for checking and recording a program identifier of a program in execution from the obtained execution address; a CPU operation time obtaining step for obtaining, by the computer, an operation time of the CPU during an operation period; and an operation report creation step for obtaining, by the computer, a total number of program identifiers, recorded by the CPU operation status obtaining step, for a predetermined period for each program identifier or each group of a plurality of predetermined program identifiers and for outputting a value, obtained by multiplying a ratio of the total number of program identifiers for each program identifier or each group of the plurality of predetermined program identifiers to a total number of program identifiers recorded by the CPU operation status obtaining step for the predetermined period and the CPU operation time obtained by the CPU operation time obtaining step, as a CPU operation time required for execution of a program corresponding to the program identifier or of a program group corresponding to the plurality of predetermined program identifiers.  
           [0017]    A second operation report creation method according to the present invention is the first operation report creation method, wherein the CPU operation status obtaining step records a CPU operation status history record into a CPU operation status history file, the record being composed of at least the program identifier of the program and a time interval between a time a previous execution address was obtained and a time a current execution address is obtained, wherein the CPU operation time obtaining step obtains, at a regular interval, an operation time of the CPU during the time interval and records a CPU operation time history record into a CPU operation time history file, the record being composed of at least the operation time of the CPU, and wherein the operation report creation step reads the CPU operation time history record stored in the CPU operation time history file, cumulates the operation time of the CPU included in the CPU operation time history record to calculate the operation time of the CPU during the operation period, reads the CPU operation status history record stored in the CPU operation status history file, cumulates the time interval included in the CPU operation status history record for each program identifier or each group of the plurality of predetermined program identifiers, and outputs a value, obtained by multiplying a ratio of the time interval cumulated for each program identifier or each group of the plurality of predetermined program identifiers to a total of the time intervals recorded by the CPU operation status obtaining step during the predetermined period and the operation time of the CPU during the operation period, as a CPU operation time required for execution of a program corresponding to the program identifier or to a program group corresponding to the plurality of predetermined program identifiers.  
           [0018]    A third operation report creation method according to the present invention is the second operation report creation method, further comprising a conversion table updating step for updating, by the computer, a conversion table that indicates a relation between a total identifier which is a total unit for cumulating the time intervals and the program identifier, wherein the operation report creation step cumulates the time interval for each total identifier stored in the conversion table.  
           [0019]    A first program according to the present invention causes a computer to execute a CPU operation status obtaining process for obtaining, at a regular interval, an execution address at which a CPU is performing execution and for checking and recording a program identifier of a program in execution from the obtained execution address; a CPU operation time obtaining process for obtaining an operation time of the CPU during an operation period; and an operation report creation process for obtaining a total number of program identifiers, recorded by the CPU operation status obtaining process, for a predetermined period for each program identifier or each group of a plurality of predetermined program identifiers and for outputting a value, obtained by multiplying a ratio of the total number of program identifiers for each program identifier or each group of the plurality of predetermined program identifiers to a total number of program identifiers recorded by the CPU operation status obtaining process for the predetermined period and the CPU operation time obtained by the CPU operation time obtaining process, as a CPU operation time required for execution of a program corresponding to the program identifier or of a program group corresponding to the plurality of predetermined program identifiers.  
           [0020]    A second program according to the present invention is the first program, wherein the CPU operation status obtaining process records a CPU operation status history record into a CPU operation status history file, the record being composed of at least the program identifier of the program and a time interval between a time a previous execution address was obtained and a time a current execution address is obtained, wherein the CPU operation time obtaining process obtains, at a regular interval, an operation time of the CPU during the time interval and records a CPU operation time history record into a CPU operation time history file, the record being composed of at least the operation time of the CPU, and wherein the operation report creation process reads the CPU operation time history record stored in the CPU operation time history file, cumulates the operation time of the CPU included in the CPU operation time history record to calculate the operation time of the CPU during the operation period, reads the CPU operation status history record stored in the CPU operation status history file, cumulates the time interval included in the CPU operation status history record for each program identifier or each group of the plurality of predetermined program identifiers, and outputs a value, obtained by multiplying a ratio of the time interval cumulated for each program identifier or each group of the plurality of predetermined program identifiers to a total of the time intervals recorded by the CPU operation status obtaining process during the predetermined period and the operation time of the CPU during the operation period, as a CPU operation time required for execution of a program corresponding to the program identifier or to a program group corresponding to the plurality of predetermined program identifiers.  
           [0021]    A third program according to the present invention is the second program, further comprising a conversion table updating process for updating a conversion table that indicates a relation between a total identifier which is a total unit for cumulating the time intervals and the program identifier, wherein the operation report creation process cumulates the time interval for each total identifier stored in the conversion table. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0022]    The invention will be understood more fully from the detailed description given here below and from the accompanying drawings of preferred embodiments of the invention, which, however, should not be considered as limiting the invention but are for explanation and understanding only.  
         [0023]    [0023]FIG. 1 is a block diagram showing the configuration of a first embodiment of the present invention;  
         [0024]    [0024]FIG. 2 is a diagram showing an example of a CPU operation time history record in the first embodiment of the present invention;  
         [0025]    [0025]FIG. 3 is a diagram showing an example of a CPU operation status history record in the first embodiment of the present invention;  
         [0026]    [0026]FIG. 4 is a diagram showing an example of address conversion information in the first embodiment of the present invention;  
         [0027]    [0027]FIG. 5 is a flowchart showing the operation of the first embodiment of the present invention;  
         [0028]    [0028]FIG. 6 is a flowchart showing the operation of the first embodiment of the present invention;  
         [0029]    [0029]FIG. 7 is a flowchart showing the operation of the first embodiment of the present invention;  
         [0030]    [0030]FIG. 8 is a diagram showing an example of the first embodiment of the present invention;  
         [0031]    [0031]FIG. 9 is a diagram showing an example of the first embodiment of the present invention; and  
         [0032]    [0032]FIG. 10 is a block diagram showing the configuration of a conventional technology. 
     
    
       [0033]    Here, it should be noted that like reference numerals represent like elements throughout the disclosure.  
       DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0034]    Next, the present invention will be described in detail by referring to the attached drawings.  
         [0035]    First, a first embodiment of the present invention will be described in detail below.  
         [0036]    Referring to FIG. 1, the first embodiment of the present invention comprises a computer  100 , a CPU operation time history file  200 , a CPU operation status history file  300 , an address conversion table  400 , and an operation report  500 . The computer  100  operates under program control.  
         [0037]    The computer  100  comprises a central processing unit group  110 , a program group  120  composed of programs to be executed the central processing units, CPU operation time obtaining means  130 , CPU operation time obtaining timer notification means  140 , CPU operation status obtaining means  150 , CPU operation status obtaining timer notification means  160 , operation report creation means  170 , and address conversion table updating means  180 .  
         [0038]    The central processing unit group  110  comprises a central processing unit  111  and a central processing unit  112 . A central processing unit  11   n  means one or more central processing units that are a third and following central processing units.  
         [0039]    The program group  120  comprises a program  121  and a program  122 . A program  12   n  means one or more programs that are a third and following programs.  
         [0040]    The CPU operation time history file  200  includes CPU operation time history records  210  obtained at a regular interval throughout the operation period.  
         [0041]    The CPU operation status history file  300  includes CPU operation status history records  310  obtained at a regular interval during a part of the operation period.  
         [0042]    The address conversion table  400  includes multiple units of address conversion information  410 .  
         [0043]    The operation of the means included in the computer will be outlined below.  
         [0044]    The CPU operation time obtaining timer notification means  140  starts the CPU operation time obtaining means  130  at a regular time interval.  
         [0045]    The CPU operation status obtaining timer notification means  160  starts the CPU operation status obtaining means  150  at a regular time interval.  
         [0046]    In response to a notification from the CPU operation time obtaining timer notification means  140 , the CPU operation time obtaining means  130  obtains, from each of the central processing units  111 ,  112 , . . . ,  11   n  in the central processing unit group  110 , the length of time (CPU operation time) during which the CPU was in operation between the time the previous information was obtained and the time the current information is obtained and records the obtained time as the CPU operation time history record  210  into the CPU operation time history file  200 .  
         [0047]    In response to a notification from the CPU operation status obtaining timer notification means  160 , the CPU operation status obtaining means  150  obtains, from each of the central processing units  111 ,  112 , . . . ,  11   n  in the central processing unit group  110 , the information on a program being processed at this point of time and records the obtained information as the CPU operation status history record  310  into the CPU operation status history file  300 .  
         [0048]    The operation report creation means  170  creates the operation report  500  from the CPU operation time history record  210  stored in the CPU operation time history file  200 , the CPU operation status history record  310  stored in the CPU operation status history file  300 , and the address conversion information  410  stored in the address conversion table  400 .  
         [0049]    The address conversion table updating means  180  updates the address conversion information  410  stored in the address conversion table  400 .  
         [0050]    Referring to FIG. 2, the CPU operation time history record  210  is composed of an information obtaining time  211  at which the information of this record was obtained, a time interval  212  that is the difference between the previous information obtaining time and the current information obtaining time, a CPU identifier  213  that uniquely identifies the CPU in the computer system, and an operation time  214  during which the CPU was in operation between the previous information obtaining time and the current information obtaining time.  
         [0051]    Referring to FIG. 3, the CPU operation status history record  310  is composed of an information obtaining time  311  at which the information of this record was obtained, a time interval  312  that is the difference between the previous information obtaining time and the current information obtaining time, a CPU identifier  313  that uniquely identifies the CPU in the computer system, a program identifier  314  that identifies the program that was being executed if the CPU was in operation when this record was obtained, and an execution address  315  that indicates an address at which the operation was executed.  
         [0052]    Referring to FIG. 4, the address conversion information  410  is composed of a total identifier  411  that identifies a unit of total, a program identifier  412  that corresponds to the total identifier, a lowest address  413 , and a highest address  414 .  
         [0053]    Next, referring to FIGS.  1 - 9 , the general operation of this embodiment will be described in detail.  
         [0054]    First, in FIG. 1, the CPU operation time obtaining timer notification means  140  starts the CPU operation time obtaining means  130  at a regular interval.  
         [0055]    The CPU operation time obtaining means  130  obtains the current time (step A 1  in FIG. 5). After that, the CPU operation time obtaining means  130  obtains the CPU operation time from the central processing unit  111  (step A 2  in FIG. 5). This CPU operation time is the length of time during which the CPU was in operation between the time the pervious information was obtained and the time the current information is obtained. The obtained information is written into the CPU operation time history file  200  as the CPU operation time history record  210  (step A 3  in FIG. 5). The same processing is performed for the central processing units  112 , . . . ,  11   n  (step A 4  in FIG. 5). Note that the CPU operation time obtaining timer notification means  140  starts the CPU operation time obtaining means  130  at a regular interval throughout the operation period.  
         [0056]    Next, the CPU operation status obtaining timer notification means  160  starts the CPU operation status obtaining means  150  at a regular interval.  
         [0057]    The CPU operation status obtaining means  150  obtains the current time (step B 1  in FIG. 6). After that, the CPU operation status obtaining means  150  checks if the central processing unit  111  is in operation (step B 2  in FIG. 6) and, if it is in operation, obtains from the central processing unit  111  the address at which execution is being performed (step B 3  in FIG. 6) and, at the same time, checks this address to find what program, that is, a program with what program identifier, is being executed and writes the obtained information into the CPU operation status history file  300  as the CPU operation status history record  310  (step B 4  in FIG. 6). The same processing is performed for the central processing units  112 , . . . ,  11   n  (step B 5  in FIG. 6). The CPU operation status obtaining timer notification means  160  starts the, CPU operation status obtaining means  150  at a regular interval during a part of the operation period that is sampled.  
         [0058]    Next, the operation report creation means  170  sequentially reads CPU operation status history record  310  from the CPU operation status history file  300  (step C 1  in FIG. 7). The operation report creation means  170  searches the address conversion information  410  in the address conversion table  400  for the total identifier with the program identifier and the execution address, included in the record that was read, as the key (step C 2  in FIG. 7). Then, the time interval included in the record that was read is added to the sampling-period by-total-identifier cumulative CPU occupation time in the work table prepared for the total identifier (step C 3  in FIG. 7). In addition, the time interval included in the record that was read is added to the sampling-period all-CPU cumulative CPU occupation time in the work table (step C 4  in FIG. 7). Similarly, all remaining CPU operation status history records  310  are read and processed (step C 5  in FIG. 7). Then, from the sampling-period by-total-identifier cumulative CPU occupation times and the sampling-period all-CPU cumulative CPU occupation time in the work table that has been completed, the sampling-period by-total-identifier CPU occupation time ratio is calculated (step C 6  in FIG. 7). After that, the CPU operation time history record  210  is read sequentially from the CPU operation time history file  200  (step C 7  in FIG. 7) and the CPU operation time in the record that was read is added to the operation-period all-CPU cumulative CPU occupation time in the work table (step C 8  in FIG. 7). Similarly, all remaining CPU operation time history records  210  are read and processed (step C 9  in FIG. 7). Finally, the operation-period all-CPU cumulative CPU occupation time and the sampling-periodby-total-identifier CPU occupation time ratio are multiplied to calculate the operation-period by-total-identifier CPU occupation time (step C 10  in FIG. 7). The operation-period by-total-identifier CPU occupation time is output as a report (step C 11  in FIG. 7). Similarly, the above calculation and the report output operation are performed for all remaining total identifiers (step C 12  in FIG. 7).  
         [0059]    On the other hand, the address conversion table updating means  180  is able to update the address conversion information  410  in the address conversion table  400  to change the total unit of the operation report  500 .  
         [0060]    Next, an example will be described.  
         [0061]    When the operation-period CPU occupation time is calculated for each total unit in the computer  100  having the central processing unit group  110  composed of two central processing units as shown in FIGS. 8 and 9, the CPU operation time obtaining timer notification means  140  starts the CPU operation time obtaining means  130  at an interval of  4   n  throughout the operation period (T 1  to T 7  in FIG. 8) The CPU operation time obtaining means obtains the operation time of each CPU and writes the CPU operation time history record  210  (D 1  in FIG. 9).  
         [0062]    On the other hand, the CPU operation status obtaining timer notification means  160  starts the CPU operation status obtaining means  150  at an interval of m throughout a sampling period (S 1  to S 7  in FIG. 8) which is shorter than the operation period. The CPU operation status obtaining means  150  obtains information on the address at which each CPU is performing processing and writes the CPU operation status history record  310  (D 3  in FIG. 9).  
         [0063]    As a result, the operation report creation means  170  calculates the operation-period all-CPU cumulative CPU occupation time (D 2  in FIG. 9) from the CPU operation time history records  210  (D 1  in FIG. 9) and calculates the sampling-period by-total-identifier cumulative CPU occupation times (D 5  in FIG. 9) and the sampling-period all-CPU cumulative CPU occupation time (D 6  in FIG. 9) from the CPU operation status history records (D 3  in FIG. 9) and the address conversion information (D 4  in FIG. 9) to calculate the sampling-period by-total-identifier CPU occupation time ratio (D 7  in FIG. 9). As a result, the CPU occupation time report (D 8  in FIG. 9) is created from the operation-period all-CPU cumulative CPU occupation time (D 2  in FIG. 9) and the sampling-period by-total-identifier CPU occupation time ratio (D 7  in FIG. 9).  
         [0064]    Next, a second embodiment of the present invention will be described with reference to the drawings.  
         [0065]    The second embodiment of the present invention has an operation report creation program. The operation report creation program controls the operation of the computer  100  to cause the computer  100  to execute the means described above, that is, the same means as those in the first embodiment.  
         [0066]    As described above, the present invention provides the following advantages:  
         [0067]    First, even when the totaling time of an operation report is long or when the totals of a large number of programs must be calculated, the equivalent information may be obtained through a short-period sampling without having to calculate a huge amount of total information on the CPU occupation times of all programs throughout a very long operation time. This is because the CPU occupation time during the operation period may be estimated for each total unit from the CPU operation time during the operation period and the CPU operation status during a sampling period.  
         [0068]    Second, the total of the CPU occupation time may be calculated even for a constantly running program even if such a program runs during system operation. This is because the total of the CPU occupation time is calculated based on the information obtained during a sampling period, not on the execution information produced at the end of the program.  
         [0069]    Third, the system may be applied without adding modifications to programs whose totals are to be calculated or to the operating system that controls execution. This is because the system monitors the CPU operation time and the operation status externally.  
         [0070]    Fourth, a total may be calculated from various aspects, for example, on a functional basis or on a product basis. This is because the information in the address conversion table, which is used to create a CPU occupation time report, may be changed to information for use in calculating a total on a basis of any unit the user desires.  
         [0071]    Although the invention has been described in detail above in connection with various preferred embodiments thereof, it will be appreciated by those skilled in the art that these embodiments have been provided solely for purposes of illustration, and are in no way to be considered as limiting the invention. Instead, various modifications and substitutions of equivalent techniques will be readily apparent to those skilled in the art upon reading this specification, and such modifications and substitutions are to be considered as falling within the true scope and spirit of the following claims.