June 29, 2009

Measure TCP Throughput using netcat (nc)

netcat (nc) is installed on almost all Linux computers. So when you do not have tools such as iperf available for TCP throughput testing, try the way of doing it with netcat.

On machine A, do :

nc -v -v -l -n -p 2222 >/dev/null

For redhat or Fedora Core do this instead:

nc -v -v -l -n 2222 >/dev/null

On machine B do:
time yes|nc -v -v -n 192.168.0.8 2222 >/dev/null

Now wait 30 seconds, and hit Ctrl-C on machine B, and you shoud get something like this:
sent 87478272, rcvd 0
real 0m9.993s
user 0m2.075s
sys 0m0.939s

Now calculate the throughput
87478272 * 8 / 9.993 (the nubmer above after real)

You can use python as a calculator to do this. :-)

Now that's pretty easy, isn't it?

June 10, 2009

tcpdump "received by filter"

When you use tcpdump on Linux, and do not see all the packets you are expecting, and get something like this:

10 packets captured
100 packets received by filter
0 packets dropped by kernel

Make sure you use "tcpdump -Nn ...". This disables tcpdump name lookup, and makes tcpdump much faster/real-time. It took me some time to find this out. Hope this helps.

June 4, 2009

How to change stored Network Printer Credentials

Try running on the problematic PC (XP), from the start/run box:
rundll32.exe keymgr.dll, KRShowKeyMgr
This should open the password management console. If your saved share is present, you should be able to delete it.
The following article outlines in detail
http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/AdminTips/Security/RemoveSavedPasswords.html