<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 09:38:49 Friday, 4 November 2011 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.2d8b867a-877d-4abf-9f71-702c0dd4ea36 {
        MARGIN: 0cm 0cm 0pt
}
LI.2d8b867a-877d-4abf-9f71-702c0dd4ea36 {
        MARGIN: 0cm 0cm 0pt
}
DIV.2d8b867a-877d-4abf-9f71-702c0dd4ea36 {
        MARGIN: 0cm 0cm 0pt
}
TABLE.2d8b867a-877d-4abf-9f71-702c0dd4ea36Table {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place" /><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]--><style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="blue">
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36"></p>
<div class="Section1">
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">I feel fairly confident /etc/hosts is NOT cached because of a recent experience I had with NetBackup 7.1 which does its own caching (unbeknownst
 to me) that was causing issues when I was modifying /etc/hosts.&nbsp;&nbsp; More fun was had when it turned out that HP-UX had a separate entry in nsswitch.conf for using the newer IPv6 lookup routines other than hosts line (luckily Linux doesn’t but I saw postings
 at the time that suggests Solaris does).&nbsp;&nbsp; NBU 7.1 also uses those newer IPv6 routines whereas many of the OS level commands weren’t unless I was specifically trying to use IPv6.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">You can check with something like ping or telnet after edit of /etc/hosts.&nbsp;&nbsp; They’ll show you the IP they’re trying.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Of course getent hosts &lt;hostname&gt; will read /etc/hosts but I’m not sure that
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">I really find it hard to believe that an /etc/hosts lookup is causing you serious delays unless the drive /etc/hosts is on is doing things
 it shouldn’t.&nbsp;&nbsp; For one thing the hosts lookup doesn’t have to make a network call like the DNS lookup would.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Of course we’re assuming you’re not using some other name service like
<st1:City w:st="on">NIS</st1:City> or <st1:City w:st="on"><st1:place w:st="on">NIS&#43;</st1:place></st1:City> and that your nsswitch.conf has files before dns on the hosts line.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"></span></font></div>
</div>
</div>
<p></p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36">&nbsp;</p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36">&nbsp;</p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36"></p>
<div class="Section1">
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">
<hr size="2" width="100%" align="center" tabindex="-1">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> ale-bounces@ale.org [mailto:ale-bounces@ale.org]
<b><span style="font-weight:
bold">On Behalf Of </span></b>leam hall<br>
<b><span style="font-weight:bold">Sent:</span></b> Friday, November 04, 2011 8:31 AM<br>
<b><span style="font-weight:bold">To:</span></b> Atlanta Linux Enthusiasts<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [ale] /etc/hosts and caching</span></font><o:p></o:p></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">I use it as it is turned on everywhere I've worked. I've not seen any data that suggests it is a problem, but I'd be happy to see some facts.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">&nbsp;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Leam<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">On Fri, Nov 4, 2011 at 8:24 AM, Chesser.Damon &lt;<a href="mailto:Damon.Chesser@suntrust.com">Damon.Chesser@suntrust.com</a>&gt; wrote:<o:p></o:p></span></font></p>
<div vlink="purple" link="blue">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="#1f497d" face="Times New Roman"><span style="font-size:11.0pt;
color:#1F497D">Thanks for the reply, that is how I thought it worked also.&nbsp; As for nscd, someone
 on this list said “Don’t.&nbsp; Use. It.”&nbsp; </span></font><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="#1f497d" face="Times New Roman"><span style="font-size:11.0pt;
