Analyzing Logical Log Traffic

Description

Did you ever ask yourself one or more of the following questions:

  1. What is the busiest daytime for my Informix instance ?
  2. How many logical logs are written per day ?
  3. What network capacity do I need to run a RSS- or HDR-Instance ?
  4. Is my storage manager able to keep pace with the logical log switch frequency ?
  5. Did the transaction activity increase over time ?

If you are running Informix 11 or 11.5 the Open Admin Tool provides some statistics that might support you here. You could also create an individual sensor to collect specific statistics.

But independent from the Informix version you use, the online.log (onconfig MSGPATH parameter) is always a good source of information. IDS writes important system events to this message log and if you didn't truncate it, it might already contain a long history :-)

The little Perl utility I wrote is named ll_traffic.pl (logical log traffic). It parses the online.log and computes some statistics based on the logical log usage for your Informix instance. It isn't a highly sophisticated utility but it might help you to answer the questions mentioned above. Especially before adding a HDR- or RSS-Node(s) to an existing Informix instance, it could be useful to know what the average log traffic as well as the "busy hours" are.

Usage

Usage: ./ll_traffic.pl -d <#hours> [-m <fullpath_to_online_log>]

-d <#hours>                  -> Number of hours that should be grouped together (Range: 1-24)
-m <fullpath_to_online_log>  -> Full pathname of 'online.log'
  • Option -d <#hours> specifies the number of hours you want to group together
  • Option -m <online.log> specifies the full pathname of the online.log. If not specified, the current online.log for this instance will be analyzed

The -d <#hours> option allows you to drill down your log traffic to specific hours in order to identify the busy transaction hours in your Informix instance.

Output

Here is a short description of the individual statistics showed by ll_traffic.pl:

  • Number of Logs per Day
    • This is the number logical logs written for this day (please see Notes below)
  • Total LogTraffic per Day
    • This is the total number of megabytes written to the logical logs for this day (please see Notes below)
  • Average LogTraffic per Hour
    • This is the average number of megabytes written to the logical logs during one hour (please see Notes below)
  • LogTraffic per Hour-Range (begin_hour-end_hour)
    • This is the total number of megabytes written to the logical logs during the given range of hours (please see Notes below)

Notes:

  • ll_traffic.pl assumes that all your logs are created with a uniform size. A uniform logical log size is generally considered good practice.
  • A new date marker in the online.log is also the begin of a new statistic. So if you had an instance restart, you might see two individual statistics for the same day. This could be solved by extra programming, but isn't currently.
  • Partial logs - logs that are not full when a log switch occurs - are not detected by the script. The statistics reported assume that a logical log has been completely full when switched.

Below you will find some sample statistics generated with ll_traffic.pl.

Example 24 Hour Range

Command executed: ll_traffic.pl -d 24

INFORMIXDIR                        : /opt/ibm/ids/IDS.11.50.FC4DE
ONCONFIG                           : onconfig.gepard
INFORMIXSERVER                     : gepard
online.log is                      : /home/informix/instances/gepard/logs/online.gepard.log
System Page Size is                : 2 KB
Logical Log Size is                : 200 MB

================================================================================

Mon Jul 20 00:00:04 2009

Number of Logs per Day             : 505   
Total LogTraffic per Day           : 101000 MB
Average LogTraffic per Hour        : 4208   MB

LogTraffic per Hour-Range   (00-23): 101000 MB (505  Logs)

================================================================================

Tue Jul 21 00:02:13 2009

Number of Logs per Day             : 513   
Total LogTraffic per Day           : 102600 MB
Avergage LogTraffic per Hour       : 4275   MB

LogTraffic per Hour-Range   (00-23): 102600 MB (513  Logs)

Example 6 Hour Range

Command executed: ll_traffic.pl -d 6

INFORMIXDIR                        : /opt/ibm/ids/IDS.11.50.FC4DE
ONCONFIG                           : onconfig.gepard
INFORMIXSERVER                     : gepard
online.log is                      : /home/informix/instances/gepard/logs/online.gepard.log
System Page Size is                : 2 KB
Logical Log Size is                : 200 MB

================================================================================

Mon Jul 20 00:00:04 2009

Number of Logs per Day             : 505   
Total LogTraffic per Day           : 101000 MB
Average LogTraffic per Hour        : 4208   MB

LogTraffic per Hour-Range   (00-04): 15200  MB (76   Logs)
LogTraffic per Hour-Range   (05-09): 17000  MB (85   Logs)
LogTraffic per Hour-Range   (10-14): 27200  MB (136  Logs)
LogTraffic per Hour-Range   (15-19): 27000  MB (135  Logs)
LogTraffic per Hour-Range   (20-23): 14600  MB (73   Logs)

================================================================================

Tue Jul 21 00:02:13 2009

Number of Logs per Day             : 513   
Total LogTraffic per Day           : 102600 MB
Average LogTraffic per Hour        : 4275   MB

