Re: Fully Qualified Hostname in ITM
John Alvord <jalvord-r/[email protected]>
| Newsgroups | gmane.comp.sysutils.tivoli.general,gmane.comp.sysutils.tivoli.tme10 |
|---|---|
| Message-ID | <OF0CA2F721.E8654F82-ON88257B2D.007961D4-88257B2D.0079D396@us.ibm.com> |
The L3 engineer who works on ITMhostName - he has lost 67% of his remaining hair working on this. Trying to figure handle all the different linux/unix combinations, some with /etc/hosts and some with DSN and some with broken responses. And then... matching the results up to some Java API result so everything is smooth... my mind boggles. He is really amazing, though. To handle an AIX environment where it was all but impossible to generate the "stop process" commands, he took the known start commands in /etc, converted them from start to stop in a Korn shell script and ran the result. Regards, John Alvord - Ph: 1-720-396-2788 Cell: none Customer Support - Tivoli Software - jalvord-r/[email protected] Advisory Engineer - Tivoli Monitoring - ITM infrastructure Follow us on Twitter! @Tivolisupport and Facebook Personalize your support needs with the IBM Support Portal Use Service Request to get assistance! For emails regarding a PMR, copy [email protected] For secure browser uploads: https://www.ecurep.ibm.com/app/upload For Customer Support guidance: IBM Software Support Handbook From: "[email protected]" <[email protected]> To: "Discussion list for Tivoli product and Tivoli Ready products." <[email protected]>, Date: 03/13/2013 03:03 PM Subject: Re: [TME10] Fully Qualified Hostname in ITM Sent by: [email protected] 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] _______________________________________________ TME10 mailing list [email protected] Unsubscribe:[email protected]