Archive for August, 2007

Check Current Available Bandwidth

Saturday, August 11th, 2007

Welcome to Bandwith Check Utility Home page.

Bandwidth Check is a small utility that helps an administrator measure the available bandwidth. In order to make use of this utility, you will need to turn on the chargen service, which is provided in many inetd implementations.

In order to make use of this utility, you will need to turn on chargen protocol.

To enable chargen on Linux:
create the following file /etc/xinetd.d/charge
service chargen
{
type = INTERNAL
id = chargen-stream
socket_type = stream
protocol = tcp
user = root
wait = no
disable = no
}
service xinetd restart

To Compile bwcheck
gcc -o bwcheck bwcheck.c

To execute
./bwcheck

./bwcheck 172.16.11.2
Throughput: 73390.74 kb

FINDMAC

Saturday, August 11th, 2007

I have written a script to search for mac address on a cisco network – findmac 1.3b2

findmac is a utility written in Perl that helps administrators find out exactly which switch and which port a host is patched into. Only CISCO equipment with CDP enabled is currently supported. It is a very useful tool for administrators of large scale CISCO networks.

You can download it from here –
http://www.vicosys.com.hk/findmac/findmac.v13b2.tar.gz

# ./findmac.pl -h pigeon

Quote:
findmac 1.0 by Terence Chan (26 Feb 2003)pigeon Mac Address is 08:00:20:A9:C3:E0
08:00:20:A9:C3:E0 is found on 172.16.188.155 port FastEthernet0/1

# ./findmac.pl -m 00-00-0c-07-ac-10

Quote:
findmac 1.0 by Terence Chan (26 Feb 2003)This is a router.
00-00-0c-07-ac-10 is found on 172.16.2.1 port 3/1

#./findmac.pl -i -p -h pigeon

Quote:
findmac.pl 1.3b by Terence Chan (6 March 2003)pigeon MAC Address is 08:00:20:A9:C3:E0
12F17.HF.SWT-A (172.16.2.1) port 3/6 => (172.16.188.155)
sw-mcr-backbone-02 (172.16.188.155) port FastEthernet0/19 => (172.16.188.150)
sw-mcr-backbone-01 (172.16.188.150) port FastEthernet0/1 => 08:00:20:A9:C3:E0

mysql export import

Monday, August 6th, 2007

This show you how to backup and restore mysql db.

Export
mysqldump -u root -h localhost -p db_name > db_name

Import
mysql -u mysql_account-p -h localhost db_name< db_name