Sitworld: Report on Daylight Savings Time Truants

MagicEscape

John Alvord, IBM Corporation

jalvord@us.ibm.com

Follow on twitter

Introduction

Twice a year installations need to change the clocks on many systems. Which systems did not have their time changed as expected is often of interest. This document shows you how to generate a report showing current DST status. Based on that report you can undertake recovery actions.

Background

The Local Time attribute is available to all agents. It is part of the Agent Support Library or TEMA. There is also a Universal Time Attribute group and a Universal Message attribute group. As it happens the attribute group does have an attribute known as ISDST. It is not available to the TEP and situations cannot be written using it. However it can be used in SQL. This is what I will show you how to do.

Sample report process SQL

1) Get the current time from the hub TEMS

SELECT

SYSTIME,ISDST

FROM O4SRV.LOCALTIME AT(‘HUB_NMP180’);

Output

KCIIN0187I Starting user script…

[1]    1150220190045000  0

SQL Notes:

The SYSTIME result is in the ITM time stamp  format CYYMMDDHHMMDD000.

C=Century 1=2000s

YY=Year

MM=Month

DD=Day

HH=Hour

MM=Minute

SS=Secong

000=constant zeroes

IDST will be 0 when not DST and 1 when DST.

2) get the current time and DST status

SELECT

ORIGINNODE,SYSTIME,ISDST

FROM O4SRV.LOCALTIME AT(‘REM_NMP183′,’HUB_NMP180’)

WHERE SYSTEM.PARMA(‘NODELIST’,’*ALL’,4 );

Output

KCIIN0187I Starting user script…

[1]  nmp184:LZ  1150220191426000  0

[2]  nmp183:LZ  1150220191426000  0

[3]  nmp182:LZ  1150220191426000  0

[4]  itmmtlpm12:KUL  1150220181426000  0

[5]  nmp180:Warehouse  1150220191426000  0

[6]  nmp180:TEPS  1150220191426000  0

[7]  nmp180:SY  1150220191426000  0

[8]  nmp180:LZ  1150220191426000  0

[9]  itmmtlpm12:KUX  1150220181426000  0

SQL Notes:

Note how some agents are in one time zone and another in another.

Note the AT(‘REM_NMP183′,’HUB_NMP180’) clause. This means the SQL is distributed to the named TEMSes.

Note the WHERE SYSTEM.PARMA(‘NODELIST’,’*ALL’,4 ) clause. That means the request is broadcast to all agents connected to the remote TEMSes.

Running the SQL

Windows TEPS – work done on system running the TEPS

1) login to system running TEPS which is connected to the hub TEMS

2) copy the SQL file to somewhere convenient like c:\temp\test.sql

3) cd <installdir>\cnps

4) run this command

KfwSQLClient /v /f c:\temp\test.sql  >c:\temp\test.lst

Linux/Unix TEPS

1) login to system running TEPS which is connected to the hub TEMS

2) copy the SQL file(s) to somewhere convenient like /tmp

3) cd <installdir>/bin

4) run this command

./itmcmd execute cq “KfwSQLClient /v /f /tmp/test.sql” > /tmp/test.lst

Discovering problem cases after a planned transition to Daylight Savings Time

SELECT

ORIGINNODE,SYSTIME,ISDST

FROM O4SRV.LOCALTIME AT(‘REM_NMP183′,’HUB_NMP180’)

WHERE SYSTEM.PARMA(‘NODELIST’,’*ALL’,4 ) AND

ISDST=’0′;

SQL note: We expect all agents to be in daylight savings configuration so ISDST would be 1. This would detect the other cases.

Summary

This shows how to create a report about current agents and the DST status.

Sitworld: Table of Contents

Photo Note: Magic Returning From a Hunt, Big Sur 2006.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: