Thursday, April 28, 2011

HPUX: check duplex on 11.0

root: /root/home/root -> netstat -i
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan1 1500 10.2.18.0
324582173 0 380503067 0 0
lan0 1500 153.88.127.0
343512775 0 1606306136
root: /root/home/root -> lanscan -p
0
1
900
901
902
903
904


root: /root/home/root -> lanadmin -x 0
Speed = 1000 Full-Duplex.
Autonegotiation = On.

root /root/home/root -> lanadmin -x 1
Speed = 1000 Full-Duplex.
Autonegotiation = On.

HPUX: Determine if disk is mirrored

root: /opt -> lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/disk/disk4_p2 -- Boot Disk
/dev/disk/disk5_p2 -- Boot Disk
Boot: lvol1 on: /dev/disk/disk4_p2
/dev/disk/disk5_p2
Root: lvol3 on: /dev/disk/disk4_p2
/dev/disk/disk5_p2
Swap: lvol2 on: /dev/disk/disk4_p2
/dev/disk/disk5_p2
Dump: lvol2 on: /dev/disk/disk4_p2, 0

root : /opt ->

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...