color:#1F497D">&nbsp;</span></font><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="#1f497d" face="Times New Roman"><span style="font-size:11.0pt;
color:#1F497D">Any other opinions on it?</span></font><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="#1f497d" face="Times New Roman"><span style="font-size:11.0pt;
color:#1F497D">&nbsp;</span></font><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="#1f497d" face="Times New Roman"><span style="font-size:11.0pt;
color:#1F497D"><a href="mailto:Damon@damtek.com" target="_blank">Damon@damtek.com</a></span></font><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="#1f497d" face="Times New Roman"><span style="font-size:11.0pt;
color:#1F497D">&nbsp;</span></font><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><font size="2" face="Times New Roman"><span style="font-size:10.0pt;font-weight:bold">From:</span></font></b><font size="2"><span style="font-size:10.0pt">
<a href="mailto:ale-bounces@ale.org" target="_blank">ale-bounces@ale.org</a> [mailto:<a href="mailto:ale-bounces@ale.org" target="_blank">ale-bounces@ale.org</a>]
<b><span style="font-weight:bold">On Behalf Of </span></b>leam hall<br>
<b><span style="font-weight:bold">Sent:</span></b> Friday, November 04, 2011 8:17 AM<br>
<b><span style="font-weight:bold">To:</span></b> Atlanta Linux Enthusiasts<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [ale] /etc/hosts and caching</span></font><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;<o:p></o:p></span></font></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Good morning Damon!<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">As far as I can tell by editing /etc/hosts on a RHEL 4 box, the IP addresses are not cached longer than it takes
 me to edit the file. I believe your server will alwyas look in /etc/hosts anyway, per the /etc/nsswitch.conf file. The normal hosts line is something like:
<o:p></o:p></span></font></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;&nbsp; hosts:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; files dns<o:p></o:p></span></font></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">There is the program nscd and it's config file, ncsd.conf. This configures some caching for you but I *think*
 it's more DNS related than affecting /etc/hosts. <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Hope that helps.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Leam<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">On Fri, Nov 4, 2011 at 7:40 AM, Chesser.Damon &lt;<a href="mailto:Damon.Chesser@suntrust.com" target="_blank">Damon.Chesser@suntrust.com</a>&gt;
 wrote:<o:p></o:p></span></font></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">This dovetails into building a DNS caching server I asked earlier this week.&nbsp; The issue is we are seeing latency
 in our application and a possible (but only possible, not proven) issue might be host lookups.&nbsp; I figured that an entry into /etc/hosts would be faster than a WAN DNS lookup especially since the IP is static.&nbsp; Someone was concerned with disk reads and that
 becoming a bottleneck.&nbsp; Someone else pointed out that /etc/hosts file was cached.&nbsp;
<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">This started a google search by me to find out if that was true or not.&nbsp; Totally inconclusive.&nbsp; Some have reported
 issues with not being able to get the Linux box to re-read the hosts file after a change was committed short of a reboot or init restart.&nbsp; Others have said just make the change and it shows up.&nbsp; I have not found any documentation saying whether it was cached
 or not.&nbsp; Any smart guys know the answer or can provide any documentation on that?&nbsp; It’s kind of funny, you think you KNOW something until someone says “Prove it”.<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><a href="mailto:Damon@damtek.com" target="_blank">Damon@damtek.com</a><o:p></o:p></span></font></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;<o:p></o:p></span></font></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;</span></font><font face="Courier"><span style="font-family:Courier">
</span></font><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Courier"><span style="font-size:12.0pt;font-family:Courier">&nbsp;</span></font><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Courier"><span style="font-size:12.0pt;font-family:Courier">&nbsp;</span></font><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">LEGAL DISCLAIMER<br>
The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information
 by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer.<br>
&nbsp;<br>
SunTrust is a federally registered service mark of SunTrust Banks, Inc. Live Solid. Bank Solid. is a service mark of SunTrust Banks, Inc.<br>
[ST:XCL]</span></font><font face="Courier"><span style="font-family:Courier"> </span>
</font><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><o:p></o:p></span></font></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
<br clear="all">
<br>
-- <o:p></o:p></span></font></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a><o:p></o:p></span></font></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">&nbsp;<o:p></o:p></span></font></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><o:p></o:p></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><br>
<br clear="all">
<br>
-- <o:p></o:p></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a><o:p></o:p></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>
</div>
<p></p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36"><font face="Arial"><font color="fuchsia"><font style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" size="2"></font></font></font>&nbsp;</p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36">&nbsp;</p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36"><font face="Arial"><font color="fuchsia"><font style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" size="2">Athena<font size="1">®</font>, Created for the Cause</font><font size="1">™
</font></font></font></p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36"><font size="2" face="Arial">Making a Difference in the Fight Against Breast Cancer</font></p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"></span>&nbsp;</p>
<p class="2d8b867a-877d-4abf-9f71-702c0dd4ea36"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">---------------------------------<br>
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information
 is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.<br>
----------------------------------</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"><o:p></o:p></span></p>
<p>&nbsp;</p>
</body>
</html>