Saturday, April 11, 2009

Ebay virtual game items prohibited? - How to list an item on ebay?

Ebay bans the listing of virtual game items such as
currency, leveling etc. To get around this you have to
ensure that you remove all non-word strings such as
Rs2 from the listing. This worked for me.

If it does not - contact ebay support. Search for not
able to list an item and select a topic that best
matches your problem description. If you chose to
do a live chat, ebay wil resolve the issue for you
right away.

Friday, April 10, 2009

write2 failed: Iperf error

I encountered this error today when I was testing performance
of a link. I am not quite sure if this error is a bug due to
a specific version of iperf, but was able to get around it
by reducing the size of the transmitted packet as compared to
the MTU. By default iperf uses a 1470byte packet for transmission,
cutting down that size below 1440bytes (with MTU of 1500) helped
remove the error.

Again I am not sure if this is a version error and the solution
posted here is just a quick fix.

Thursday, April 9, 2009

Command to check port usage

A simple linux command by the name netstat does it.
Usage is -
$> netstat -a

Using the -a switch shows the ports that are both listening
and not listening at the moment. Such a tool is useful
for debugging services which are connection based such
as webservers and sockets.

How to install complete kernel source centos

The process has a few key steps -

1. Determine your kernel version by doing -
uname -a

Determine your current distro version by -
cat /etc/*release*


Download the relevant source from the centos mirror at -
http://mirrors.kernel.org/centos/ver/updates/SRPMS/

where the ver is based on the version
of the distribution. The kernel src rpm is usually by the name
of kernel-{kernel version}.src.rpm

2. Install the source by -
$> rpm -ivh kernel*.src.rpm


3. Prepare the kernel source by applying proper patches
cd /usr/src/redhat/SPECS
$> rpmbuild -bp --target $(arch) kernel-2.6.spec

If it says that rpmbuild is not found, do a yum install on
rpm-build to get the utility. The -bp switch does the patch
application.

4. Move and link it;

# cd /usr/src/redhat/BUILD/kernel-{version} /usr/src/
$> mv linux-{ver} /usr/src/
$> cd /usr/src
$> ln -s ./linux-{ver} linux
$> cd /usr/src/linux


You are done. The /usr/src/linux directory has all the current
kernel source code. Not you need to do this procedure if
you need the entire source and not just the current kernel
source code.

Tuesday, April 7, 2009

Why is savings rate high in india

This comparison is mainly done with developed economies
such as US or Europe. Typically the savings rate such
as India and China can be as high as 25% and 50%
respectively. This may be attributed to the lack
of financial security measures like social security
which are provided by the government.

Monday, April 6, 2009

What is high relief on a coin

Relief on a coin refers to the
design of a coin such that it has a high point on the surface
of a coin. Such a design is very popular among collectors and
requires special effort, since it might require multiple strikes
or high pressure to push the metal to the highest point on the
die. Mass producing such coins in old times was not possible
due to which many coin designs such as the St Gaudens eagle
coin was not made available by the US mint until now.

Sunday, April 5, 2009

How to write a shell/C code to obtain Hardware/MAC address

We present 6 alternatives to obtain the hardware
addresses programatically through a shell script.
These scripts may be run independently or may be
invoked through C code with the
system() calls.

Considering that an ifconfig
on the node generates the output that yields the following
lines -
infinity:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:XX:YY:ZZ:WW:QQ
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:10



Each of the following lines of code can be run independently
to obtain the hardware address. Again, they may be invoked through
the C system command to obtain the address in C.

ifconfig eth0 | grep HWaddr | tail -c 20


ifconfig eth0 | grep HW | awk '{print $5}'


ifconfig eth0 | grep HW | cut -d' ' -f 11


ifconfig eth0 | head -1 | awk '{print $5}'


ifconfig eth0 | head -1 | cut -d' ' -f 11


ifconfig eth0 | head -1 | tail -c 20