Thursday, April 16, 2009

HPUX check interface speed

root -> lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/0 0x000D9DAEFD96 0 UP lan0 snap0 1 ETHER Yes 119
0/2/0/0 0x00306EEAE178 1 UP lan1 snap1 2 ETHER Yes 119
root -> lanadmin -x 0
Current Config = 100 Full-Duplex AUTONEG

root->

UNIX: How to print column nicely using printf

[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...