db2top Feature of the Day – Gauges

Speedometer gauge

Before we can examine the various interactive screens of data that make up db2top, we need to become familiar with one of the ways these data are presented – gauges.

Gauges in db2top are graphical representations of proportions. Gauges appear on many of db2top’s screens, often grouped together.

A gauge shows what percentage of a certain measurement has some attribute. For example, in the picture below, the MaxActSess gauge from the Sessions screen shows the percentage of total sessions that are actively executing work. It shows this with a bar made of ‘-‘ characters. The same is done for all of the gauges in the group, including the AssAgents and FCM BufLow gauges.

db2top Database screen gauges
db2top Database screen gauges

There is another type of gauge that shows what percentage of a certain measurement has some attribute for more than one attribute. For example, in the Sessions screen, there is a gauge labeled “Sys/Usr Cpu%” that represents a measure of system CPU time with a repeating sequence of the character ‘s’ and a measure of user CPU time with a repeating sequence of the character ‘u’:

db2top Sessions screen gauges
db2top Sessions screen gauges

There are two ways the width of such character sequences can be calculated:

Normal
The width of the character sequence is a percentage of some total. e.g. the “ActSessions” gauge in the Sessions screen – represents the percentage of sessions that are active.
Avg Seconds
The width of the character sequence is the portion of some measurement that has a certain attribute measured during the last interval divided by the average of that same measurement taken since the last snapshot reset or database activation. e.g. “Sys/Usr Cpu%” gauge in the Sessions screen – the size of the sequence of ‘u’ characters is the amount of user CPU time measured in the last interval divided by the average amount of user CPU time + system CPU time measured since the last snapshot reset or database activation. The size of the sequence of ‘s’ characters is the amount of system CPU time measured in the last interval divided by the average amount of user CPU time + system CPU time measured since the last snapshot reset or database activation.

Gauges generally occupy the upper part of the screen. This section of the screen can be hidden by pressing the ‘g’ key. Any other data displayed in the same section is hidden as well, even if it is not in the form of a gauge. It can be shown again by pressing ‘g’ again.