Log information acquisition program, log information acquisition method, and information processing device

By acquiring log information based on different conditions within a time frame, the method reduces processor load and ensures efficient analysis of application abnormalities, addressing the performance deterioration caused by log information acquisition.

JP2024162565AInactive Publication Date: 2024-11-21FUJITSU LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023078193
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2024-11-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The increased processor load during log information acquisition can deteriorate the execution performance of application software, particularly when investigating the cause of events like response delays.

Method used

A method to acquire log information by obtaining first and second log information based on different conditions, where the acquisition times are within a predetermined time frame, reducing processor load by adjusting the acquisition of periodic and process/thread-triggered log information.

Benefits of technology

Reduces processor load during log information acquisition, minimizing delays in application processing and enabling accurate analysis of application abnormalities by prioritizing regular log information acquisition and using processor usage rates as triggers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024162565000001_ABST
    Figure 2024162565000001_ABST
Patent Text Reader

Abstract

To reduce a load of a processor to acquire log information.SOLUTION: An information processing device acquires first log information about a plurality of threads included in a process during program execution on the basis of a first condition, acquires second log information about at least one thread including in the process on the basis of a second condition different from the first condition, and acquires one from the first log information and the second log information in the case that respective acquisition periods of the first log information and the second log information exist within a prescribed time frame.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a log information acquisition program, a log information acquisition method, and an information processing device. [Background technology]

[0002] During the execution of application software, events such as no response or delayed response may occur. In order to investigate the cause of the event, it is desirable to obtain log information immediately after the event occurs. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent Publication No. 2022-62520 [Patent Document 2] JP 2015-82131 A [Patent Document 3] Special Publication No. 2013-522741 [Patent Document 4] Special Publication No. 2012-531642 Summary of the Invention [Problem to be solved by the invention]

[0004] The increased load on the processor due to acquisition of log information may result in a decrease in the execution performance of application software.

[0005] One aspect of the present invention is to reduce the processor load when acquiring log information to investigate the cause of an event such as a response delay. [Means for solving the problem]

[0006] In one aspect, the log information acquisition program may cause a computer to execute the following processes. The process may acquire first log information about a plurality of threads included in a process during program execution based on a first condition. The process may acquire second log information about at least one thread included in the process based on a second condition different from the first condition. The process may acquire one of the first log information and the second log information when the acquisition times of the first log information and the second log information are within a predetermined time frame. Effect of the Invention

[0007] According to one aspect, the present invention can reduce the processor load when acquiring log information to investigate the cause of an event such as a response delay. [Brief description of the drawings]

[0008] [Figure 1] FIG. 1 is a diagram illustrating an example of an information processing system according to an embodiment. [Diagram 2] FIG. 11 is a diagram illustrating another example of an information processing system according to an embodiment. [Diagram 3] 1 is a block diagram showing an example of a hardware (HW) configuration of a computer that realizes an information processing device according to an embodiment. [Figure 4] 1 is a diagram illustrating a first example of acquisition of log information in an information processing device according to an embodiment. [Diagram 5] FIG. 11 is a diagram illustrating a second example of acquisition of log information in an information processing device according to an embodiment. [Figure 6] FIG. 13 is a diagram illustrating an example of CPU usage in a process and CPU usage in each thread. [Figure 7] FIG. 13 is a diagram illustrating an example of a CPU usage rate in a process and a CPU usage rate in each thread. [Figure 8] FIG. 13 is a diagram illustrating another example of the CPU utilization rate in a process and the CPU utilization rate in each thread. [Figure 9]1 is a diagram illustrating a first example of adjusting the acquisition timing of log information in an information processing device according to an embodiment. FIG. [Figure 10] 11 is a diagram illustrating a second example of adjusting the acquisition timing of log information in an information processing device according to an embodiment. FIG. [Figure 11] 1 is a block diagram illustrating an example of a functional configuration of an information processing device according to an embodiment. [Figure 12] FIG. 2 is an example of a data flow diagram in an information processing device according to an embodiment. [Figure 13] FIG. 13 is a diagram illustrating an example of a user setting variable. [Figure 14] FIG. 13 is a diagram illustrating an example of a CPU state recording variable. [Figure 15] FIG. 13 is a diagram illustrating an example of a log information recording variable. [Figure 16] FIG. 11 is a diagram illustrating an example of CPU utilization data. [Figure 17] FIG. 4 illustrates an example of log information. [Figure 18] 10 is a flowchart illustrating an example of an operation of an information processing device according to an embodiment. [Figure 19] FIG. 11 is a diagram illustrating an example of a log information acquisition process performed by an information processing device according to an embodiment. [Figure 20] FIG. 20 is a diagram showing an example of the log information acquisition process subsequent to FIG. 19. [Figure 21] FIG. 21 is a diagram showing an example of a log information acquisition process subsequent to FIG. 20. [Figure 22] 11 is a diagram illustrating an example of a process of acquiring a CPU utilization rate by an information processing device according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. However, the embodiment described below is merely an example, and is not intended to exclude various modifications or application of techniques not specified below. For example, this embodiment can be modified in various ways without departing from the spirit of the invention. In the drawings used in the following description, parts with the same reference numerals represent the same or similar parts unless otherwise specified.

[0010] [A] Explanation of an example system FIG. 1 is a diagram illustrating an example of a management system 1 according to an embodiment.

[0011] The management system 1 may include a console 2 and an information processing device 10. The information processing device 10 includes, as a software configuration, a target application 11, an execution environment 12, an interface 13, a monitoring program 14, a setting file storage unit 15, and an investigation material storage unit 16.

[0012] The target application 11 is application software to be monitored. The execution environment 12 includes, in one example, a virtual machine (hereinafter referred to as a VM). For example, the VM is a JAVA (registered trademark) virtual machine. The execution environment 12 may convert programs such as the target application 11 and the monitoring program 14, which have a code system independent of HW (Hardware) and OS (Operating System), into a format specific to the execution environment during execution.

[0013] The interface 13 is a software interface that exchanges data between the execution environment 12 and the OS on the one hand, and the monitoring program 14 on the other.

[0014] The monitoring program 14 acquires log information during execution of the target application 11. The log information may be a full thread dump or a stack trace of a specific thread. A thread is the smallest execution unit of a program in a processor. A process contains one or more threads.

[0015] A full thread dump is information (i.e., a file) that includes a list of multiple threads in a process and stack traces for all threads in the process. A process is a computer program that is running in memory.

[0016] A stack trace includes information about the contents of a stack when an error occurs in a computer program that is in an executing state. The invocation (i.e., call) and end of execution (i.e., return) of functions, methods, and subroutines (hereinafter referred to as functions, etc.) that make up a program are controlled in an area in memory called a stack (call stack). Every time a function, etc. is called within a function, information about the function, etc. that is in the middle of execution is added to the end of the stack. Therefore, by obtaining a stack trace, a user can analyze functions, etc. that are in the middle of execution in order, such as the function, etc. that was being executed when the error occurred, the function, etc. that called the function, etc., and the function, etc. that further called the caller.

[0017] To analyze the cause of an error, it is desirable to obtain a full thread dump at the time the error occurs or immediately after it occurs. When full thread dumps are obtained periodically, if the sampling interval is 10 minutes, and a phenomenon that ends in 1 minute is causing the abnormality, there is a high possibility that log information at the time the phenomenon occurs cannot be obtained. To avoid this, it is possible to shorten the sampling interval. However, to obtain a full thread dump, a process is required to stop the thread that is executing the application, and as a result, application processing is delayed by the time of the stoppage. As such, obtaining a full thread dump itself can cause a decrease in the execution performance of the application, so it may be difficult to obtain full thread dumps frequently.

[0018] The management system 1 of this embodiment acquires a periodic full thread dump 17, a process-triggered full thread dump 18, and a thread-triggered stack trace 19 as log information.

[0019] The log information is stored in the investigation material storage unit 16. The investigation material storage unit 16 stores the log information acquired by the monitoring program 14. The investigation material storage unit 16 may be referred to as a log information storage unit. The console 2 accesses the investigation material storage unit 16. The console 2 analyzes the cause of the error based on the log information.

[0020] At least one of the periodic full thread dump 17, the process-triggered full thread dump 18, and the thread-triggered stack trace 19 (or the thread-triggered full thread dump) is an example of first log information, and the rest are examples of second log information.

[0021] The periodic full thread dump 17 is acquired periodically. The periodic full thread dump 17 includes stack traces for multiple threads included in a process. The process-triggered full thread dump 18 is a full thread dump triggered by high process CPU utilization. The thread-triggered stack trace 19 is a stack trace triggered by high thread CPU utilization. The high process CPU utilization may be a case where the processor utilization of a process is equal to or greater than a predetermined threshold, and preferably, a case where the processor utilization of a process is equal to or greater than a predetermined threshold for a predetermined period of time. The high thread CPU utilization may be a case where the processor utilization of a thread included in a process is equal to or greater than a predetermined threshold, and preferably, a case where the processor utilization of a thread is equal to or greater than a predetermined threshold for a predetermined period of time.

[0022] The process-triggered full thread dump 18 may include stack traces for multiple threads included in a process when the processor utilization rate of the process continues to be equal to or greater than a predetermined threshold for a predetermined period of time.

[0023] The thread trigger stack trace 19 is a stack trace for one thread when the processor usage rate of one thread included in a process continues to be equal to or higher than a predetermined threshold for a predetermined period of time.

