Monday, May 30, 2011

HOW-TO: ifnconfig (HP-UX) as ifconfig (Linux)

To be able to see lan cards in HP-UX and its ip address similar as in Linux with ifconfig command, it is needed to make a little script:

1. make a new file:

vi /bin/lanshow

2. fill it with following data in it:

#!/bin/sh
netstat -ain | awk '$1 ~ /^lan/ && $1 !~ /:/ {print $1}' | sort | \
while read i
do
ifconfig $i
done

3. start it:

/bin/lanshow (or only lanshow)

Primer:
bash-4.2# /bin/lanshow
lan0: flags=2000000000001843
inet 192.168.1.1 netmask ffffff80 broadcast 192.168.1.255
lan1: flags=2000000000001843
inet 192.168.1.2 netmask ffffff80 broadcast 192.168.1.255



No comments:

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

This HOW-TO contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk pe...