1 |
Am Sonntag, 04.01.2015 um 14:06 |
2 |
schrieb Urs Schütz <u.schutz@×××××××.ch>: |
3 |
|
4 |
> Hi list |
5 |
> |
6 |
> While hunting down slow startx times (12-16s instead the usual 2-5s) |
7 |
> I found that "hostname -f" tries to resolve the hostname. This is a |
8 |
> slow process (timeout?): |
9 |
|
10 |
Normally this is a fast process. See my results below. |
11 |
|
12 |
> urs@cadd ~ $ time hostname -v |
13 |
> gethostname()=`cadd' |
14 |
> cadd |
15 |
> |
16 |
> real 0m0.001s |
17 |
> user 0m0.000s |
18 |
> sys 0m0.001s |
19 |
|
20 |
user@puter ~ $ time hostname -v |
21 |
gethostname()=`puter' |
22 |
puter |
23 |
|
24 |
real 0m0.003s |
25 |
user 0m0.000s |
26 |
sys 0m0.000s |
27 |
|
28 |
> urs@cadd ~ $ time hostname -v -f |
29 |
> gethostname()=`cadd' |
30 |
> Resolving `cadd' ... |
31 |
> Result: h_name=`cadd' |
32 |
> Result: h_addr_list=`127.0.0.1' |
33 |
^^^^^^^^^ |
34 |
Does your computer only have an IP address for your localhost? |
35 |
|
36 |
> cadd |
37 |
> |
38 |
> real 0m10.011s |
39 |
> user 0m0.000s |
40 |
> sys 0m0.001s |
41 |
|
42 |
user@puter ~ $ time hostname -v -f |
43 |
gethostname()=`puter' |
44 |
Resolving `puter' ... |
45 |
Result: h_name=`puter.local' |
46 |
Result: h_aliases=`puter' |
47 |
Result: h_addr_list=`192.168.44.32' |
48 |
puter.local |
49 |
|
50 |
real 0m0.005s |
51 |
user 0m0.003s |
52 |
sys 0m0.003s |
53 |
|
54 |
> What is the recommended way for /etc/hosts? I'm at a simple home |
55 |
> network, behind a NAT cable modem, and do not have a dns domain name. |
56 |
|
57 |
What is the content of your /etc/hosts file? |
58 |
This is my hostfile: |
59 |
|
60 |
127.0.0.1 localhost |
61 |
::1 localhost |
62 |
192.168.44.32 puter.local puter |
63 |
|
64 |
Regards |
65 |
wabe |