[0024] Note that a full thread dump triggered by high thread CPU utilization (i.e., a thread-triggered full thread dump) may be acquired instead of the thread-triggered stack trace 19. A thread-triggered full thread dump includes stack traces for not only one thread but also multiple threads included in a process when the processor utilization of one thread included in a process continues to be equal to or higher than a predetermined threshold for a predetermined period of time.

[0025] In the management system 1 of this embodiment, when the acquisition time of these multiple log information (i.e., the first log information and the second log information) is within a predetermined time frame, the information processing device 10 is adjusted to acquire one of the multiple log information. This prevents the log information from being acquired in duplicate, and reduces the processor load when acquiring the log information.

[0026] The setting file stored in the setting file storage unit 15 includes information on the conditions for executing a process for acquiring log information. The conditions may include a first condition for acquiring first log information and a second condition for acquiring second log information. The setting file includes a threshold p1 for the processor usage rate of a process, a threshold t3 for the duration of a high processor load in the process, a threshold p2 for the processor usage rate of a thread, and a threshold t5 for the duration of a high processor load in the thread.

[0027] In the management system 1 in FIG. 1, the target application 11 and the monitoring program 14 are provided in one information processing device 10, but the management system 1 is not limited to this case.

[0028] Fig. 2 is a diagram showing another example of the management system 1 according to an embodiment. In Fig. 2, a target device 3 in which a target application 11 and an execution environment 12 are provided and an information processing device 10a in which a monitoring program 14 and a setting file storage unit 15 are provided are configured as separate devices. In addition, the investigation material storage unit 16 may be provided as an external database such as an external storage device. Hereinafter, the information processing device 10 and the information processing device 10a are collectively referred to as the information processing device 10.

[0029] [B] Hardware configuration example As described above, the functions of the information processing device 10 according to an embodiment may be realized by one computer or two or more computers. Furthermore, at least a part of the functions of the information processing device 10 may be realized using HW resources and NW (Network) resources provided by a cloud environment.

[0030] 3 is a block diagram showing an example of a HW configuration of a computer that realizes the functions of the information processing device 10 according to an embodiment. When multiple computers are used as HW resources that realize the functions of the information processing device 10, each computer may have the HW configuration shown in FIG.

[0031] As shown in FIG. 3, the information processing device 10 may include, as its HW configuration, a processor 100a, a memory 100b, a storage unit 100c, an IF (Interface) unit 100d, an IO (Input / Output) unit 100e, and a reading unit 100f, for example.

[0032] The processor 100a is an example of a processing device that performs various controls and calculations. The processor 100a may be connected to each block in the information processing device 10 via a system bus 100i so that they can communicate with each other. The processor 100a may be a multiprocessor including a plurality of processors, a multicore processor having a plurality of processor cores, or a configuration having a plurality of multicore processors.

[0033] Examples of the processor 100a include integrated circuits (ICs) such as a CPU, MPU, GPU, APU, DSP, ASIC, and FPGA. Note that a combination of two or more of these integrated circuits may be used as the processor 100a. CPU is an abbreviation for Central Processing Unit, and MPU is an abbreviation for Micro Processing Unit. GPU is an abbreviation for Graphics Processing Unit, and APU is an abbreviation for Accelerated Processing Unit. DSP is an abbreviation for Digital Signal Processor, ASIC is an abbreviation for Application Specific IC, and FPGA is an abbreviation for Field-Programmable Gate Array.

[0034] The memory 100b is an example of HW that stores various types of data, programs, and other information. The memory 100b may be, for example, one or both of a volatile memory such as a dynamic random access memory (DRAM) and a non-volatile memory such as a persistent memory (PM).

[0035] The storage unit 100c is an example of HW that stores various data, programs, and other information. Examples of the storage unit 100c include various storage devices such as a magnetic disk device such as a hard disk drive (HDD), a semiconductor drive device such as a solid state drive (SSD), and a nonvolatile memory. Examples of the nonvolatile memory include a flash memory, a storage class memory (SCM), and a read only memory (ROM).

[0036] The storage unit 100c may store a program 100g (log information acquisition program) that realizes all or part of various functions of the information processing device 10. The program 100g may include an execution environment 12, an OS, and the like in addition to the log information acquisition program.

[0037] For example, the processor 100a can implement the function of a control unit (a control unit 110 in FIG. 11 described later) of the information processing device 10 by loading a program 100g stored in the storage unit 100c into the memory 100b and executing it.

[0038] As described above, the information processing device 10a to be monitored may execute the log information acquisition method as a computer and perform each process of acquiring log information.

[0039] The IF unit 100d is an example of a communication IF that controls connections and communications between various networks including a network between the information processing device 10 and other devices.

[0040] For example, the IF unit 100d may include an adapter that complies with a LAN (Local Area Network) such as Ethernet (registered trademark) or optical communication such as FC (Fibre Channel). The adapter may support one or both of wireless and wired communication methods.

[0041] The program 100g may be downloaded to the information processing device 10 from a network via the communication IF and stored in the storage unit 100c.

[0042] The IO unit 100e may include one or both of an input device and an output device. Examples of the input device include a keyboard, a mouse, and a touch panel. Examples of the output device include a monitor, a projector, and a printer. The IO unit 100e may also include a touch panel in which the input device and the output device are integrated.

[0043] The reading unit 100f is an example of a reader that reads out data or program information recorded on the recording medium 100h. The reading unit 100f may include a connection terminal or device to which the recording medium 100h can be connected or inserted. Examples of the reading unit 100f include an adapter that complies with USB (Universal Serial Bus) or the like, a drive device that accesses a recording disk, and a card reader that accesses a flash memory such as an SD card. Note that the recording medium 100h may store a program 100g, and the reading unit 100f may read the program 100g from the recording medium 100h and store it in the storage unit 100c.

[0044] Examples of the recording medium 100h include non-transitory computer-readable recording media such as magnetic / optical disks and flash memories. Examples of the magnetic / optical disks include flexible disks, CDs (Compact Discs), DVDs (Digital Versatile Discs), Blu-ray Discs, and HVDs (Holographic Versatile Discs). Examples of the flash memory include semiconductor memories such as USB memories and SD cards.

[0045] The above-described HW configuration of the information processing device 10 is an example. Therefore, the HW in the information processing device 10 may be increased or decreased (for example, adding or deleting any block), divided, integrated in any combination, or the bus may be added or deleted as appropriate.

[0046] [C] Explanation of how to obtain log information FIG. 4 is a diagram showing a first example of acquisition of log information in the information processing device 10 according to an embodiment.

[0047] The processor 100a acquires a periodic full thread dump 17 at a time interval of a sampling interval (sampling cycle) t1. In FIG. 4, the acquisition times of the periodic full thread dump 17 are shown as fc1, fc2, fc3, fc4, . . . The sampling interval t1 is the time interval between adjacent acquisition times fci and fci+1 (where i is a natural number equal to or greater than 1). The periodic full thread dump 17 is an example of first log information about a plurality of threads included in a process during program execution, acquired based on a first condition. The arrival of a periodic acquisition time is an example of a first condition. The sampling interval t1 is an example of a periodic first sampling interval at which the first log information is acquired.

[0048] The processor 100a periodically acquires the CPU utilization of a process at a time interval of sampling interval t2. t2 is called the process CPU utilization sampling interval. The CPU utilization of a process is an example of the processor utilization of a process. The processor utilization of a process means the proportion of time during which the processor is processing a process in an execution state within a unit time. The acquisition times of the CPU utilization of a process are indicated as cp1, cp2,..., cp6,...cp16, cp17, cp18, cp19, cp20, and cp21.

[0049] The processor 100a determines whether the CPU utilization rate of the process has become higher than a threshold p1. The processor 100a may determine whether the time during which the CPU utilization rate of the process is equal to or higher than the threshold p1 (sometimes referred to as a process CPU high load duration) continues for a predetermined period t3 or more. The period t3 may be referred to as a process CPU high load duration threshold. The threshold p1 may be referred to as a process CPU high load threshold.

[0050] The processor 100a acquires a process-triggered full thread dump 18 at acquisition times fp1, fp2, and fp3 when the process CPU high load duration is equal to or greater than a process CPU high load duration threshold t3. The process-triggered full thread dump 18 is an example of second log information about at least one thread included in a process during program execution, which is acquired based on a second condition different from the first condition. The process CPU high load duration being equal to or greater than the process CPU high load duration threshold t3 is an example of the second condition.

[0051] The processor 100a may acquire the process-triggered full thread dump 18 multiple times at a second sampling interval t4 that is shorter than the sampling interval t1. In the example shown in FIG. 4, when the process CPU high load duration period becomes equal to or longer than t3, the process CPU high load duration period is reset once. Then, the process-triggered full thread dump 18 is acquired multiple times. After the reset, when the process CPU high load duration period becomes equal to or longer than t3, the process-triggered full thread dump 18 is acquired multiple times again. In the example of FIG. 4, every time the process CPU high load duration period becomes equal to or longer than t3, a full thread dump associated with the high CPU load duration is acquired three times at the second sampling interval t4.

