Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ tried to change zones in centos and have crashed the server

Posted by: neils Jun 2 2008, 11:53 AM

hi,

a requirement was to change the zonefile in linux to point to denver to match its timezone

this may be a little wrong but the commands i issued:

mv /etc/localtime /etc/localtimeOLD
ln -s /usr/share/zoneinfo/America/Denver /etc/localtime
clock -w
echo "clock -s" > /sbin/hwclock
chmod +x /sbin/hwclock

the server started lagging and the loads shot up, upon a reboot it keeps complaining that its out of memory, see following img:

http://www.searchfriendly.co.uk/error.png


any ideas?

Posted by: michaelk Jun 2 2008, 05:05 PM

You also need to set the ZONE entry in the file /etc/sysconfig/clock file (e.g. "America/Denver")

To reset the clock use the following command:
/sbin/hwclock --systohc

instead of
clock -w
echo "clock -s" > /sbin/hwclock
chmod +x /sbin/hwclock

hwclock is a binary program. Thecommand "echo "clock -s" > /sbin/hwclock" basically overwrote the program with the text "clock -s". You need to replace this program.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)