CCNA

CCNA certificate logo

I have finally received my first Cisco certificate. Now I can legally put here the logo.

Well, in fact, I could do that as soon as my exam results were approved, but I wanted to get my printed certificate.

Apple Care doesn't care much in Russia

In U.S.A you you can come to AppleStore with broken MacBook saying, that it was you only mean of earning money and they would give you a brand new one in a couple of days.

Yesterday exactly 3 months has passed since I have left my MacBook Pro 17" in service center. Well, this MBP is not actually mine, but is given to me by my employer, but this doesn't really matter. Guys at local authorized Apple reseller im.Time (site in Russian) keep saying the replacement motherboard is being delayed by Russian customs.

Passed ICND2 (1000/1000)

Have passed ICND2 today. 1000/1000 - I'm a bit surprised. I feel like it was even easier than ICND1. Now awaiting confirmation from cisco.

bsnmp-ucd returns incorrect value of ssCpuRawSoftIRQ

I was researching an issue with high system part of CPU load at one of our servers. While working on it I fond that bsnmp-ucd we use to monitor our server reports incorrect value of ssCpuRawSoftIRQ. According to MIB it must be "The number of 'ticks' (typically 1/100s) spent
processing software interrupts." bsnmp-ucd uses value of vm.stats.sys.v_soft sysctl, which in turn is just a number of software interrupts. Hope I'll have a time to send bug report.

Update. Here is the patch:

--- ucd_tree.def.orig   2010-06-08 10:16:58.000000000 +0400

How to quickly update old-style <? to <?php

Today I was updating a bunch of .php files transferred from old hosting to a new platform. Many of them had old-style tags denoting the beginning of php block.
To quickly replace <? with <?php I used the following command:

find . -type f ! -path '*/.svn/*' \( -name '*.php' \) -print0 | xargs -0 sed -E -e '/<\?[[:space:]]/ s/<\?([[:space:]])/<?php\1/g' -e 's/<\?=[[:space:]]*((([^?])|(\?+[^?>]))+[^[:space:]])[[:space:]]*\?>/<?php echo(\1); ?>/g' -e '/<\?$/ s/<\?$/<?php/g' -e '/<\?[^[:alpha:]]/ s/<\?([^[:alpha:]])/<?php \1/g' -i '.bak'

New site

Welcome to my new site.
I should have done this long time ago, but until recent I had no time.
Feel free to criticize :-)