296 DB2 Integrated Cluster Environment Deployment Guide
Figure 5-94 Memory Visualizer
The Memory Visualizer (Figure 5-94) shows you (for each partition) a wide
variety of memory usage parameters, such as for the instance and databases.
You can have the values plotted to see how the trend is for a parameter.
Memory Visualizer is a graphical representation of db2mtrk data. db2mtrk data is
reported in the snapshot monitor stream in the Memory Heap section. In the
Memory Visualizer you also see to what extend your heaps are used, which
gives you the ability to detect the big allocated heaps.
5.2.2 Linux tools
All linux distributions come with a wide range of monitoring tools. We present
some of the most common tools delivered with Linux, and also some free,
available tools.
Chapter 5. Operations and administration 297
Vmstat
Vmstat reports virtual memory statistics, which include, in the given order, the
following information, shown in Example 5-7:
r: Number of processes waiting for run time
b: Number of processes in uninterruptible sleep
swpd: Amount of virtual memory used
free: Amount of idle memory
buff: Amount of memory used as buffers
cache: Amount of memory used as cache
si: Memory swapped in from disk
so: Memory swapped to disk
bi: Blocks received
bo: Blocks sent
in: Interrupts (#)
cs: Context switches (#)
us: User time (%)
sy: System time (%)
id: Idle time (%)
wa: I/O-waits (%)
You can run vmstat with a counter and a delay, for example, if you want vmstats
to collect the statistics four times every two seconds you use the following
command:
vmstat 2 4
The output of that command is shown in Example 5-7.
Example 5-7 vmstat
[root@DB2RB01 root]# vmstat 2 4
procs memory swap io system cpu
r b swpd free buff cache si so bi bo in cs us sy id wa
3 0 0 1098400 199052 2393244 0 0 4 36 0 61 39 1 58 2
3 0 0 1097660 199052 2393244 0 0 0 0 202 677 51 1 48 0
3 0 0 1096556 199052 2393244 0 0 0 60 136 522 51 3 45 1
3 0 0 1096556 199052 2393244 0 0 0 0 433 1337 50 1 49 0
This command is ideal for monitoring the CPU usage (us, sy, id, wa) and the
paging rate, which can be found under the memory in (si) and memory out (so)
columns. Other important columns are the amount of allocated virtual storage
(swpd) and free virtual storage (free).
This command is useful for determining if something is suspended or just taking
a long time. Additional information about vmstat can be found in the man pages
of vmstat (man vmstat).
298 DB2 Integrated Cluster Environment Deployment Guide
iostat
Iostats is used to show the throughput on the devices and partitions, and also
reports the CPU usage. The program gives you the possibility to run it multiple
times in a specified interval. Iostat is not installed by default (SuSE, Red Hat);
you have to install the sysstat package to get the iostat command.
The syntax of the command is:
iostat [ options... ] [ <interval> [ <count> ] ]
An example output of iostat 5 5 is shown in Example 5-8.
Example 5-8 iostat
[root@DB2RB01 root]# iostat 5 5
Linux 2.4.21-15.ELsmp (DB2RB01.torolab.ibm.com) 23/07/04
avg-cpu: %user %nice %sys %iowait %idle
39.22 0.12 1.48 1.64 57.55
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 1.80 9.60 74.57 2451176 19033094
sda1 0.00 0.00 0.00 238 70
sda2 1.80 9.60 74.57 2450314 19033024
sda3 0.00 0.00 0.00 176 0
sdb 0.00 0.00 0.00 538 464
sdb1 0.00 0.00 0.00 338 464
avg-cpu: %user %nice %sys %iowait %idle
50.70 0.00 0.00 0.40 48.90
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.60 0.00 43.29 0 216
sda1 0.00 0.00 0.00 0 0
sda2 0.60 0.00 43.29 0 216
sda3 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdb1 0.00 0.00 0.00 0 0
avg-cpu: %user %nice %sys %iowait %idle
52.00 0.00 1.10 0.00 46.90
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sda1 0.00 0.00 0.00 0 0
sda2 0.00 0.00 0.00 0 0
sda3 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdb1 0.00 0.00 0.00 0 0

Get DB2 Integrated Cluster Environment Deployment Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.