Thursday, 28 May 2009

How to convert snoop output to read in Ethereal

Snoop to a file in Solaris
# snoop -o test.snoopraw

Transfer your file in binary mode to your windows machine.
under your wireshark installation folder find editcap application and convert your file to wireshark
"D:\Program Files\Wireshark\editcap.exe" "d:\testsnoopraw" "d:\testsnoopraw.snoop"

Wednesday, 20 May 2009

Load balance and failover in Red Hat with qla driver

OS Red Hat Enterprise Linux AS release 4 (Nahant Update 3)
HBA Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)

download and install driver hp_qla2x00src-8.01.03p4-20b
backup your initrd files under /boot directory.

# cat /proc/scsi/qla2xxx/0
# cat /proc/scsi/qla2xxx/1

See your LUNs there under "SCSI LUN Information:"
SCSI LUN Information:
(Id:Lun) * - indicates lun is not registered with the OS.
( 0: 0): Total reqs 3, Pending reqs 0, flags 0x0*, 1:0:81 00
( 0: 1): Total reqs 58, Pending reqs 0, flags 0x0, 1:0:81 00

cd /opt/hp/src/hp_qla2x00src/
# ./set_parm
Choice: 1
Writing new /etc/hp_qla2x00.conf...done
adding line to /etc/modprobe.conf: alias scsi_hostadapter1 qla2xxx_conf
adding line to /etc/modprobe.conf: alias scsi_hostadapter2 qla2xxx
adding line to /etc/modprobe.conf: alias scsi_hostadapter3 qla2300
adding line to /etc/modprobe.conf: alias scsi_hostadapter4 qla2400
adding line to /etc/modprobe.conf: alias scsi_hostadapter5 qla6312
adding line to /etc/modprobe.conf: options qla2xxx ql2xmaxqdepth=16 qlport_down_retry=30 ql2xloginretrycount=16 ql2xfailover=1 ql2xlbType=1 ql2xautorestore=0x80

Would you like to create a new initrd to reflect the changes in the parameters (Y/n)? Y
Creating new initrd - initrd-2.6.9-55.0.2.ELsmp.img

---Press ENTER to continue---

reboot server.

If you want to be sure disconnect fiber cables and test failover. You will see dmesg output like below

qla2300 0000:42:01.0: LOOP DOWN detected (2).
qla2x00: FAILOVER device 0 from wwn-> wwn- LUN 01, reason=0x2
qla2x00: FROM HBA 0 to HBA 1
qla2300 0000:42:01.0: LIP reset occured (f700).
qla2300 0000:42:01.0: LOOP UP detected (2 Gbps).
scsi(0) :Loop id 0x0081 is an XP device
qla2x00: FAILBACK device 0 -> wwn LUN 01
qla2x00: FROM HBA 1 to HBA 0

vmware booting USB-harddrives workaround

I have installed Ubuntu to my usb disk. And later try to open ubuntu on usb disk from vmware. Vmware could not boot from usb disk. So I attach my usb disk physically to Vmware guest.

Edit preferences
in the hardware tab, delete hard disk
click add
choose hard disk
use physical disk (for advanced user) click next
in the device tab select your usb disk, it is physicaldrive3 for me. You can identify with disconnecting and trying it again.
click next and boot your machine

HP Product Bulletin

The HP Product Bulletin application provides you with the latest QuickSpecs, photos, drawings etc.
It is good, if you are working with HP hardware

The HP Product Bulletin website is a convenient central resource providing technical overviews and specifications for HP hardware and software. The downloadable HP Product Bulletin application is loaded with features to aid with the purchase, sale and support of HP products.

Quick Quote
Product Photos
Locate by Name
Advanced Search Capabilities
Retired Products
Tip of the Day

Monday, 18 May 2009

Repair Master Boot Record

When installing Ubuntu you may delete MBR. MBR point grub instead of Windows bootloader. If you want to move Windows bootloader again you can use fixmbr command.
Fixmbr - Repair Master Boot Record with MBRFix from Windows 2000, XP etc. instead of using fdisk /mbr. FixMbr could help you recreating original master boot record (MBR) that works with any Windows (Win2k), XP, 95, 98 when Linux LILO damaged it.
download from here
If you have one disk enter this command. If you have more than 1 physicial hard disk (hard drive), you have to use proper number for your disk
mbrfix /drive 0 fixmbr

If you could not boot your OS then use Windows Cd boot in recovery mode and in the command prompt use fdisk /mbr

Thursday, 14 May 2009


Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process.

Get bootchart
# bunzip2 bootchart-0.9.tar.bz2
# tar xvf bootchart-0.9.tar
# cd bootchart-0.9
# ./
# vi /boot/grub/grub.conf
change default=0 which is "title Bootchart logging"
# bootchartd init
# reboot

For compiling image processing
rpm -ivh libgcj-src-4.3.2-7.i386.rpm
# yum --disablerepo=\* --enablerepo=alteredupdate,alteredbase,dag install ant.i386

# cd bootchart-0.9
run for java compiling
# ant

Run bootchart to get your image
# java -jar bootchart.jar
Parsing /var/log/bootchart.tgz
Wrote image: ./bootchart.png

Here is my boot process image fedora 10 running on Vmware

Comparison of SVN and CVS

Concurrent Versions System (CVS), also known as the Concurrent Versioning System, is a free software revision control system
Subversion (SVN) is a version control system , maintain current and historical versions of files such as source code, web pages, and documentation

You can find a comparison here

Tuesday, 12 May 2009

/var/spool/clientmqueue filling up

You can delete files in this directory.
Files are coming from script output in crontab. You can check which script causing this files with more and cat command in that directory
Edit your crontab file and add below to end of your crontab entries.
>/dev/null 2>&1

Thursday, 7 May 2009

Upgrade Fedora 7 to Fedora 8 Fedora 9 and finally to Fedora 10

Ok I am very late to upgrade from Fedora 7, but I found a mirror for Fedora 8 packages.

Fedora 7 to Fedora 8
# yum clean all

Get release files for fedora 8
# wget
# wget

Install release files
# rpm -Uvh fedora*

Create test.repo file /etc/yum.repos.d/test.repo
Add the lines below:

Now start upgrade process
# yum --disablerepo=\* --enablerepo=alterede upgrade

Fedora 8 to Fedora 9
# yum clean all

edit /etc/yum.repos.d/test.repo

# wget
# wget
# rpm -Uvh fedora-release-*
# yum --disablerepo=\* --enablerepo=alterede upgrade

Fedora 9 to Fedora 10

edit /etc/yum.repos.d/test.repo change line below

# yum clean all
# wget #
# wget
# rpm -Uvh fedora-release-*

# yum --disablerepo=\* --enablerepo=alterede upgrade

If avahi package fails Error: Missing Dependency: is needed by package avahi-0.6.17-1.fc7.i386 (installed)
do uninstall of avahi with noscripts option
# rpm -e avahi-0.6.17-1.fc7.i386 --noscripts

Receive remote machine syslog messages.

Edit /etc/sysconfig/syslog file
change SYSLOGD_OPTIONS="-m 0 "

Restart syslogd deamon
service syslog restart