Forum

General discussion on using the Kognitio Analytical Platform.
Contributor
Offline
User avatar
Posts: 17
Joined: Mon Dec 01, 2014 11:38 am

How do I change the timezone on a Kognitio system?

by michaeld » Wed Oct 28, 2015 10:27 am

My system timezone is currently set to GMT and I want to set it to CET, is this possible?
Last edited by michaeld on Wed Oct 28, 2015 10:34 am, edited 1 time in total.
Reply with quote Top
Contributor
Offline
User avatar
Posts: 17
Joined: Mon Dec 01, 2014 11:38 am

Re: How do I change the timezone on a Kognitio system?

by michaeld » Wed Oct 28, 2015 10:33 am

To change the timezone, you need to set it in two places to ensure that both Linux commands and WX2 use the same zone. It is best to make these changes when the system is idle as the process requires WX2 to be restarted and you would also want to avoid introducing odd timings into logs that are written to by any shell scripts that you have.

The example below demonstrates how to set the timezone to CET, however you will want to select your desired timezone from /usr/share/zoneinfo

Stage 1 - As the root user redefine /etc/localtime on all nodes so that Linux commands such as 'date' report the correct timezone

1. Make a backup copy of /etc/localtime
wxtool -S "mv /etc/localtime /etc/localtime.bak"

2. Check the backup copy has been created
wxtool -S "ls -l /etc/localtime.bak"

3. Redefine /etc/localtime to be a symbolic link pointing to "Rome".
wxtool -S "ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime"

4. Run "date" to check the the timezone is reported as CET (note that "wxtool -S date" will not yet reflect the change)
date



Stage 2 - As root redefine the value for TIMEZONE in /etc/sysconfig/clock so that WX2 picks up the correct zone

In this example the nodes are currently set to "Europe/London" which maps to GMT.

You can see this by using wxtool to query all nodes as follows:-

wxadmin wxadmin@system1:~> wxtool -S 'grep ^TIMEZONE /etc/sysconfig/clock'
Kognitio WX2 Administration Utility v7.01.00-f on system1
(c)Copyright Kognitio Ltd 2003-2010.

Results:
For node system1-wx2-f0v3r1e1b1 (ecode 0, 59 bytes):
TIMEZONE="Europe/London"
For node system1-wx2-f0v3r1e1b2 (ecode 0, 59 bytes):
TIMEZONE="Europe/London"
For node system1-wx2-f0v3r1e1b3 (ecode 0, 59 bytes):
TIMEZONE="Europe/London"
For node system1-wx2-f0v3r1e1b4 (ecode 0, 59 bytes):
TIMEZONE="Europe/London"
For node system1-wx2-f0v3r1e1b5 (ecode 0, 59 bytes):
TIMEZONE="Europe/London"
For node system1-wx2-f0v3r1e1b6 (ecode 0, 59 bytes):
TIMEZONE="Europe/London"
For node system1-wx2-f0v3r1e1b7 (ecode 0, 59 bytes):
TIMEZONE="Europe/London"
For node system1-wx2-f0v3r1e1b8 (ecode 0, 59 bytes):
TIMEZONE="Europe/London"


Change the timezone setting with the following steps:-

1. Backup the existing clock file
wxtool -S "cp /etc/sysconfig/clock /etc/sysconfig/clock.bak"

2. Check the backup file exists
wxtool -S "ls -l /etc/sysconfig/clock.bak"

3. Create a new clock file specifying "Europe/Rome" as the TIMEZONE
wxtool -S "cat /etc/sysconfig/clock | sed 's/\"Europe\/London\"/\"Europe\/Rome\"/g' > /etc/sysconfig/clock.new"

4. Check that the TIMEZONE has been set as intended within in the new file
wxtool -S "grep ^TIMEZONE /etc/sysconfig/clock.new"

5. Overwrite the existing clock file with the new one
wxtool -S "cp /etc/sysconfig/clock.new /etc/sysconfig/clock"

6. A final check to see that TIMEZONE is now set to "Europe/Rome" in the current clock file
wxtool -S "grep ^TIMEZONE /etc/sysconfig/clock"

7. Restart the SMDs so that commands like "wxtool -S date" pick up on the change
wxserver smd all restart

8. Restart KAP so that the database picks up on the change
wxserver start [sysimage]

9. Restart the cron daemon on all nodes
wxtool -S "/etc/init.d/cron stop"
wxtool -S "/etc/init.d/cron start"
Reply with quote Top

Who is online

Users browsing this forum: No registered users and 1 guest

cron