db2top -a

In today’s post, you’ll see how to use the -a command line option to filter out inactive objects from your db2top output.

Today’s command line option is fairly simple. You specify the -a option when you want to filter out inactive objects such as inactive sessions. For example, launching db2top without the -a option could produce the following sessions screen:

db2top Sessions screen with no -a option

With the -a option specified, all of the sessions whose Application Status was listed as Connected above are no longer shown, as below:

db2top Sessions screen with -a option applied

In interactive mode, pressing the ‘i’ key at any time allows you to toggle the same kind of filtering out of inactive objects, making the -a option somewhat redundant. The -a option is essential, however, when you wish to do the same filtering in combination with the -b option’s background mode described previously.