Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Jul 6, 2011

How to measure the throughput of a network with ipmt Unix command


Ipmt, for IP measurement tools, is a set of tools able to carry out performance measurements on IP networks at the transport layer. tcpmt and udpmt are network performance measurement tools at the transport layer (respectively TCP and UDP). Every second, they generate a throughput report.
By default, they transmit on the discard port of the destination station. This means that, for UDP, the measured throughput at the sender cannot be the effective transmitted throughput since UDP is not reliable.
How to use them :
# tcpmt [-p port] [-s pktsz] [-n pktnb] host
# udpmt [-p port] [-s pktsz] [-n pktnb] host
Where :
port is the destination port number (discard, by default).
pktsz is the size of sent packets (1024 bytes by default) This parameter is only significant in the UDP context.
pktnb is the packet number to send (by default, press Control-C to stop the transmission).
host is the destination address.
A report is generated every second
  • transmission time (in ms since 0h),
  • the number of sent packets during the time interval,
  • the total number of sent packets,
  • the measured throughput during the time interval in kbit/s,
  • the average throughput on the last ten seconds,
  • the average throughput since the beginning.
tcptarget and udptarget are two programs which measure the trhoughput at the destination. Thay can be launched with no argument and they display the port number on which they are listening. We must use the -p option of tcpmt/udpmt in order to specify a port. As soon as tcptarget/udptarget start to receive packets, they display a report every second. This report is easier to understand than the sender report but it is less detailed. It displays the reception time in seconds with a precision around the millisecond and the throughput in kbit/s.
If you want to measure the behavior of concurrent flows sent on the same target station, Tcp/udptarget are the perfect tools since the arrival times are computed on the same station. Thus you can easily compare the packet arrival times of the different flows without having to synchronize the sending stations.

Jul 4, 2011

How to solve: No wireless networks in ubuntu 11.04


Problem: Recently I installed Ubuntu 11.04 (wireless was working while installing) on my Dell Inspiron N4010 which uses Broadcom Wireless Adapter (How to know which network adapter you are using?). Wireless networks were even available when I fused it for the first time after installing. Then there were message from Ubuntu that restricted drivers are available for Broadcom STA (BCM4311) (why did it ask me to download the wireless drivers when wireless was working on the first hand..??). Any ways, I said, why not? I clicked on the activate button. It installed the driver and asked me to restart the computer. I restarted it and there you go. Wireless is on. But it detects no networks. I know there are wireless networks but Ubuntu is not detecting any wireless networks.
Reason: The reason what I think is some compatibility issues (its probably a bug in 11.04) with this version of Ubuntu and the restricted driver because same driver was working quite well in previous versions of Ubuntu.
Solution: Here is what you need to do. Use other Broadcom drivers. Download these drivers (from Windows or through wired network or a friend’s computer or from wherever you are reading this article :) ).
(Don’t know which Ubuntu you are using? Click here: Check you Ubuntu architecture)
Now remove the previous drivers in Ubuntu 11.04 by using: sudo apt-get remove bcmwl-kernel-source
Now install the appropriate driver (you have downloaded from the above links). Restart your computer. If restarting doesn’t work try shut down and then start it (strange…but works). Enjoy :)
Alternate Solution 1: If you could connect through a wired network, this solution might work for you. The problem is with STA drivers so better to deactivate/uninstall it.
§  Remove the STA driver from Additional Drivers
§  Open synaptic packet manager and install b43-fwcutter then firmware-b43-installer
§  Restart
Alternate Solution 2: People who cannot solve the problem with the above specified method may want to try this one. Here you go:
§  open the ‘Synaptic Package Manager‘ and search for ‘bcm’
§  uninstall the ‘bcm-kernel-source‘ package
§  make sure that the ‘firmware-b43-installer‘ and the ‘b43-fwcutter‘ packages are installed
§  type into terminal:
§  cat /etc/modprobe.d/* | egrep '8180|acx|at76|ath|b43|bcm|CX|eth|ipw|irmware|isl|lbtf|orinoco|ndiswrapper|NPE|p54|prism|rtl|rt2|rt3|rt6|rt7|witch|wl'
  • (you may want to copy this) and see if the term ‘blacklist bcm43xx‘ is there
  • if it is, then type cd /etc/modprobe.d/ and then sudo gedit blacklist.conf put a # in front of the line: blacklist bcm43xx then save the file (I was getting error messages in the terminal about not being able to save, but it actually did save properly).
  • reboot
Hopefully this works for you all!
Questions, suggestions and feedbacks are welcomed.

How to know if I’m running 32 bit or 64 bit Ubuntu?


There are several ways to know the architecture of the Ubuntu you are using. I prefer “uname” command to find it out.
Type in the terminal: uname -a
Output: Linux desktop-name 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux


Conclusion: x86_64 (or i686) denotes 64 bit and x86 (or i386) represents 32 bit.
Extra: To know the processor: “uname -p”
To know the hardware platform: “uname -i”
To know machine hardware name: “uname -m”
In all the above cases: x86_64 (or i686) denotes 64 bit and x86 (or i386) represents 32 bit.

Jun 13, 2011

How to Find a MAC Address in Ubuntu

Any computer connected to a network, whether wireless or otherwise, has a unique identifier, called a MAC address, which is hard-wired to the machine's network card. This address identifies the machine to the other computers on the network, as well as any gateways associated with that network. Discovering the MAC address of your Ubuntu computer is easily done using the Terminal application.

Instructions
1. Log in to your Ubuntu machine. You may need to use an account that has administrator permissions, as all accounts may not have access to the network configuration.

2. Click "Applications" from the desktop menu, followed by "Accessories" and then "Terminal."


3. Type "ifconfig" and hit "Enter." The first block of text, which corresponds to the first active Ethernet adapter on the machine, contains the MAC address, which in the Ubuntu terminal is referred to as "HWaddr." Look for "HWaddr," followed by six blocks of two-character strings, separated by colons to find your MAC address.