[0052] In the example shown in FIG. 4, at the acquisition time cp6 of the CPU utilization rate, the CPU utilization rate becomes higher than the threshold p1, but the process CPU high load duration does not become equal to or greater than the process CPU high load duration threshold t3. Therefore, the processor 100a does not need to acquire the process triggered full thread dump 18 at the acquisition time cp6. At the acquisition times cp16 to cp19 of the CPU utilization rate, the process CPU high load duration becomes equal to or greater than the process CPU high load duration threshold t3. Therefore, the process triggered full thread dump 18 is acquired three times at the second sampling interval t4. In this way, since it is possible to determine an abnormality at the timing when the CPU utilization rate continues to be higher than the threshold p1, it is possible to suppress false positive detection. However, depending on the specifications, when the CPU utilization rate of the process becomes higher than the threshold p1, the processor 100a may acquire the process triggered full thread dump 18 regardless of the duration. In this case, the fact that the CPU utilization rate of the process becomes higher than the threshold p1 is an example of the second condition.

[0053] When the acquisition time fc of the periodic full thread dump and the acquisition time fp of the full thread dump triggered by the continuation of the process CPU high load are within a predetermined time frame, the processor 100a acquires either one of the full thread dumps. In one example, when the acquisition time fc and the acquisition time fp are within a predetermined time frame, the processor 100a may acquire the periodic full thread dump 17 at the acquisition time fc with priority. For example, when the acquisition time fc of the periodic full thread dump 17 is within a time interval t4 (3 seconds in one example) between fp1 and fp2, the processor 100a may omit the acquisition at fp2. When the acquisition time fc of the periodic full thread dump 17 is within a time interval t4 between fp2 and fp3, the processor 100a may omit the acquisition at fp3.

[0054] This embodiment is not limited to the case shown in Fig. 4, and may be one in which either the acquisition time fc of the periodic full thread dump 17 or the acquisition time fp of the full thread dump triggered by the continuation of a high process CPU load is acquired if the time falls within a predetermined time frame. In Fig. 4, the process of acquiring either the full thread dump is an example of a process of acquiring one of the first log information and the second log information if the respective acquisition times of the first log information and the second log information fall within a predetermined time frame.

[0055] 4, when the acquisition time fc of the periodic full thread dump 17 and the acquisition time fp of the process-triggered full thread dump 18 are within a predetermined time frame, one full thread dump is acquired and the other full thread dump is suppressed. However, the information processing device 10 according to the present embodiment is not limited to this case.

[0056] Fig. 5 is a diagram showing a second example of acquisition of log information in the information processing device 10 according to an embodiment. The processes of acquiring the periodic full thread dump 17 and the process-triggered full thread dump 18 are similar to those shown in Fig. 4. Therefore, repeated explanation will be omitted.

[0057] The processor 100a periodically acquires the processor utilization rate of each thread included in a process at a time interval of a predetermined sampling interval. The processor utilization rate of a thread means the proportion of time during which one thread of a process in an execution state is processing during a unit time. The sampling interval of the processor utilization rate of a thread may be the same as the sampling interval t2 of the processor utilization rate of a process. In an embodiment, the sampling interval (not shown) of the CPU utilization rate of a thread is referred to as the thread CPU utilization rate sampling interval.

[0058] The processor 100a determines whether the CPU utilization rate of each thread has become higher than a threshold p2. The processor 100a may determine whether the time during which the CPU utilization rate of each thread is equal to or higher than the threshold p2 (sometimes referred to as a thread CPU high load duration) continues for a predetermined period t5 or longer. The threshold p2 may be referred to as a thread CPU high load threshold, and the period t5 may be referred to as a thread CPU high load duration threshold.

[0059] When the thread CPU high load duration of a certain thread is equal to or greater than the thread CPU high load duration threshold t5, the processor 100a acquires a thread trigger stack trace 19 for the thread. The thread trigger stack trace 19 is an example of second log information for at least one thread included in a process during program execution, which is acquired based on a second condition different from the first condition. The thread CPU high load duration being equal to or greater than the thread CPU high load duration threshold t5 is an example of the second condition.

[0060] The processor 100a may acquire the thread-triggered stack trace 19 multiple times at a third sampling interval t6 that is shorter than the sampling interval t1.

[0061] In Fig. 5, when the thread CPU high load duration for thread #A becomes equal to or greater than the thread CPU high load duration threshold t5, the thread CPU high load duration for thread #A is reset. Then, the thread trigger stack trace 19 for thread #A is acquired multiple times. In the case of Fig. 5, the thread trigger stack trace 19 for thread #A is acquired a total of three times when fsa1, fsa2, and fsa3 are acquired.

[0062] In Fig. 5, when the thread CPU high load duration for thread #B becomes equal to or greater than the thread CPU high load duration threshold t5, the thread CPU high load duration for thread #B is reset once. Then, the thread trigger stack trace 19 for thread #B is acquired multiple times. In the case of Fig. 5, the thread trigger stack trace 19 for thread #B is acquired a total of three times at acquisition times fsb1, fsb2, and fsb3. After the reset, when the thread CPU high load duration further becomes equal to or greater than t5, the thread trigger stack trace 19 for thread #B is acquired again at acquisition times fsb4, fsb5, and fsb6.

[0063] 5 illustrates a case where a stack trace is acquired for thread #A when the thread CPU high load duration for thread #A becomes equal to or exceeds a thread CPU high load duration threshold t5. However, the present embodiment is not limited to this case.

[0064] In one example, when the thread CPU high load duration for thread #A becomes equal to or greater than the thread CPU high load duration threshold t5, stack traces for not only thread #A but all threads, that is, thread-triggered full thread dumps, may be acquired.

[0065] For example, when a CPU abnormality is detected in a thread, the user may be able to set, depending on the target application 11, a mode in which only the stack trace of the thread in which the abnormality was detected is acquired, or a mode in which a full thread dump is acquired.

[0066] In the example shown in FIG. 5 as well, it is possible to determine that an abnormality exists when the thread CPU utilization rate continues to be higher than the threshold p2, making it possible to suppress false positive detection.

[0067] The processor 100a may suppress acquisition of at least one of the periodic full thread dump 17, the process-triggered full thread dump 18, the thread-triggered stack trace 19, etc., when the acquisition timing of each of them is within a predetermined time frame. At least one of these log information is an example of the first log information, and the rest are examples of the second log information. The processor 100a acquires one of the first log information and the second log information when the acquisition timing of each of the first log information and the second log information is within a predetermined time frame.

[0068] The threshold p2 may be set according to the number of cores.

[0069] Fig. 6 is a diagram showing an example of CPU usage in a process and CPU usage in each thread. In Fig. 6, the number of cores that the process can use is two, and the upper limit of thread CPU usage for each of threads #A, #B, #C, and #D is calculated as 100 / number of cores (%). In Fig. 6, the upper limit of thread CPU usage is 50 (=100 / 2)%. The number of cores is the number of independently available processor cores built into the computer's processor.

[0070] The threshold p2 may be set to be equal to or lower than the upper limit of the thread CPU usage rate. In one example, the threshold p2 may be equal to or higher than 0.7 and equal to or lower than 0.9, and may be set based on a user's instruction. The threshold p2 may be stored in the setting file storage unit 15.

[0071] As shown in Figure 5, by performing both processes of acquiring log information when the condition that the process CPU usage rate is equal to or greater than a threshold p1 is satisfied, and acquiring log information when the condition that the thread CPU usage rate is equal to or greater than a threshold p2 is satisfied, different types of anomalies can be handled.

[0072] 7 is a diagram showing an example of the CPU usage rate in a process and the CPU usage rate in each thread. In the example shown in Fig. 7, the process CPU usage rate and the thread CPU usage rate are shown when the number of cores is two and the process includes threads #A, #B, #C, and #D.

[0073] In Fig. 7, a state in which the thread CPU utilization of threads #A and #B is equal to or greater than the threshold p2 and a state in which the thread CPU utilization of threads #C and #D is equal to or greater than the threshold p2 are switched between in periods tv1, tv2, tv3, .... In each of the periods tv1, tv2, tv3, the thread CPU utilization of a specific thread is equal to or greater than the threshold p2. However, since each of the periods tv1, tv2, tv3, ... is shorter than the thread CPU high load duration threshold t5 described in Fig. 5, log information triggered by high thread CPU utilization may not be acquired.

[0074] On the other hand, the process CPU utilization rate is equal to or higher than the threshold value p1 for a period equal to or higher than the process CPU high load duration threshold value t3 (FIG. 5). Therefore, the process CPU utilization rate is used as a trigger to acquire log information.