LogTraffic per Hour-Range   (00-04): 15200  MB (76   Logs)
LogTraffic per Hour-Range   (05-09): 19600  MB (98   Logs)
LogTraffic per Hour-Range   (10-14): 25600  MB (128  Logs)
LogTraffic per Hour-Range   (15-19): 23000  MB (115  Logs)
LogTraffic per Hour-Range   (20-23): 19200  MB (96   Logs)

Example 1 Hour Range

Command executed: ll_traffic.pl -d 1

INFORMIXDIR                        : /opt/ibm/ids/IDS.11.50.FC4DE
ONCONFIG                           : onconfig.gepard
INFORMIXSERVER                     : gepard
online.log is                      : /home/informix/instances/gepard/logs/online.gepard.log
System Page Size is                : 2 KB
Logical Log Size is                : 200 MB

================================================================================

Mon Jul 20 00:00:04 2009

Number of Logs per Day             : 505   
Total LogTraffic per Day           : 101000 MB
Average LogTraffic per Hour        : 4208   MB

LogTraffic per Hour-Range   (00-00): 4800   MB (24   Logs)
LogTraffic per Hour-Range   (01-01): 1200   MB (6    Logs)
LogTraffic per Hour-Range   (02-02): 6200   MB (31   Logs)
LogTraffic per Hour-Range   (03-03): 2200   MB (11   Logs)
LogTraffic per Hour-Range   (04-04): 800    MB (4    Logs)
LogTraffic per Hour-Range   (05-05): 400    MB (2    Logs)
LogTraffic per Hour-Range   (06-06): 1000   MB (5    Logs)
LogTraffic per Hour-Range   (07-07): 3600   MB (18   Logs)
LogTraffic per Hour-Range   (08-08): 6200   MB (31   Logs)
LogTraffic per Hour-Range   (09-09): 5800   MB (29   Logs)
LogTraffic per Hour-Range   (10-10): 6000   MB (30   Logs)
LogTraffic per Hour-Range   (11-11): 5800   MB (29   Logs)
LogTraffic per Hour-Range   (12-12): 5800   MB (29   Logs)
LogTraffic per Hour-Range   (13-13): 5000   MB (25   Logs)
LogTraffic per Hour-Range   (14-14): 4600   MB (23   Logs)
LogTraffic per Hour-Range   (15-15): 11600  MB (58   Logs)
LogTraffic per Hour-Range   (16-16): 5000   MB (25   Logs)
LogTraffic per Hour-Range   (17-17): 4000   MB (20   Logs)
LogTraffic per Hour-Range   (18-18): 3400   MB (17   Logs)
LogTraffic per Hour-Range   (19-19): 3000   MB (15   Logs)
LogTraffic per Hour-Range   (20-20): 3400   MB (17   Logs)
LogTraffic per Hour-Range   (21-21): 3400   MB (17   Logs)
LogTraffic per Hour-Range   (22-22): 3800   MB (19   Logs)
LogTraffic per Hour-Range   (23-23): 4000   MB (20   Logs)

================================================================================

Tue Jul 21 00:02:13 2009

Number of Logs per Day             : 513   
Total LogTraffic per Day           : 102600 MB
Average LogTraffic per Hour        : 4275   MB

LogTraffic per Hour-Range   (00-00): 4600   MB (23   Logs)
LogTraffic per Hour-Range   (01-01): 4200   MB (21   Logs)
LogTraffic per Hour-Range   (02-02): 3200   MB (16   Logs)
LogTraffic per Hour-Range   (03-03): 1800   MB (9    Logs)
LogTraffic per Hour-Range   (04-04): 1400   MB (7    Logs)
LogTraffic per Hour-Range   (05-05): 1800   MB (9    Logs)
LogTraffic per Hour-Range   (06-06): 1400   MB (7    Logs)
LogTraffic per Hour-Range   (07-07): 4000   MB (20   Logs)
LogTraffic per Hour-Range   (08-08): 6400   MB (32   Logs)
LogTraffic per Hour-Range   (09-09): 6000   MB (30   Logs)
LogTraffic per Hour-Range   (10-10): 5800   MB (29   Logs)
LogTraffic per Hour-Range   (11-11): 5600   MB (28   Logs)
LogTraffic per Hour-Range   (12-12): 5000   MB (25   Logs)
LogTraffic per Hour-Range   (13-13): 4600   MB (23   Logs)
LogTraffic per Hour-Range   (14-14): 4600   MB (23   Logs)
LogTraffic per Hour-Range   (15-15): 8600   MB (43   Logs)
LogTraffic per Hour-Range   (16-16): 4400   MB (22   Logs)
LogTraffic per Hour-Range   (17-17): 4000   MB (20   Logs)
LogTraffic per Hour-Range   (18-18): 3200   MB (16   Logs)
LogTraffic per Hour-Range   (19-19): 2800   MB (14   Logs)
LogTraffic per Hour-Range   (20-20): 3000   MB (15   Logs)
LogTraffic per Hour-Range   (21-21): 3400   MB (17   Logs)
LogTraffic per Hour-Range   (22-22): 5400   MB (27   Logs)
LogTraffic per Hour-Range   (23-23): 7400   MB (37   Logs)

Download

You can download the utility through the following URL: