Tomasz Korwel
programmer, administrator, engineer - my everyday fights with reality

July 30th, 2006

HVAC disaster

Posted by tomasz in HVAC Zoning, Home Improvements

We finally moved in to our new house. After couple of days spent on cleaning, unpacking and making ourselves comfortable we figured out one thing - the HVAC system is just a disaster.

First - the thermostat is in the worst place in the house. Simply first test shows that while the thermostats shows 1 degree differences, the actual temperature it that room floats more than 2 degrees in each direction.

Second - all registers are broken - none of them shuts completely and none of them works smooth

Third - the A/C unit and fan are probably undersized (I still have to make measurements) - it needs to work for more than 1h to cool down the room by 1 degree.

A lot of work is waiting but it only makes me more motivated to quickly finish that project.

Technorati Tags: , , , ,

July 24th, 2006

We are home owners!

Posted by tomasz in Life

Heh, It was easier than we tought it may be. Probably because our bad expiriences from Poland where you have to show to the bank that you absolutely don’t need a loan to get one.

Anyway, since now we are proud home owners. Strange feeling - till now I have never had enything worth more than couple thousands :-)

More interesting news later, so stay tuned.

Technorati Tags:

July 20th, 2006

Debian syslog replacement

Posted by tomasz in Work

Standard way how Debian is logging things always made me crazy. Why the hell this daemon is logging everything 5 times? Why do I have to see mail logs in syslog file? Anyway, I started to look for some better solution and at one point I came on article describing installation and configuration if the standard syslogd replacement: syslog-ng. I decided to give it a try.

As the whole process is almost trivial I’ll put here only couple info

First - syslog-ng configuration file

The file is under /etc/syslog-ng/syslog-ng.conf

#
# Configuration file for syslog-ng under Debian
#

# the standard syslog levels are (in descending order of priority):
# emerg alert crit err warning notice info debug
# the aliases “error”, “panic”, and “warn” are deprecated
# the “none” priority found in the original syslogd configuration is
# only used in internal messages created by syslogd

######
# options

options {
chain_hostnames(0);
time_reopen(10);
time_reap(360);
sync(5);
log_fifo_size(2048);
create_dirs(yes);
owner(root);
group(root);
perm(0640);
#dir_owner(root);
#dir_group(root);
dir_perm(0755);
use_dns(no);
#log_msg_size(2048);
stats_freq(0);
};

######
# sources

source int { internal(); };
source main { unix-stream(”/dev/log”); };
source kernel { file(”/proc/kmsg” log_prefix(”kernel: “)); };

######
# destinations

destination mail { file(”/var/log/mail.log”); };
destination kernel { file(”/var/log/kernel.log”); };
destination messages { file(”/var/log/messages”); };
destination sshd { file(”/var/log/ssh.log”); };

######
# filters
filter mail { facility(mail); };
filter sshd { program(”ssh”); };

######
# logs
# order matters if you use “flags(final);” to mark the end of processing in a
# “log” statement

# these rules provide the same behavior as the commented original syslogd rules

log { source(kernel); destination(kernel); };
log { source(main); filter(sshd); destination(sshd); flags(final); };
log { source(main); filter(mail); destination(mail); flags(final); };
log { source(main); source(int); destination(messages); };

Little explanation:

  • Sources - defines sorce of incomming lg message. To be honest I didn’t dig deeper about meanings of every line there - it works.
  • Destinations - the name says it all - places (not only files) where messages ends.
  • Filters - again - rules allowing you to filter some messages out
  • Logs - the actual place where something happens. You decide here, from which source, with which filter applied to which destination message goes. Simply, clean and effective.

Second - logrotate script

As you may noticed as an output we have 4 files. I personally preferr to save them for a little longer. So my logrotate file for syslog looks like:

/var/log/ssh.log {
rotate 52
weekly
missingok
notifempty
compress
}

/var/log/kernel.log {
rotate 52
weekly
missingok
notifempty
compress
}

/var/log/mail.log {
rotate 52
weekly
missingok
notifempty
compress
}

/var/log/messages {
rotate 52
weekly
missingok
notifempty
compress
postrotate
/etc/init.d/syslog-ng reload >/dev/null
endscript
}

Please notice the postrotate part at the end of the file. It forces syslog-ng to writo to the new files.

Third - logcheck

Why would we need to have nicely divided logs without automated monitoring - here comes the logcheck. Here the only worth to mention change is a list of monitored files:

comp# cat /etc/logcheck/logcheck.logfiles
# these files will be checked by logcheck
# This has been tuned towards a default syslog install
/var/log/mesages
/var/log/kernel.log
/var/log/ssh.log
/var/log/mail.log
/var/log/auth.log

Don’t forget to teach your antispam filter to accept logcheck’s reports!

Technorati Tags: , , ,

July 17th, 2006

New GPS receiver

Posted by tomasz in Geocaching

We started geocaching earlier this year. First I was pretty skeptical about how Iza will like it but it turned out that she loves it. As she says it’s the only acceptable way to make hiking a little less boring. And we need hiking, you know why :-)

The bad side about me being not sure if we are going so hooked is that I actually bought the cheapest GPS receiver I could find on eBay. I have chosen Magellan GPS 300 for it’s ability to connect with computer. It wasn’t that bad especially when I mated it with Palm IIIc with GeoNiche on board.

Unfortunately last week our GPSr decided to quit his job and we ended up with having the unit showing that we are moving 150mph when we actually were standing still. It was high time to find something a little better for our needs.

After carefully checking gps related websites I wanted unit which has:

  1. ability to show maps
  2. at least 8MB of RAM
  3. ability to upload maps from my PC and to serve as a GPSr for my PC routing software
  4. SD (or MMC) reader for expanding memory
  5. electronic compass would be a very nice feature

Of course my budget was very tight so I ade to choose very carefully. After loosing in almost 30 auctions (my sniper started to complain about hard duty) I managed to win a Magellan Meridian Platinum. Yes it is just discontinued by Magellan but it has all those features I need and still I paid less then any new eTrex or eXplorist.

Now I’m waiting for package…

Technorati Tags: , , , , ,

July 15th, 2006

Things to consider before you hire Indian programmer

Posted by tomasz in Work

I’m writing this post after recently having some problems with Indian programmers hired by my client to be my coworkers. My filings were so bad that I started to ask my Indian friends what do they think about their countrymen. Things I have heard made my hair gray instantly. Here are two examples what you can expect.

Fake experience

Sandhya (one of my Indian friends) said that about 70% of Indian programmers put a lot of fake experience in their resumes. So when you came to the point of reviewing ones:

  • sum the years of experience. If it turns out that the guy started to work as a programmer when he was 8 years old, the big red lamp should go off in your head. Off course it is possible that he was working for couple companies at the same time - but it also isn’t good forecast of good cooperation.
  • Always, I repeat always, check that experience with their employers. 5 minutes spent on a phone call can save you a lot of nerves in the future.
  • Ask about examples of their work. They usually are very cooperative and show you a lot of code. I won’t tell you how the good code should look like - if you have any good programmer you know - compare the styles.

Switching people during phone interview

So you think you are smart, because you called him and from what he told he it looks like he is a good programmer? Are you sure that you were talking with the person you want to hire?

And finally remember the golden rule:

Only poor people can afford cheap things.

Technorati Tags: , ,

Next Page »
ZEND Certified Engineer
Listed on BlogShares