[0075] FIG. 7 shows cases in which the thread CPU utilization rate for two threads (e.g., thread #A and thread #B) is greater than or equal to p2 in each period tv1, tv2, and tv3, but the number of threads whose CPU utilization rate is greater than or equal to p2 in each period is not limited to this case.

[0076] As shown in FIG. 7, even if the process CPU utilization rate rises above the threshold p1, but it is not determined that the thread CPU utilization rate of each thread has risen above p2, according to the embodiment of FIG. 5, the processor 100a can detect the abnormality and acquire log information.

[0077] 8 is a diagram showing another example of the CPU utilization rate in a process and the CPU utilization rate in each thread. The example shown in Fig. 8 is also similar to Figs. 6 and 7 in terms of the number of cores and threads.

[0078] 8, thread #A is equal to or exceeds the thread CPU utilization threshold p2, and is close to the upper limit of the thread CPU utilization. However, since the thread CPU utilization of threads #B, #C, and #D is almost 0, the process CPU utilization equivalent to the sum of the thread CPU utilization of threads #A to #D is lower than the process CPU utilization threshold p1, and remains at about 50%.

[0079] As shown in Fig. 8, when the process CPU utilization is below the threshold p1, but the thread CPU utilization of a specific thread (thread #A in Fig. 8) is equal to or greater than p2, the specific thread occupies one core for a long time. In reality, even if the overall CPU utilization of the two cores, i.e., the process CPU utilization, is below the threshold p1, one thread #A is consuming the maximum available CPU time, as shown in Fig. 8. In such a state, some kind of abnormality may have occurred, which may lead to performance degradation and slow response of the target application 11.

[0080] 8, there may be cases where the thread CPU utilization rate of a particular thread rises above p2, but the process CPU utilization rate does not rise above the threshold p1. According to the information processing device 10 of this embodiment, the processor 100a can detect an abnormality based on the thread CPU utilization rate and acquire log information.

[0081] FIG. 9 is a diagram showing a first example of adjusting the timing of acquiring log information in the information processing device 10 according to an embodiment.

[0082] 9, the acquisition time fc-i of the periodic full thread dump 17, the acquisition time fp-j of the process-triggered full thread dump 18, and the acquisition time fsa-k of the thread-triggered stack trace 19 are all within a predetermined time frame t7. Note that i, k, and j are any integers. In this case, the processor 100a acquires the periodic full thread dump 17. On the other hand, the processor 100a omits (i.e., suppresses) the acquisition of the process-triggered full thread dump 18 and the acquisition of the thread-triggered stack trace 19.

[0083] Furthermore, the acquisition time fp-l of the process-triggered full thread dump 18, the acquisition time fsa-m of the thread-triggered stack trace 19 of thread #A, and the acquisition time fsb-n of the thread-triggered stack trace 19 of thread #B are within a predetermined time frame t7. Note that l, m, and n are any integers. In this case, the processor 100a acquires the process-triggered full thread dump 18. On the other hand, the processor 100a omits acquisition of the thread-triggered stack traces 19 for each of thread #A and thread #B.

[0084] When multiple pieces of log information exist within a given time frame, the processor 100a may give the periodic full thread dump 17 a first priority, the process-triggered full thread dump 18 a second priority, and the thread-triggered stack trace 19 a third priority. This allows the periodically acquired log information to be acquired at regular intervals without missing any pieces. However, the priority order is not limited to the case shown in FIG. 9. The processor 100a may acquire the process-triggered full thread dump 18 with priority over the periodic full thread dump 17.

[0085] Fig. 10 is a diagram showing a second example of adjusting the timing of acquiring log information in the information processing device 10 according to an embodiment. In Fig. 10, the processor 100a acquires a thread-triggered full thread dump when the thread CPU usage rate of thread #A or thread #B is high.

[0086] 10, the acquisition time fc-i of the periodic full thread dump 17, the acquisition time fp-j of the process-triggered full thread dump 18, and the acquisition time fa-k of the thread-triggered full thread dump are all within a predetermined time frame t7. In this case, the processor 100a acquires the periodic full thread dump 17. On the other hand, the processor 100a omits acquisition of the process-triggered full thread dump 18 and the thread-triggered full thread dump.

[0087] Also, the acquisition time fa-o of the full thread dump triggered by thread #A and the full thread dump fb-p triggered by thread #B exist within a predetermined time frame t8. In this case, one of them (for example, the full thread dump triggered by thread #A) is acquired, and the acquisition of the other is suppressed. The acquisition time fa-q of the full thread dump triggered by thread #A and the full thread dump fb-r triggered by thread #B exist within a predetermined time frame t8. In this case, too, one of them (for example, the full thread dump triggered by thread #A) is acquired, and the acquisition of the other is suppressed. In this case, the full thread dump triggered by thread #A is an example of the first log, and the full thread dump triggered by thread #B is an example of the second log. Note that o, p, q, and r are natural numbers.

[0088] Furthermore, the time fp-s when the process-triggered full thread dump 18 is acquired, the time fa-t when the thread #A-triggered full thread dump is acquired, and the full thread dump fb-u when the thread #B-triggered full thread dump is acquired are within a predetermined time frame t9. In this case, the processor 100a acquires the process-triggered full thread dump 18. On the other hand, the processor 100a omits acquisition of each full thread dump triggered by the CPU utilization rate of each of threads #A and #B. Note that s, t, and u are natural numbers.

[0089] The processor 100a may give a first priority to the periodic full thread dump 17, a second priority to the process-triggered full thread dump 18, a third priority to the thread-triggered full thread dump triggered by thread #A, and a fourth priority to the full thread dump triggered by thread #B. However, the priority order is not limited to the case shown in FIG.

[0090] [D] Functional configuration example 11 is a block diagram showing an example of a functional configuration of an information processing device 10 according to an embodiment. The information processing device 10 is a computer.

[0091] 11, the information processing device 10 has a control unit 110 and a memory unit 200. The control unit 110 has a timing unit 111, a periodic full thread dump acquisition unit 112, and a process CPU usage rate acquisition unit 113. The control unit 110 includes a first time determination unit 114, a full thread dump acquisition unit 115, a thread CPU usage rate acquisition unit 116, a second time determination unit 117, a stack trace acquisition unit 118, and an adjustment unit 119.

[0092] The memory unit 200 is an example of a storage area, and stores various data used by the control unit 110. The memory unit 200 may be realized, for example, by a storage area included in one or both of the memory 100b and the storage unit 100c shown in FIG.

[0093] As shown in FIG. 11, the memory unit 200 can store, for example, a user setting variable 210, a CPU state record variable 220, a log information record variable 230, CPU utilization rate data 240, and log information 250.

[0094] Fig. 12 is an example of a data flow diagram in an information processing device 10 according to an embodiment. In the example shown in Fig. 12, a process memory 1020 provided by a memory 100b stores an execution environment 12 (in one example, a Java (registered trademark) VM). A part of the execution environment 12 functions as a control unit 110 by the processor 100a. The control unit 110 is an example of a CPU utilization sampling and analysis means.

[0095] The control unit 110 inputs and outputs a user setting variable 210, a CPU state recording variable 220, and a log information recording variable 230. The control unit 110 acquires from the OS 20 the process CPU usage time, the thread CPU usage time, and the like.

[0096] The user setting variables 210 may be stored in the process memory 1020 based on a setting file stored in the setting file storage unit 15. The user setting file may be set and input by a user using the console 2 or the like.

[0097] The control unit 110 acquires analysis data 260. The analysis data 260 includes CPU utilization data 240 and log information 250. The analysis data 260 is material for investigating the presence or absence of an error in the target application 11. The control unit 110 outputs the analysis data 260 to the investigation material storage unit 16. A user may access the investigation material storage unit 16 through the console 2. The console 2 functions as an analysis data visualization unit (visualization tool) that visualizes the analysis data 260 and analyzes the presence or absence of an error in the target application 11 and the content of the error.

[0098] Next, the variables and data shown in FIG. 11 and FIG. 12 will be explained.

[0099] Fig. 13 is a diagram showing an example of the user setting variable 210. The user setting variable 210 includes each sampling interval and each threshold value described in Fig. 4 and Fig. 5. Note that each sampling interval and each threshold value are not limited to those shown in Fig. 13. The user setting variable 210 may include information about a stack trace acquisition mode. The stack trace acquisition mode is information indicating whether to acquire a stack trace for a thread or acquire a full thread dump when a state in which a thread CPU usage rate is higher than a threshold value p2 continues for t5 or more.

[0100] 14 is a diagram showing an example of the CPU state record variable 220. The CPU state record variable 220 may include the start time at which the process CPU utilization rate became equal to or greater than the threshold p1 and the duration during which the state at or above the threshold p1 continues. The start time at which the process CPU utilization rate became equal to or greater than the threshold p1 may be abbreviated as the process CPU high load start time. The duration during which the state at or above the threshold p1 continues may be abbreviated as the process CPU high load duration.

[0101] Furthermore, the CPU state record variable 220 may include, for the first to nth threads (n is a natural number), the start time at which the thread CPU utilization rate became equal to or greater than the threshold p2 and the duration during which the state at or above the threshold p2 continues. The first to nth threads are indicated by [1] to [n] in FIG. 14, and in one example, are the above-mentioned threads #A to #D. The start time at which the thread CPU utilization rate became equal to or greater than the threshold p2 may be abbreviated as the thread CPU high load start time. The duration during which the thread CPU utilization rate continues to be equal to or greater than the threshold p2 may be abbreviated as the thread CPU high load duration.

[0102] 15 is a diagram showing an example of the log information recording variable 230. The log information recording variable 230 is a variable related to the process-triggered full thread dump 18 and the thread-triggered stack trace 19 (or the thread-triggered full thread dump).

[0103] The log information recording variable 230 may include the remaining number of times to acquire a full thread dump and the time (acquisition time) when the full thread dump was last acquired, as well as the remaining number of times to acquire each stack trace and the time (acquisition time) when each stack trace was last acquired.

[0104] If the time during which the process CPU usage rate remains at or above threshold p1 is equal to or longer than time t3, a process-triggered full thread dump 18 is taken multiple times (e.g., three times). The remaining number of full thread dumps taken is the number remaining out of the multiple times. The last full thread dump taken time may be the date and time of the process-triggered full thread dump 18 last taken at that time. The remaining number of full thread dumps taken may be referred to as the remaining number of full thread dump outputs. The last full thread dump taken time may be referred to as the last full thread dump output time.

[0105] On the other hand, when the time during which the thread CPU usage rate of each thread continues to be equal to or greater than the threshold p2 is equal to or greater than time t5, each thread-triggered stack trace 19 for that thread is acquired multiple times (e.g., three times). In FIG. 15, each thread-triggered stack trace 19 is indicated by [1] to [n] (n is a natural number equal to or greater than 2). The remaining number of stack trace acquisitions is the number of times remaining out of the multiple times for each thread. The final stack trace acquisition time may be the acquisition date and time of the thread-triggered stack trace 19 for each thread that was finally acquired at that time. The remaining number of thread-triggered stack trace acquisitions may be referred to as the remaining number of thread-triggered stack trace outputs. The final thread-triggered stack trace acquisition time may be referred to as the final thread-triggered stack trace output time.

[0106] FIG. 16 is a diagram showing an example of CPU utilization data 240. The CPU utilization data 240 includes a process CPU utilization and a thread CPU utilization of each thread [1] to [n]. The upper limit of the process CPU utilization is 100(%). The upper limit of the thread CPU utilization of each thread [1] to [n] is 100 / number of cores (%). For a target process, the process CPU utilization, the identifier of the target process, and the process name are stored in association with each other. Similarly, for each thread [1] to [n], the thread CPU utilization, the identifier of the target thread, and the thread name are stored in association with each other.

[0107] 17 is a diagram showing an example of the log information 250. The log information 250 is information in which a thread identifier is associated with a stack trace for a thread identified by the thread identifier.

[0108] For example, the log information 250 includes, as a stack trace for thread [1] (thread name: thread A) identified by the thread identifier "28980" shown in Fig. 16, information such as that method A03 was called in line #354 of source A. By acquiring a stack trace, the user can trace back in order the functions being executed, such as the function being executed when the error occurred, the function that called that function, and the function that further called the caller, and analyze the functions being executed.

[0109] Among the log information 250, full thread dumps such as the periodic full thread dump 17, the process-triggered full thread dump 18, and the thread-triggered full thread dump include stack traces such as those shown in Fig. 17 for all threads included in a process. The thread-triggered stack trace 19 includes a stack trace such as that shown in Fig. 17 for a specific thread.

[0110] 11, the timing unit 111 times the time when the periodic full thread dump 17 is to be acquired, etc. The timing unit 111 functions as an information acquisition unit that acquires information for determining whether the first condition, that is, the time when the periodic full thread dump 17 is to be acquired, is fulfilled.

[0111] The periodic full thread dump acquisition unit 112 acquires a periodic full thread dump 17 at a time interval of a sampling interval t1.

[0112] The process CPU utilization rate acquisition unit 113 periodically acquires the process CPU utilization rate at a time interval of a sampling interval t2. The process CPU utilization rate is an example of a processor utilization rate of a process.

[0113] The first time determination unit 114 determines whether the CPU utilization rate of the process is equal to or greater than a threshold p1, and measures the duration of the state in which the CPU utilization rate of the process is equal to or greater than the threshold p1 (that is, the duration of the process high CPU load).

[0114] The full thread dump acquisition unit 115 acquires a process-triggered full thread dump 18 when the process CPU high load duration is equal to or greater than a process CPU high load duration threshold t3.

[0115] The thread CPU utilization rate acquisition unit 116 periodically acquires the thread CPU utilization rate of each thread at a predetermined sampling interval. The thread CPU utilization rate is an example of the processor utilization rate of a thread.

[0116] The second time determination unit 117 determines whether or not each thread CPU utilization rate is equal to or higher than a threshold p2, and measures the duration during which the thread CPU utilization rate is equal to or higher than the threshold p2 (that is, the duration during which the thread CPU is under high load).

[0117] When the thread CPU high load duration for each thread is equal to or greater than the thread CPU high load duration threshold t5, the stack trace acquisition unit 118 acquires a thread-triggered stack trace 19. When a full thread dump acquisition mode is set, the stack trace acquisition unit 118 may acquire a thread-triggered full thread dump instead of each thread-triggered stack trace 19.

[0118] The adjustment unit 119 adjusts which one to acquire when the acquisition timing of each of the periodic full thread dump 17, the process-triggered full thread dump 18, and the thread-triggered stack trace 19 (or the thread-triggered full thread dump) exists within a predetermined time frame. At least one of the periodic full thread dump 17, the process-triggered full thread dump 18, and the thread-triggered stack trace 19 (or the thread-triggered full thread dump) is an example of the first log information, and at least one of the remaining is an example of the second log information. Therefore, when the acquisition timing of each of the first log information and the second log information exists within a predetermined time frame, the adjustment unit 119 acquires one of the first log information and the second log information and suppresses the acquisition of the other.

[0119] Note that the log information 250 is not necessarily limited to two types, namely the first log information and the second log information. When the acquisition timing of the log information 250 n times, namely the first log information, the second log information, the third log information, ··· the nth log information, exists within a predetermined time frame, the adjustment unit 119 may adjust to acquire m times (m is a natural number of 1 or more where m < n). [E] Operation Example FIG. 18 is a flowchart showing an operation example of the information processing apparatus 10 according to an embodiment. The control unit 110 starts executing the target application 11 to be monitored (step S1). The control unit 110 reads the user setting file stored in the user setting file storage unit 15 (step S2) and stores it in the process memory 1020.

[0120] The timing unit 111 measures the elapsed time since the periodic full thread dump 17 was acquired. In one example, based on the result of the timing unit 111, the periodic full thread dump acquisition unit 112 determines whether the current state (hereinafter simply referred to as the state) satisfies the first condition that the periodic acquisition timing has arrived (step S3).

[0121] When the state satisfies the first condition (refer to the Yes route in step S3), the process proceeds to step S4.

[0122] In one example, the full thread dump acquisition unit 115 determines whether or not a second condition that the process CPU high load duration is equal to or greater than t3 is satisfied (step S4). In one example, the process CPU utilization rate acquisition unit 113 acquires the process CPU utilization rate. The first time determination unit 114 determines whether or not the process CPU utilization rate is equal to or greater than a threshold value p1, and measures the process CPU high load duration rate.

[0123] If the state satisfies the first condition (Yes route in step S3) and does not satisfy the second condition (see No route in step S4), the process proceeds to step S5. In step S5, the periodic full thread dump acquisition unit 112 acquires first log information. After step S5, the process proceeds to step S11. The first log information is, for example, the periodic full thread dump 17.

[0124] If the state does not satisfy the first condition (see the No route of step S3), the process proceeds to step S6. The process of step S6 is similar to the process of step S4.

[0125] If the current state does not satisfy the first condition (No route in step S3) and satisfies the second condition (see Yes route in step S6), the process proceeds to step S7. In step S7, the full thread dump acquisition unit 115 acquires second log information. After step S7, the process proceeds to step S11. The second log information is, for example, a process-triggered full thread dump 18.

[0126] If the state does not satisfy either the first condition or the second condition (see the No route from step S3 and the No route from step S6), the process proceeds to step S11.

[0127] If the state in the predetermined period satisfies the first condition (see the Yes route in step S3) and also satisfies the second condition (see the YES route in step S4), the adjustment unit 119 judges whether the acquisition time of the first log information and the second log information is within the time frame (step S8). If the acquisition time of the first log information and the second log information is not within a certain time frame (see the No route in step S8), the process proceeds to step S9. In step S9, the control unit 110 acquires both the first log information and the second log information. In one example, the periodic full thread dump acquisition unit 112 acquires a periodic full thread dump 17, and the full thread dump acquisition unit 115 acquires a process-triggered full thread dump 18.

[0128] When the acquisition times of the first log information and the second log information are within a certain time frame (see the Yes route of step S8), the process proceeds to step S10.

[0129] In step S10, the adjustment unit 119 performs control so as to acquire either the first log information or the second log information and suppress acquisition of the other. Then, for example, the periodic full thread dump acquisition unit 112 or the like acquires the first log information.

[0130] In step S11, the control unit 110 determines whether the target application 11 is running. If the target application 11 is running (see the Yes route of step S11), the process returns to step S3, and the control unit 110 repeats the processes of steps S3 to S10. On the other hand, if the target application 11 is not running (see the No route of step S11), the process of acquiring the log information 250 ends (step S12).

[0131] 18 has been described by taking as an example a case in which the first log information is the periodic full thread dump 17 and the second log information is the process-triggered full thread dump 18, but the process of acquiring log information is not limited to this case. Depending on the specifications, the first log information may be the process-triggered full thread dump 18 and the second log information may be the periodic full thread dump 17.

[0132] Furthermore, the first log information may be a periodic full thread dump 17, and the second log information may be a process-triggered full thread dump 18 and a thread-triggered stack trace 19 (or a thread-triggered full thread dump).

[0133] Fig. 19 is a diagram showing an example of a log information acquisition process by the information processing device 10 according to an embodiment. Fig. 20 is a diagram showing an example of a log information acquisition process subsequent to Fig. 19. Fig. 21 is a diagram showing an example of a log information acquisition process subsequent to Fig. 20. Figs. 19 to 21 show an example of steps S3 to S10 in Fig. 18.

[0134] 19, the control unit 110 initializes the CPU state record variable 220 (see FIG. 14) (step S101). The process CPU high load start time and the process CPU high load duration are recorded for each process. The thread CPU high load start time and the thread CPU high load duration are recorded for each thread. Each of these values ​​may be initialized to an initial value of 0.

[0135] The control unit 110 initializes the log information recording variable 230 (see FIG. 15) (step S102). The remaining number of times to take a full thread dump and the last time a full thread dump was taken are recorded for each process. The remaining number of times to take a stack trace and the last time a stack trace was taken are recorded for each thread. Each of these values ​​may be initialized to an initial value of 0.

[0136] The process CPU utilization rate acquisition unit 113 judges whether the process CPU utilization rate sampling interval (sampling interval) t2 has elapsed since the start or the previous CPU utilization rate acquisition (step S103). If the sampling interval t2 has not elapsed (see the No route in step S103), the process proceeds to the process of step S113 in FIG. 20 without going through the processes related to acquisition of the process-triggered full thread dump 18 in steps S104 to S112.

[0137] On the other hand, when the sampling interval t2 has elapsed (see the Yes route of step S103), the control unit 110 executes the processing related to acquisition of the process-triggered full thread dump 18 in steps S104 to S112.

[0138] The process CPU utilization rate acquisition unit 113 acquires the process CPU utilization rate (step S104).

[0139] The first time determination unit 114 determines whether the process CPU utilization rate is equal to or greater than the threshold p1 (step S105). If the process CPU utilization rate is less than the threshold p1 (see the No route in step S105), the process proceeds to step S106. The first time determination unit 114 sets the process CPU high load start time=0 and the process CPU high load duration=0.

[0140] If the process CPU utilization rate is equal to or greater than the threshold p1 (see the Yes route from step S105), the process proceeds to step S107.

[0141] In step S107, the first time judgment unit 114 judges whether the process CPU high load start time in the CPU state recording variable 220 is 0 (step S107). If the process CPU high load start time is 0 (see the Yes route of step S107), the process CPU high load start time is updated to the current time (step S108), and the process proceeds to the acquisition process of the thread-triggered log information 250 from step S113 onwards. If the process CPU high load start time is not 0 (see the No route of step S107), the measurement of the process CPU high load duration has already started. Therefore, the first time judgment unit 114 subtracts the process CPU high load start time from the current time to calculate the process CPU high load duration, which is the time between the current time and the process CPU high load start time (step S109). The process proceeds to step S110.

[0142] In step S110, the first time determination unit 114 determines whether the process CPU high load duration is equal to or greater than a process CPU high load duration threshold t3. If the process CPU high load duration is less than the process CPU high load duration threshold t3 (see the No route in step S110), the full thread dump acquisition unit 115 does not acquire a full thread dump, and the process proceeds to step S113 in FIG. 20. If the process CPU high load duration is equal to or greater than the process CPU high load duration threshold t3 (see the Yes route in step S110), the full thread dump acquisition unit 115 sets the remaining number of full thread dump acquisitions to a predetermined value (maximum value) (step S111). In the processes in FIGS. 19 to 21, the predetermined value is 3.

[0143] When the remaining number of full thread dump acquisitions is set to the maximum value, the first time judgment unit 114 resets these values ​​by setting the process CPU high load start time to 0 and the process CPU high load duration to 0 (step S112).

[0144] According to the processes in steps S103 to S112, the full thread dump acquisition unit 115 sets the remaining number of full thread dump acquisitions to a predetermined number (for example, 3 times) every time the process CPU high load duration reaches the process CPU high load duration threshold t3.

[0145] 20, the thread CPU utilization rate acquisition unit 116 determines whether the thread CPU utilization rate sampling interval (sampling interval) has elapsed since the start or the previous thread CPU utilization rate acquisition. If the sampling interval has not elapsed (see the No route in step S113), the process proceeds to step S126 without going through the processes related to acquisition of the thread trigger stack trace 19 and the like in steps S114 to S125.

[0146] On the other hand, when the sampling interval t2 has elapsed (see the Yes route of step S113), the control unit 110 executes the process of acquiring the thread-triggered stack trace 19 (or the thread-triggered full thread dump) in steps S114 to S125.

[0147] The thread CPU utilization rate acquisition unit 116 selects the first thread from the thread list (step S114), and acquires the thread CPU utilization rate of the selected thread (step S115).

[0148] The second time determination unit 117 determines whether the thread CPU utilization rate is equal to or greater than a threshold p2 (step S116). The threshold p2 may be a value obtained by dividing the process CPU high load threshold p1 by the number of cores (i.e., the number of CPUs). If the thread CPU utilization rate is less than the threshold p2 (see the No route in step S116), the process proceeds to step S117. The second time determination unit 117 sets the thread CPU high load start time for the thread=0 and the thread CPU high load duration=0. Then, the process proceeds to step S124.

[0149] If the thread CPU utilization rate is equal to or greater than the threshold p2 (see the Yes route from step S116), the process proceeds to step S118.

[0150] In step S118, the second time judgment unit 117 judges whether the thread CPU high load start time for the thread in the CPU state recording variable 220 is 0. If the thread CPU high load start time is 0 (see the Yes route of step S118), the thread CPU high load start time is updated to the current time (step S119), and the process proceeds to step S124. If the thread CPU high load start time is not 0 (see the No route of step S118), measurement of the thread CPU high load duration has already started for the thread. Therefore, the second time judgment unit 117 subtracts the thread CPU high load start time from the current time to calculate the thread CPU high load duration, which is the time between the current time and the thread CPU high load start time (step S120). The process proceeds to step S121.

[0151] In step S121, the second time determination unit 117 determines whether the thread CPU high load duration of the thread is equal to or greater than the thread CPU high load duration threshold t5. If the thread CPU high load duration is less than the thread CPU high load duration threshold t5 (see the No route in step S121), the stack trace acquisition unit 118 does not acquire a stack trace of the thread, and the process proceeds to step S124. On the other hand, if the thread CPU high load duration is equal to or greater than the thread CPU high load duration threshold t5 (see the Yes route in step S121), the process proceeds to step S122. In step S122, the stack trace acquisition unit 118 sets the remaining number of thread stack trace acquisitions to a predetermined value (maximum value). In the processes of Figs. 19 to 21, the predetermined value is 3. Note that, if the stack trace acquisition mode is a full thread dump, the remaining number of times to acquire a thread-triggered full thread dump is set to a predetermined value.

[0152] Next, the second time judgment unit 117 sets the thread CPU high load start time of the thread=0 and the thread CPU high load duration=0 (step S123). In other words, the second time judgment unit 117 resets these values. Then, the process proceeds to step S124.

[0153] In step S124, the thread CPU utilization rate acquisition unit 116 determines whether all threads included in the process have been selected. If there is an unselected thread (see the No route from step S124), the thread CPU utilization rate acquisition unit 116 selects the next thread from the thread list (step S125). Then, the process returns to step S115, and the processes of steps S115 to S125 are repeated for the selected thread. If all threads included in the process have been selected (see the Yes route from step S124), the process proceeds to step S126.

[0154] In step S126, the timing unit 111 determines whether a periodic full thread dump sampling interval (sampling interval) t1 has elapsed since the start of processing or the acquisition time fci of the previous periodic full thread dump 17.

[0155] If the sampling interval t1 has elapsed (see the Yes route from step S126), the process proceeds to step S127. On the other hand, if the sampling interval t1 has not elapsed (see the No route from step S126), the processes from step S127 to step S129 are not executed, and the process proceeds to step S130 in FIG.

[0156] In step S127, the periodic full thread dump acquisition unit 112 acquires the periodic full thread dump 17. Figures 19 to 21 show a case where the periodic full thread dump 17 is prioritized when multiple types of log information 250 are acquired at the same time.

[0157] In step S128, the control unit 110 decrements the remaining number of times a full thread dump can be taken for a process-triggered full thread dump. In this example, the control unit 110 subtracts 1 from the remaining number of times a full thread dump can be taken. Then, the last time a full thread dump was taken is set to the current time.

[0158] In one example, if the remaining number of full thread dumps to be taken is 3 (see step S111), it is assumed that one of the full thread dumps has been substituted with a periodic full thread dump 17, and the control unit 110 sets the remaining number of full thread dumps to be 2. Note that in this example, if the requirements for taking a process-triggered full thread dump 18 are not met and the remaining number of full thread dumps to be taken is 0, the remaining number of full thread dumps to be taken becomes a negative value. However, the processing of this embodiment is not limited to this case.

[0159] In step S129, if the stack trace acquisition mode is stack trace, the remaining number of stack trace acquisitions is decremented. In this example, the stack trace acquisition unit 118 subtracts 1 from the remaining number of stack trace acquisitions. Then, the stack trace acquisition unit 118 sets the last stack trace acquisition time to the current time.

[0160] In one example, if the remaining number of stack traces to be taken is 3 (see step S122), it is assumed that one of them has been substituted with a periodic full thread dump 17, and the remaining number of stack traces to be taken is set to 2. Note that in this example, if the requirements for taking a thread-triggered stack trace 19 are not met and the remaining number of full thread dumps to be taken is 0, the remaining number of full thread dumps to be taken becomes a negative value. However, the algorithm is not limited to this case.

[0161] The full thread dump acquisition unit 115 determines whether the remaining number of full thread acquisitions>0 and the time between the last full thread dump acquisition time and the current time is t4 (eg, 3 seconds) or more (step S130).

[0162] If the remaining number of full thread dumps to be taken is ≦0, or the time between the last full thread dump taken time and the current time is less than t4 (e.g., 3 seconds) (see the No route from step S130), the second sampling interval t4 has not elapsed, so processing proceeds to step S134.

[0163] If the remaining number of full thread dump acquisitions is >0 and the time between the last full thread dump acquisition time and the current time is t4 (e.g., 3 seconds) or more (see the Yes route in step S130), t4 has passed, so steps S131 to S133 are executed.

[0164] The full thread dump acquisition unit 115 acquires a process-triggered full thread dump 18 (step S131).

[0165] The full thread dump acquisition unit 115 decrements the remaining number of full thread dump acquisitions (step S132). In this example, the full thread dump acquisition unit 115 subtracts 1 from the remaining number of full thread dump acquisitions. Then, the full thread dump acquisition unit 115 sets the last full thread dump acquisition time to the current time.

[0166] In one example, if the remaining number of full thread dump acquisitions is 2, the full thread dump acquisition unit 115 considers one of the full thread dumps to have been acquired, and sets the remaining number of full thread dump acquisitions to 1. Then, the full thread dump acquisition unit 115 updates the last full thread dump acquisition time to the current time.

[0167] When the stack trace acquisition mode is stack trace, the stack trace acquisition unit 118 decrements the remaining number of stack trace acquisitions (step S133). In one example, the stack trace acquisition unit 118 subtracts 1 from the remaining number of stack trace acquisitions. Then, the stack trace acquisition unit 118 updates the last stack trace acquisition time to the current time.

[0168] If the remaining number of stack trace acquisitions is 3, it is assumed that one of the stack traces has been substituted with a process-triggered full thread dump 18, and the remaining number of stack trace acquisitions is set to 2. Note that in this example, if the requirements for acquiring a thread-triggered stack trace 19 are not met and the remaining number of stack trace acquisitions is 0, the remaining number of thread trace acquisitions becomes a negative value. However, the processing of this embodiment is not limited to this case.

[0169] If the stack trace acquisition mode is not stack trace (see the No route from step S134), the process proceeds to step S141. If the stack trace acquisition mode is stack trace (see the Yes route from step S134), the processes from step S135 to step S140 are executed.

[0170] The second time determination unit 117 selects the first thread from the thread list (step S135).

[0171] The stack trace acquisition unit 118 determines whether the remaining number of stack trace acquisitions>0 and the time between the last stack trace acquisition time for the selected thread and the current time is t6 (eg, 3 seconds) or more (step S136).

[0172] If the remaining number of stack trace acquisitions is ≦0, or the time between the last stack trace acquisition time for the selected thread and the current time is less than t6 (eg, 3 seconds) (No route from step S136), the process proceeds to step S139.

[0173] If the remaining number of stack trace acquisitions>0 and the time between the last stack trace acquisition time for the selected thread and the current time is t6 (eg, 3 seconds) or more (Yes route in step S136), the process proceeds to step S137.

[0174] The stack trace acquisition unit 118 acquires the thread trigger stack trace 19 (step S137).

[0175] The stack trace acquisition unit 118 decrements the remaining number of times to acquire a full thread dump (step S138). In this example, the stack trace acquisition unit 118 subtracts 1 from the remaining number of times to acquire a stack trace. Then, the stack trace acquisition unit 118 sets the last stack trace acquisition time to the current time.

[0176] In one example, if the remaining number of stack trace acquisitions is 2, the stack trace acquisition unit 118 determines that one of the stack traces has been acquired, and sets the remaining number of stack traces to 1. Then, the stack trace acquisition unit 118 updates the last stack trace acquisition time to the current time.

[0177] In step S139, the stack trace acquisition unit 118 determines whether or not all threads have been selected. If there are any threads that have not yet been selected (see the No route of step S139), the stack trace acquisition unit 118 selects the next thread (step S140). Thereafter, the processes of step S136 and thereafter are repeated for the selected thread. If the stack trace acquisition unit 118 has selected all threads (see the Yes route of step S139), the process proceeds to step S141.

[0178] In step S141, control unit 110 determines whether to end the acquisition process (sampling) of log information 250. If control unit 110 does not determine to end the acquisition process (see No route from step S141), the process returns to step S103 in Fig. 19. On the other hand, if control unit 110 determines to end the acquisition process (see Yes route from step S141), the process ends.

[0179] FIG. 22 is a diagram illustrating an example of a process of acquiring a CPU utilization rate by the information processing device 10 according to an embodiment.

[0180] The process CPU utilization rate acquisition unit 113 acquires utime and stime from a specific directory (step S21). The specific directory may be / proc / stat or the like, or may be / proc / stat / self. Utime is also called a utime value.

[0181] The utime value is the current value of the time that the process has been executing in user mode. The stime value is the current value of the time that the process has been executing in kernel mode.

[0182] The process CPU utilization rate acquisition unit 113 calculates the total CPU time from the start of the process (step S22). The total CPU time includes waiting time and the like.

[0183] The process CPU utilization rate acquisition unit 113 calculates the difference tdiff between the previous CPU total time total_old and the current CPU total time total (step S23). The difference tdiff is also called elapsed time.

[0184] The process CPU utilization rate obtaining unit 113 judges whether the difference tdiff>0 (step S24). If the difference tdiff≦0 (see the No route of step S24), the process CPU utilization rate obtaining unit 113 executes steps S25 and S26.

[0185] In step S25, the process CPU utilization rate acquisition unit 113 updates utime_old using the current utime. Similarly, the process CPU utilization rate acquisition unit 113 updates stime_old using the current stime. Also, the process CPU utilization rate acquisition unit 113 updates total_old using the current CPU total time total.

[0186] In step S26, the process CPU utilization rate acquisition unit 113 calculates the CPU utilization rate of the process as zero.

[0187] If the difference tdiff>0 (see the Yes route of step S24), the process CPU utilization rate acquisition unit 113 executes the processes of steps S27 to S30.

[0188] In step S27, the process CPU utilization rate acquisition unit 113 calculates udiff (=utime-utime_old) by subtracting the previous utime_old from the current utime. Similarly, the process CPU utilization rate acquisition unit 113 calculates sdiff (=stime-stime_old) by subtracting the previous stime_old from the current stime. Furthermore, the process CPU utilization rate acquisition unit 113 updates utime_old, stime_old, and total_old using the current utime, stime, and CPU total time total, similar to the processing in step S25.

[0189] The process CPU utilization rate acquisition unit 113 judges whether tdiff≧udiff+sdiff (step S28). When the total CPU time (i.e., difference) tdiff from the previous time to the current time is less than udiff+sdiff (see the No route in step S28), the process CPU utilization rate acquisition unit 113 may correct it so that tdiff=udiiff+sdiff (step S29). Following step S29, the process proceeds to step S30. This prevents the process CPU utilization rate from becoming greater than 100%.

[0190] If tdiff≧udiff+sdiff (see the Yes route from step S28), the process proceeds to step S30.

[0191] In step S30, the process CPU utilization rate acquisition unit 113 divides udiff+sdiff by tdiff to calculate the ratio of udiff and sdiff in tdiff (elapsed time) as the CPU utilization rate (%). Then, the process ends.

[0192] [F] Effects of one embodiment According to a technique according to an embodiment, an information processing device 10 acquires a full thread dump for a plurality of threads included in a process during program execution based on a first condition. The information processing device 10 acquires a full thread dump or a stack trace for at least one thread included in a process during program execution based on a second condition different from the first condition. If the acquisition times of the full thread dumps or the acquisition times of the full thread dump and the stack trace are within a predetermined time frame, the information processing device 10 acquires one of them.

[0193] This reduces the processor load for acquiring the log information 250. When the overall processor usage rate and the processor usage rate for multiple threads are both high, it is possible to suppress delays in the application processing speed caused by excessive information acquisition processing. In particular, when there are a large number of threads, the effect of reducing the processor load is significant.

[0194] The information processing device 10 acquires a periodic full thread dump 17 for multiple threads included in the process that is acquired periodically. The information processing device 10 acquires a process-triggered full thread dump 18 for multiple threads included in the process when a state in which the processor usage rate of the process is equal to or higher than a predetermined threshold continues for a predetermined period of time.

[0195] This combines a technique for not only periodically acquiring full thread dumps, but also acquiring full thread dumps triggered by the processor usage rate of a process. Therefore, when an abnormal state in which the processor usage rate is equal to or higher than a threshold continues, a full thread dump can be automatically acquired. By determining an abnormality not when the abnormal state occurs, but when the abnormal state is detected as continuing, it is possible to reduce false positive detections. In particular, when a full thread dump is output triggered by the processor usage rate of a process, the effect of reducing the processor load is significant.

[0196] In addition to periodic full thread dumps 17, when the processor usage rate of a thread remains above a predetermined threshold for a predetermined period of time, a stack trace or a full thread dump is obtained for one thread included in a process.

[0197] This allows the acquisition of a thread-triggered stack trace 19 or a full thread dump even when the processor usage rate of a process is not equal to or greater than the threshold value, and even when an abnormal state of the processor usage rate of a specific thread continues. Therefore, the information processing device 10 can also analyze cases where the behavior of the target application 11 becomes abnormal due to a thread.

[0198] A user can set mode information as to whether to acquire only a stack trace of a specific thread or to acquire a full thread dump when it is detected that the processor usage rate of a specific thread has reached or exceeded a threshold value according to the target application 11. In particular, the user can set the mode information according to the target application 11. Therefore, an appropriate setting can be selected according to the target application 11.

[0199] The information processing device 10 prioritizes the acquisition of the periodic full thread dump 17.

[0200] This makes it possible to obtain periodically observed information at regular sampling intervals without missing any information.

[0201] When the processor usage rate of a process or a thread remains above a threshold for a specified period of time or longer, log information is acquired at a sampling interval t4 that is shorter than the sampling interval t1 at the time of acquiring a periodic full thread dump 17.

[0202] This makes it possible to obtain the change over time in the log information 250 after the occurrence of an abnormality, which is useful for identifying the cause of the abnormality in the application. By obtaining the process-triggered full thread dump 18, the thread-triggered stack trace 19, or the thread-triggered full thread dump three or more times, it becomes possible to accurately grasp the operation in the target application layer at that time.

[0203] The setting variables such as the processor usage rate threshold and the processor high load duration threshold can be specified for each target application 11 in the form of a setting file.

[0204] Assumed benefits in business scenarios include the ability to analyze causes of non-response and slow response in applications while reducing the processor load, making it applicable to a variety of fields that pursue computing power. In particular, it can provide a response in departments that analyze applications.

[0205] [G] Notes Regarding the above embodiment, the following supplementary notes are further disclosed.

[0206] (Appendix 1) acquiring first log information about a plurality of threads included in a process during execution of the program based on a first condition; acquiring second log information for at least one thread included in the process based on a second condition different from the first condition; When the acquisition times of the first log information and the second log information are within a predetermined time frame, one of the first log information and the second log information is acquired. A log information acquisition program that causes a computer to execute processing.

[0207] (Appendix 2) the first log information is log information about a plurality of threads included in the process that is periodically acquired; The log information acquisition program described in Appendix 1, wherein the second log information is log information about multiple threads included in the process when a state in which the processor usage rate of the process is greater than or equal to a predetermined threshold continues for a predetermined period of time.

[0208] (Appendix 3) the first log information is log information about a plurality of threads included in the process that is periodically acquired; The second log information is log information about one thread or multiple threads included in the process when a state in which a processor usage rate of one thread included in the process is equal to or higher than a predetermined threshold continues for a predetermined period of time. The log information acquisition program described in Appendix 1.

[0209] (Appendix 4) In the process of acquiring one of the first log information and the second log information, the first log information is acquired. A log information acquisition program according to appendix 2 or 3.

[0210] (Appendix 5) The process of acquiring the second log information includes acquiring the second log information a plurality of times at a second sampling interval that is shorter than a first sampling interval at which the first log information is acquired, In a process of acquiring one of the first log information and the second log information, the first log information is acquired, and in a process of acquiring the second log information a plurality of times, the number of times the second log information is acquired is reduced. The log information acquisition program described in Appendix 4.

[0211] (Appendix 6) acquiring first log information about a plurality of threads included in a process during execution of the program based on a first condition; acquiring second log information for at least one thread included in the process based on a second condition different from the first condition; When the acquisition times of the first log information and the second log information are within a predetermined time frame, one of the first log information and the second log information is acquired. The processing is carried out by a computer. How to obtain log information.

[0212] (Appendix 7) the first log information is log information about a plurality of threads included in the process that is periodically acquired; The second log information is log information about a plurality of threads included in the process when a state in which a processor usage rate of the process is equal to or higher than a predetermined threshold continues for a predetermined period of time. The method for obtaining log information is described in Appendix 6.

[0213] (Appendix 8) the first log information is log information about a plurality of threads included in the process that is periodically acquired; The second log information is log information about one thread or multiple threads included in the process when a state in which a processor usage rate of one thread included in the process is equal to or higher than a predetermined threshold continues for a predetermined period of time. The method for obtaining log information is described in Appendix 6.

[0214] (Appendix 9) In the process of acquiring one of the first log information and the second log information, the first log information is acquired. A method for obtaining log information as described in Appendix 7 or 8.

[0215] (Appendix 10) The process of acquiring the second log information includes acquiring the second log information a plurality of times at a second sampling interval that is shorter than a first sampling interval at which the first log information is acquired, In a process of acquiring one of the first log information and the second log information, the first log information is acquired, and in a process of acquiring the second log information a plurality of times, the number of times the second log information is acquired is reduced. A method for obtaining log information as described in Appendix 9.

[0216] (Appendix 11) acquiring first log information about a plurality of threads included in a process during execution of the program based on a first condition; acquiring second log information for at least one thread included in the process based on a second condition different from the first condition; When the acquisition times of the first log information and the second log information are within a predetermined time frame, one of the first log information and the second log information is acquired. An information processing device having a processor.

[0217] (Appendix 12) the first log information is log information about a plurality of threads included in the process that is periodically acquired; The second log information is log information about a plurality of threads included in the process when a state in which a processor usage rate of the process is equal to or higher than a predetermined threshold continues for a predetermined period of time. 12. The information processing device according to claim 11.

[0218] (Appendix 13) the first log information is log information about a plurality of threads included in the process that is periodically acquired; The second log information is log information about one thread or multiple threads included in the process when a state in which a processor usage rate of one thread included in the process is equal to or higher than a predetermined threshold continues for a predetermined period of time. 12. The information processing device according to claim 11.

[0219] (Appendix 14) the processor acquires the first log information in a process of acquiring one of the first log information and the second log information. 14. The information processing device according to claim 12 or 13.

[0220] (Appendix 15) The processor, In the process of acquiring the second log information, the second log information is acquired a plurality of times at a second sampling interval that is shorter than a first sampling interval at which the first log information is acquired; In a process of acquiring one of the first log information and the second log information, the first log information is acquired, and in a process of acquiring the second log information a plurality of times, the number of times the second log information is acquired is reduced. 15. The information processing device according to claim 14. [Explanation of symbols]

[0221] 1 Management System 2 Console 3. Target device 10, 10a Information processing device 11 Target Applications 12 Execution environment 13 Interface 14 Surveillance Program 15 Configuration file storage section 16 Research Material Storage Section 17 Periodic full thread dumps 18 Process triggered full thread dump 19 Thread triggered stack trace 20 OS 100a Processor 100b Memory 100c storage section 100d IF section 100e IO section 100f Reading section 100g Program 100h Recording medium 100i Bus 110 Control section 111 Timing section 112 Periodic full thread dump acquisition part 113 Process CPU Usage Acquisition Unit 114 First Time Judgment Section 115 Full thread dump acquisition part 116 Thread CPU Usage Acquisition Unit 117 Second Time Judgment Section 118 Stack trace acquisition part 119 Adjustment section 200 Memory section 210 User Preferences Variables 220 CPU status record variables 230 Log information recording variables 240 CPU Usage Data 250 Log information 260 Analysis Data 1020 Process Memory

Claims

1. acquiring first log information for a plurality of threads included in a process during execution of the program based on a first condition; acquiring second log information for at least one thread included in the process based on a second condition different from the first condition; When the acquisition times of the first log information and the second log information are within a predetermined time frame, one of the first log information and the second log information is acquired. Have a computer carry out the process, Log information acquisition program

2. the first log information is log information regarding a plurality of threads included in the process, the log information being periodically acquired; the second log information is log information about a plurality of threads included in the process when a state in which a processor utilization rate of the process is equal to or higher than a predetermined threshold continues for a predetermined period of time; 2. The log information acquisition program according to claim 1.

3. the first log information is log information regarding a plurality of threads included in the process, the log information being periodically acquired; the second log information is log information about one thread included in the process or a plurality of threads included in the process when a state in which a processor usage rate of the one thread included in the process is equal to or higher than a predetermined threshold continues for a predetermined period of time; 2. The log information acquisition program according to claim 1.

4. In the process of acquiring one of the first log information and the second log information, the first log information is acquired.

4. The log information acquisition program according to claim 2 or 3.

5. The process of acquiring the second log information includes acquiring the second log information a plurality of times at a second sampling interval that is shorter than a first sampling interval at which the first log information is acquired, In a process of acquiring one of the first log information and the second log information, the first log information is acquired, and in a process of acquiring the second log information a plurality of times, the number of times the second log information is acquired is reduced.

5. The log information acquisition program according to claim 4.

6. acquiring first log information for a plurality of threads included in a process during execution of the program based on a first condition; acquiring second log information for at least one thread included in the process based on a second condition different from the first condition; When the acquisition times of the first log information and the second log information are within a predetermined time frame, one of the first log information and the second log information is acquired. The processing is carried out by a computer. How to obtain log information.

7. acquiring first log information for a plurality of threads included in a process during execution of the program based on a first condition; acquiring second log information for at least one thread included in the process based on a second condition different from the first condition; When the acquisition times of the first log information and the second log information are within a predetermined time frame, one of the first log information and the second log information is acquired. An information processing device having a processor.

Citation Information

Patent Citations

  • Time-based context sampling of trace data with support for multiple virtual machines.

    JP2012531642A

  • Methods, apparatus, and computer programs in a multithreaded computing environment for collecting diagnostic data.

    JP2013522741A

  • Monitoring system, monitoring method, monitoring program, and monitoring device

    JP2015082131A

  • Electronic device, control method, and trained model

    JP2022062520A