Am Sonntag, 04.01.2015 um 14:06
schrieb Urs Schütz <[email protected]>:
> 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
>
> real 0m0.001s
> user 0m0.000s
> sys 0m0.001s
user@puter ~ $ time hostname -v
gethostname()=`puter'
puter
real 0m0.003s
user 0m0.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
>
> real 0m10.011s
> user 0m0.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
real 0m0.005s
user 0m0.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