On 27 December 2011 08:57, zxq9 <[email protected]> wrote:

> On 12/27/2011 04:12 PM, MT Julianto wrote:
>
>> The machine looks (sometimes) sleep, although it is always on, idle, no
>> screensavers is running, and no network changes surroundings.  That's
>> never happened before migrated, and never happened when connecting or
>> neighbor machines in the office.
>>
>> Do you have any suggestions to get rid of it?  It is a bit annoying,
>> although I always able to ssh into the machine on the second try.
>> Thanks.
>>
>
> That sounds pretty annoying. Is the machine a laptop? It is possible a
> power-saver type mode is making it sleep until it gets the request.
>

It is a desktop.  I just checked the power settings: never sleep even when
inactive.  Only the display will sleep when inactive.



> I haven't had this issue myself at all, but power settings is the first
> place I would start looking. Another place to check might be the sshd
> settings (but again, this would be strange since others haven't reported
> the same issue).
>

What settings of sshd might related to the problem?  I used fresh
installation of SL61, did small change to /etc/ssh/sshd_config:
"PermitRootLogin no" and always use ssh with authentication key.



> It could also be routing in the office. But I'd check the above two things
> before I start wondering if routers don't like to remember my system's MAC
> or DHCP address or something (though its possible if your office needs some
> setting for DHCP leases to last the right amount of time or whatever).
>

The machine got IP (public IP) via dhcp with fixed-address, and the last
lease entry in /var/lib/dhclient/dhclient-xxxx.lease at 14:50:25 is:
lease {
  interface "eth0";
  fixed-address xxx.xxx.xxx.xxx;
  option subnet-mask 255.255.240.0;
  option routers xxx.xxx.xxx.xxx;
  option dhcp-lease-time 7200;
  option dhcp-message-type 5;
  option domain-name-servers xxx.xxx.xxx.xxx;
  option dhcp-server-identifier xxx.xxx.xxx.xxx;
  option ntp-servers xxx.xxx.xxx.xxx;
  option host-name "home.mydomain";
  option domain-name "mydomain";
  renew 2 2011/12/27 14:15:34;
  rebind 2 2011/12/27 15:10:21;
  expire 2 2011/12/27 15:25:21;
}

Do you see something odd of the dhcp lease?  From that file, I can see that
the lease is renewed about 3 minutes (random interval) before scheduled
rebind.  So, it is far enough from expire time.

I'll watch the dhcp lease further whenever the problem occurs again later,
and always ping the machine first before ssh:  "ping office -c 2; ssh
user@office"

Kind regards,
-Tito.

Reply via email to