Efficient logging of processing peaks in control systems
AssigneeInternational Business Machines Corporation
InventorEnrique Q. Garcia
Life of this patent
Estimating the term…
Abstract
Efficient logging in a control system is provided. A temporary history record corresponding to a message transaction placed onto a message queue data structure is generated. A total processing time for the received message transaction is determined. The total processing time is compared with a previously determined peak processing time value. In response to determining that the total processing time exceeds the previously determined peak processing time value, the temporary history record corresponding to the received message transaction is stored in an event log.
Claims4
A method for efficient logging of event records in an uninterruptible power supply (UPS) array that includes a plurality of UPSs for providing power to a server computer, the method comprising:
- allocating, by an embedded microcontroller coupled to the server computer, an event log in a first storage module of the microcontroller;
- periodically sending status and control messages, by the microcontroller, to UPSs of the UPS array via a message queue data structure, wherein the microcontroller is coupled to each UPS of the UPS array via a serial port controller of the microcontroller coupled to a serial bus that is coupled to each of the UPSs, and the message queue data structure is coupled to the microcontroller, the server computer, and to the serial port controller for queuing messages from the server and the microcontroller to UPSs of the UPS array;
- and
- in response to determining, by the microcontroller, that a message has been received in the message queue from the server computer, the microcontroller:
- creating a history record in a history record store of the microcontroller that corresponds to the received message;
- determining the duration to complete transmission onto the serial bus of a message that is in process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrives in the message queue;
- storing, in the created history record, an entry for the determined duration to complete transmission onto the serial bus of the message that was in process of being transmitted onto the serial bus;
- for each message in the message queue that is queued before the message determined to have been received from the server computer, not including the message that was in the process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrived in the message queue, but including the message determined to have been received from the server computer, determining, for each such message, the duration to complete transmission onto the serial bus;
- storing, in the created history record, an entry for the determined duration to complete transmission onto the serial bus of each message in the message queue that is queued before the message determined to have been received from the server computer, not including the message that was in the process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrived in the message queue, but including the message determined to have been received from the server computer;
- determining a total queue processing time by summing all of the stored durations for the history record entries corresponding to messages in the message queue that were queued before the message determined to have been received from the server computer, not including the message that was in the process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrived in the message queue, but including the message determined to have been received from the server computer, and subtracting from the sum the duration to complete transmission onto the serial bus of the message that was in process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrived in the message queue;
- comparing the determined total queue processing time to a value in a register of the microcontroller that corresponds to a previously determined total queue processing time;
- and
- in response to determining that the determined total queue processing time is greater than the value in the register corresponding to a previously determined total queue processing time, storing the determined total queue processing time in the register, and logs the created history record into the event log;
- whereby only history records indicating a worst case queue processing time are logged into the event log, and whereby the microcontroller allocates an event log of a size smaller than would be required if all history records were stored in the event log.
A computer program product for efficient logging of event records in an uninterruptible power supply (UPS) array that includes a plurality of UPSs for providing power to a server computer, the computer program product comprising:
- one or more non-transitory computer-readable storage media and program instructions stored on the one or more non-transitory computer-readable storage media, the program instructions comprising:
- program instructions to allocate, by an embedded microcontroller coupled to the server computer, an event log in a first storage module of the microcontroller;
- program instructions to periodically send status and control messages, by the microcontroller, to UPSs of the UPS array via a message queue data structure, wherein the microcontroller is coupled to each UPS of the UPS array via a serial port controller of the microcontroller coupled to a serial bus that is coupled to each of the UPSs, and the message queue data structure is coupled to the microcontroller, the server computer, and to the serial port controller for queuing messages from the server and the microcontroller to UPSs of the UPS array;
- and
- program instructions, in response to determining, by the microcontroller, that a message has been received in the message queue from the server computer, to cause the microcontroller to:
- create a history record in a history record store of the microcontroller that corresponds to the received message;
- determine the duration to complete transmission onto the serial bus of a message that is in process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrives in the message queue;
- store, in the created history record, an entry for the determined duration to complete transmission onto the serial bus of the message that was in process of being transmitted onto the serial bus;
- for each message in the message queue that is queued before the message determined to have been received from the server computer, not including the message that was in the process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrived in the message queue, but including the message determined to have been received from the server computer, determine, for each such message, the duration to complete transmission onto the serial bus;
- store, in the created history record, an entry for the determined duration to complete transmission onto the serial bus of each message in the message queue that is queued before the message determined to have been received from the server computer, not including the message that was in the process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrived in the message queue, but including the message determined to have been received from the server computer;
- determine a total queue processing time by summing all of the stored durations for the history record entries corresponding to messages in the message queue that were queued before the message determined to have been received from the server computer, not including the message that was in the process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrived in the message queue, but including the message determined to have been received from the server computer, and subtract from the sum the duration to complete transmission onto the serial bus of the message that was in process of being transmitted onto the serial bus from the message queue via the serial port controller when the message from the server computer arrived in the message queue;
- compare the determined total queue processing time to a value in a register of the microcontroller that corresponds to a previously determined total queue processing time;
- and
- in response to determining that the determined total queue processing time is greater than the value in the register corresponding to a previously determined total queue processing time, store the determined total queue processing time in the register, and logs the created history record into the event log;
- whereby only history records indicating a worst case queue processing time are logged into the event log, and whereby the microcontroller allocates an event log of a size smaller than would be required if all history records were stored in the event log.
Dependencies are inferred from the claim text.