Re: [gentoo-user] Slow startx - Why does hostname -f hang?
On Sunday 04 Jan 2015 16:06:50 Urs Schütz wrote: Hi list While hunting down slow startx times (12-16s instead the usual 2-5s) I found that hostname -f tries to resolve the hostname. This is a slow process (timeout?): urs@cadd ~ $ time hostname -v gethostname()=`cadd' cadd real0m0.001s user0m0.000s sys 0m0.001s urs@cadd ~ $ time hostname -v -f gethostname()=`cadd' Resolving `cadd' ... Result: h_name=`cadd' Result: h_addr_list=`127.0.0.1' cadd real0m10.011s user0m0.000s sys 0m0.001s urs@cadd ~ $ man hostname ...snip... -f, --fqdn, --long Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a short host name and the DNS domain name. Unless you are using bind or NIS for host lookups you can change the FQDN and the DNS domain name (which is part of the FQDN) in the /etc/hosts file. ...snip... My /etc/hosts.conf orders hosts before bind: urs@cadd ~ $ grep order /etc/host.conf # recognized are order, trim, mdns, multi, nospoof, spoof, and reorder. order hosts, bind I do not run any NIS or bind services. I solved the slow startx by replacing hostname -f by hostname in the /usr/bin/startx script, but still feel that I'm missing the real cause for the slow hostname lookup. I do not have a DNS domain name definition in /etc/hosts. I do run networkmanager. Any hints where to search? What is the recommended way for /etc/hosts? I'm at a simple home network, behind a NAT cable modem, and do not have a dns domain name. Thanks for any hints. Urs In my /etc/hosts I have something like this: # IPv4 and IPv6 localhost aliases 127.0.0.1 cad.homeLAN localhost cad ::1 cad.homeLAN localhost cad See if this solves your problem. PS. I remember a thread in this M/L about the correct way to configure a domain name and why how the Gentoo Handbook was wrong. I think there was a bug opened about it, too. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Slow startx - Why does hostname -f hang?
Am Sonntag, 04.01.2015 um 14:06 schrieb Urs Schütz u.sch...@bluewin.ch: Hi list While hunting down slow startx times (12-16s instead the usual 2-5s) I found that hostname -f tries to resolve the hostname. This is a slow process (timeout?): Normally this is a fast process. See my results below. urs@cadd ~ $ time hostname -v gethostname()=`cadd' cadd real0m0.001s user0m0.000s sys 0m0.001s user@puter ~ $ time hostname -v gethostname()=`puter' puter real0m0.003s user0m0.000s sys 0m0.000s urs@cadd ~ $ time hostname -v -f gethostname()=`cadd' Resolving `cadd' ... Result: h_name=`cadd' Result: h_addr_list=`127.0.0.1' ^ Does your computer only have an IP address for your localhost? cadd real0m10.011s user0m0.000s sys 0m0.001s user@puter ~ $ time hostname -v -f gethostname()=`puter' Resolving `puter' ... Result: h_name=`puter.local' Result: h_aliases=`puter' Result: h_addr_list=`192.168.44.32' puter.local real0m0.005s user0m0.003s sys 0m0.003s What is the recommended way for /etc/hosts? I'm at a simple home network, behind a NAT cable modem, and do not have a dns domain name. What is the content of your /etc/hosts file? This is my hostfile: 127.0.0.1 localhost ::1 localhost 192.168.44.32 puter.local puter Regards wabe
Re: [gentoo-user] Slow startx - Why does hostname -f hang?
On 01/04/15 15:20, Mick wrote: On Sunday 04 Jan 2015 16:06:50 Urs Schütz wrote: Hi list While hunting down slow startx times (12-16s instead the usual 2-5s) I found that hostname -f tries to resolve the hostname. This is a slow process (timeout?): urs@cadd ~ $ time hostname -v gethostname()=`cadd' cadd real0m0.001s user0m0.000s sys 0m0.001s urs@cadd ~ $ time hostname -v -f gethostname()=`cadd' Resolving `cadd' ... Result: h_name=`cadd' Result: h_addr_list=`127.0.0.1' cadd real0m10.011s user0m0.000s sys 0m0.001s urs@cadd ~ $ man hostname ...snip... -f, --fqdn, --long Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a short host name and the DNS domain name. Unless you are using bind or NIS for host lookups you can change the FQDN and the DNS domain name (which is part of the FQDN) in the /etc/hosts file. ...snip... My /etc/hosts.conf orders hosts before bind: urs@cadd ~ $ grep order /etc/host.conf # recognized are order, trim, mdns, multi, nospoof, spoof, and reorder. order hosts, bind I do not run any NIS or bind services. I solved the slow startx by replacing hostname -f by hostname in the /usr/bin/startx script, but still feel that I'm missing the real cause for the slow hostname lookup. I do not have a DNS domain name definition in /etc/hosts. I do run networkmanager. Any hints where to search? What is the recommended way for /etc/hosts? I'm at a simple home network, behind a NAT cable modem, and do not have a dns domain name. Thanks for any hints. Urs In my /etc/hosts I have something like this: # IPv4 and IPv6 localhost aliases 127.0.0.1 cad.homeLAN localhost cad ::1 cad.homeLAN localhost cad See if this solves your problem. PS. I remember a thread in this M/L about the correct way to configure a domain name and why how the Gentoo Handbook was wrong. I think there was a bug opened about it, too. Setting up /etc/hosts exactly as above did resolve the slow hostname -f lookup. urs@cadd ~ $ time hostname -v -f gethostname()=`cadd' Resolving `cadd' ... Result: h_name=`cadd.homeLAN' Result: h_aliases=`localhost' Result: h_aliases=`cadd' Result: h_addr_list=`::1' cadd.homeLAN real0m0.001s user0m0.000s sys 0m0.000s :-) Thanks for your help. Urs
Re: [gentoo-user] Slow startx - Why does hostname -f hang?
On Sunday 04 Jan 2015 18:45:38 Urs Schütz wrote: On 01/04/15 15:20, Mick wrote: In my /etc/hosts I have something like this: # IPv4 and IPv6 localhost aliases 127.0.0.1 cad.homeLAN localhost cad ::1 cad.homeLAN localhost cad See if this solves your problem. PS. I remember a thread in this M/L about the correct way to configure a domain name and why how the Gentoo Handbook was wrong. I think there was a bug opened about it, too. Setting up /etc/hosts exactly as above did resolve the slow hostname -f lookup. urs@cadd ~ $ time hostname -v -f gethostname()=`cadd' Resolving `cadd' ... Result: h_name=`cadd.homeLAN' Result: h_aliases=`localhost' Result: h_aliases=`cadd' Result: h_addr_list=`::1' cadd.homeLAN real0m0.001s user0m0.000s sys 0m0.000s :-) Thanks for your help. You're welcome! :-) Please note that I assumed the name of your host PC is cad and the arbitrary name of your local domain is homeLAN. You may want to change these to suit your needs. -- Regards, Mick signature.asc Description: This is a digitally signed message part.