2009/10/21

Reclaim the word Liberal!

"I am a Liberal. By definition this word means "free man". The root of the word is Latin and is "LIBER" meaning FREE. To free a man is to liberATE him. Once he has that freedom he has liberTY. A free-thinking individual would (in a perfect USA) be a liberTARIAN (I have disavowed my membership with this party since the nomination of Bob Barr last ... Read Moreyear). If you freely give you give liberALLY. A soccer player who freely roams the field is called a liberO. Too many people have made this a disgusting word and it is NOT disgusting to be FREE or to want FREEDOM. BE A LIBERAL and help us ALL be liberals, proudly! Rise from the cognitive misunderstanding of this word to the definitive beauty of it and embrace its essence my brother! Semper Fidelis and Semper LIBER!" -- Adrian Scott Parks

2009/08/04

Timezone configuration on SLES Linux

Having some trouble with clock drift with 2 SLES 9 SuSE linux boxes. Turns out vmware and the hwclock settings I chose during setup of the OS have been conspiring to put a long drift on my two systems. Fixing it is somewhat simple. Setting it up right the first time is obviously the best solution. To remedy:

Do this stuff to get your time figured out and fixed to where you want from an OS perspective:

Totally stolen from: http://www.planetmy.com/blog/how-to-configure-timezone-on-sles-linux/

The following tutorial will guide you How to configure TIMEZONE on SLES Linux.

Basically you can configure Linux timezone using two methods which is using command or YaST.

Note: use timezone “GMT+0“ for an example below.

For YaST timezone setup, it’s pretty simple. Login to terminal and type:

#YasT Setup

yast timezone

Select Global, select GMT+0
Hardware clock Set To: Localtime
Click Accept.

For command line setup, you’re require to know these 2 files /etc/localtime and /etc/sysconfig/clock.

#Backup existing file

mv /etc/localtime /etc/localtime.old

cp /etc/sysconfig/clock /etc/sysconfig/clock.old

#Edit configuration files

ln -s /usr/share/zoneinfo/GMT+0 /etc/localtimevi /etc/sysconfig/clock

TIMEZONE=GMT+0

HWCLOCK="--localtime"

Bear in mind, you can have different timezone setup for individual or global user by using user profile in your system. For an example,

#Edit configuration file

vi /etc/profile or ~username/.bash_profile
export TZ=/usr/share/zoneinfo/Asia/Kuala_Lumpur

Export “TZ” will overwrite /etc/sysconfig/clock or /etc/localtime setup. Mean that I can use Kuala Lumpur as my separate time zone for particular user in the same system eventhrough my primary timezone setup is GMT+0.

NTP setup
#Edit NTP configuration file

vi /etc/ntp.confserver 0.europe.pool.ntp.org

server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org
server your.ntp.server

#Restart NTP Server

rcxntpd xntpd restart

Hardware Clock

#showing hardware clock

hwclock --show

#set the system time from the hardware clock

hwclock --hctosys

#set the hardware clock from the system time

hwclock --systohc

Done!


After doing this verify your clock isn't drifting crazy by using ntpq and lpeers to figure out your clock delay offset and jitter numbers. Seems to work well, saves us some trouble in the future maybe it'll help someone else out of course.

Failing that this thread on the vmware community website illustrates the "clock=pit" option.

URL TO FOLLOW

It refers to this PDF:
http://www.vmware.com/pdf/vmware_timekeeping.pdf

2009/05/15

SSH Passwordless Authentication

http://blogs.translucentcode.org/mick/archives/000230.html was a great find today. Hail google. Hail clarity in technical documentation.

Keep in mind this is dangerous to do if you don't trust your overall account security, but for my purposes at work it's a great way to get something done.

2009/04/03

Playing with Crosstool

Not really playing.

Crosstool itself
A version of GCC to compile the compiler (usually something somewhat old)
A GCC Compiler to Compile (usually something new-ish)
A version of glibc
A "sanitized" version of the linux kernel headers


Google Search For Crosstool: http://www.google.com/search?q=crosstool
A quickie script to gather difference between(delta) two unix epoch seconds time values.


#!/usr/bin/perl
use warnings;
use strict;
use Date::Manip;
my $delta;
my $date1;
my $date2;
my $err = undef;
print "Thank you for running $0\n";

print "Enter Unix Time Seconds Value Start:";
chomp($date1 = <STDIN>);
$date1 = ParseDateString("epoch $date1");
print "Enter Unix Time Seconds Value Finish:";
chomp($date2 = <STDIN>);
$date2 = ParseDateString("epoch $date2");

$delta = DateCalc ($date1,$date2, \$err);
print "the \$delta is [$delta]\n";

2009/04/01

Bash Tidbit: environment variables after escaped semicolons

If you find yourself in need of embedding an environment variable in a path directly after an escaped semicolon (something that happens when you have version control tools like Telelogic, which use semicolons as a project toplevel node delimiter) it is possible to merely use backticks "`<around the command>`" to get the desired effect.

Say your default case on the command line to list the directory contents is thus:


ls /mnt/buford/d/teledb/ccm_wa/poobits01/foo.bar\;foo.bar99.99_int/foo.bar/


And you want the 'foo.bar99.99' to be something settable in a shell variable called $REL you then would insert the following to do such a thing:

REL=foo.bar99.99
ls /mnt/buford/d/teledb/ccm_wa/poobits01/foo.bar\;`echo $REL`_int/foo.bar/

2009/03/06

Time Wasting For Fun and Profit

Someone at work mentioned this gamey game: http://www.kongregate.com/games/garin/monsters-den-book-of-dread

Might try it, never know.

Cicada Period Blogging at it's finest.