Chapter 5. Time synchronization 41
Using XEDIT, follow these steps:
1. Locate Features in the Features Statement section:
locate Features
2. Locate Enable:
locate Enable
3. Add three lines after Enable:
add 3
4. Fill with:
STP_TZ ,
STP_timestamping ,
STP_Timezone ,
5. Save the file:
file
6. If you are prepared to shut down and re-ipl the system, issue:
Issue: shutdown reipl
During the boot process Linux starts its own software-managed clock off of the hardware
clock. Alternatively, the clock can be set through operator commands. After the boot, the
Linux clock runs independently of the hardware clock. Because Linux manages its own
software clock, it frequently uses NTP (see 5.2, “Network Time Protocol (NTP)” on page 52)
to keep its time synchronized to an external source. If the Linux image (logical partition or
guest) has a Local Area Network (LAN) connection to an NTP server, Linux can take
advantage of it.
5.1.2 Relocating DB2 when using the hardware clock
Two tests were done using the hardware clock. In the first test, different timezone
configurations were set up on each of the two CPCs, while in the second test the CPC time
was manually changed. Linux and DB2 behavior were analyzed on both.
Test 1: Changing timezone configuration
The first test checks how Linux, and consequently DB2, handles relocation between two
CPCs in different timezones. ITSOSSI1 (z10™) is using the Central Standard Time (CST)
and ITSOSSI3 (z196) is using Eastern Daylight Time (EDT); check Figure 5-1 on page 42.
Note: STP_timestamping tells CP to enable the STP protocol (if the STP facility is
installed) and apply timestamps to all XRC-capable DASD devices.
STP_timezone, or STP_tz, tells CP to enable the STP protocol (if the STP facility is Issue:
shutdown reipl).
42 DB2 10 for Linux on System z Using z/VM v6.2, SSI Clusters and LGR
Figure 5-1 CPCs with different timezone configurations
Make sure the vmcp module is loaded so we can see on which VM system the server is
located by issuing the command shown in Example 5-3.
Example 5-3 Loading vmcp module
# modprobe vmcp
First we have the server set to use the hardware clock. Therefore, the Network Time Protocol
(NTP) daemon is not started. NTP is covered in the next section. At this point you simply
notice that it is not running during our first test (Example 5-4).
Example 5-4 Checking NTP daemon
itsolnx1:~ # /etc/init.d/ntp status
Checking for network time protocol daemon (NTPD): unused
The Linux guest is on the z/VM member ITSOSSI3 and has the CST timezone;
Example 5-5.
Example 5-5 Checking time settings on Linux and z/VM ITSOSSI3
itsolnx1:~ # vmcp q userid; vmcp q time; date
ITSOLNX1 AT ITSOSSI3
TIME IS 13:45:57 CST MONDAY 06/11/12
CONNECT= 00:01:34 VIRTCPU= 000:04.45 TOTCPU= 000:04.68
Mon Jun 11 13:45:57 CST 2012
In Example 5-6, ITSOSSI1 is set to a different timezone, EST (1 hour behind).
Example 5-6 Checking time settings on ITSOSS1
q time
TIME IS 12:45:57 EST MONDAY 06/11/12
SSI domain
z196
z/VM ITSOSS3
itsolnx1
LINUX
DB2 v10
Time: 12:45:57 CST
z10
z/VMITSOSS3
z/VM ITSOSS1
Time: 13:45:57 EDT
Relocation

Get DB2 10 for Linux on System z Using z/VM v6.2, Single System Image Clusters and Live Guest Relocation 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.