Re: Fully Qualified Hostname in ITM
| Newsgroups | gmane.comp.sysutils.tivoli.general,gmane.comp.sysutils.tivoli.tme10 |
|---|---|
| Message-ID | <CAMzJ2Poe0XpsFr-h-JuGgaV_2bfrfop_gq+k51T3QLOR5YZLnw@mail.gmail.com> |
And you can see from the ITMhostName script (UNIX/Linux) itself that it
gets 4 potentially distinct hostname values from uname and hostname
variants:
# The hostname command returns the local host name.
localName=`uname -n`
localSName=`print $localName | cut -d'.' -f1`
# hostname value
localHName=`hostname 2>/dev/null`
# short hostname value
localHSName=`print $localHName | cut -d'.' -f1`
networkIP=""
networkName=""
networkSName=""
# This will first find the localname - then append to the same
# line the local hostname if the flag is specified and it is different
# than the localname
if [ "$Option" = local ]; then
[ "$Length" = long ] && localresult=$localName || localresult=$localSName
if [ "$Mode" = "many" ]; then
[ "$Length" = long ] && localhostname=$localHName ||
localhostname=$localHSName
if [ "$localhostname" != "$localresult" ]; then
localresult="$localresult $localhostname"
fi
fi
print $localresult
So it tries to cover the bases....
Toben
On Wed, Mar 13, 2013 at 10:59 AM, Loren Cain <[email protected]> wrote:
> There's a script called ITMhostName that seems to use every method
> imaginable (except the hostname command) to guess the hostname, but I'm not
> sure it's the only mechanism used by ITM, or if every part of ITM uses it
> consistently (it has a number of command line options).
>
> In my installation, I had to surgically remove much of that script because
> it was causing way too many problems, including long delays while
> attempting to query DNS servers that don't exist. Also, the watchdog
> process appears to use some other mechanism to determine the hostname,
> which was causing it to kill off my running agents at midnight because the
> hostnames didn't match (even case mismatch was enough to do it).
>
> Loren Cain
>
>
> On Wed, Mar 13, 2013 at 11:45 AM, Gregory Mendes <
> [email protected]> wrote:
>
>> Basic question.
>>
>> Where does the agents pull their fully qualified hostname from when there
>> are no /etc/hosts file? When I type hostname I get the FQN but when I
>> installed the agents I don't.
>>
>> I see RUNNINGHOSTNAME but it's not fully qualified.
>>
>> Regards,
>>
>> Gregory R. Mendes
>> Tivoli Architect/Tools Specialist
>> Mendes, Inc.
>> Tivoli Monitoring 6.2.3 Certified
>> 770-317-8593
>>
>>
>> _______________________________________________
>> TME10 mailing list
>> [email protected]
>> Unsubscribe:[email protected]
>>
>>
>
> _______________________________________________
> TME10 mailing list
> [email protected]
> Unsubscribe:[email protected]
>
>
--
"Sometimes I think that's the only right thing to do:
To dream. to live in the world of dreams.
But it doesn't last forever--wakefulness always comes to take me back..."
_______________________________________________
TME10 mailing list
[email protected]
Unsubscribe:[email protected]