nv-l
[Top] [All Lists]

loadhosts command

To: nv-l@lists.tivoli.com
Subject: loadhosts command
From: Don Davis <don-n-darla@WORLDNET.ATT.NET>
Date: Thu, 12 Nov 1998 20:38:48 -0500
Organization: APC, Inc
Reply-to: don-n-darla@worldnet.att.net
Sender: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
John,
The command is:    /usr/OV/bin/loadhosts   (with an "s")

These are several  interesting variations that I have used:
--------------------------------------------------------------------------------

These will add one node from the command line:
echo "<IP Address> <hostname>" | loadhosts -m 255.255.255.0
-- OR --
echo "<IP Address> <IP Address> | loadhosts -m 255.255.255.0

Note: The second variation above is for nodes that do not have a
hostname
--------------------------------------------------------------------------------

This will read input from any "etc/hosts-like" file:
awk  '{system("echo  "$1"   "$2" | loadhosts -m 255.255.255.0")}'
<filename>
--------------------------------------------------------------------------------

I'm sure thare are many variations, other than awk that will work here.
I just like awk.

"etc/hosts-like" means:
$1 = IP Address
$2 = hostname

Caution: If the Subnet Mask is not specified with the -m option and the
subnet that the node belongs to does not already exist, expect trouble.
The default Subnet Mask, according to the calss of the address will be
assumed. You know what happens when you assume.
Always specify the Subnet mask unless the default is known to be
correct.

=================================================
Don Davis - Consultant, Instructor
Alliance of Professionals & Consultants, Inc.
8600 Caswell Court
Raleigh, NC 27613-1100 USA    Phone: 919-847-6056
Email: Don@apc-services.com
Visit our web site at http://www.apc-services.com
=================================================

<Prev in Thread] Current Thread [Next in Thread>
  • loadhosts command, Don Davis <=

Archive operated by Skills 1st Ltd

See also: The NetView Web