From owner-freebsd-questions@freebsd.org Wed Jan 27 19:04:31 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61FABA6EC49 for ; Wed, 27 Jan 2016 19:04:31 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C43D102D for ; Wed, 27 Jan 2016 19:04:30 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-115-239.dynamic.qsc.de [92.195.115.239]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 336F13CE38; Wed, 27 Jan 2016 20:04:20 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u0RJ4KPm004451; Wed, 27 Jan 2016 20:04:20 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 27 Jan 2016 20:04:20 +0100 From: Polytropon To: Andrea Venturoli Cc: freebsd-questions@freebsd.org Subject: Re: Log power button Message-Id: <20160127200420.f14b7a9a.freebsd@edvax.de> In-Reply-To: <56A9129A.5050707@netfence.it> References: <56A9129A.5050707@netfence.it> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 19:04:31 -0000 On Wed, 27 Jan 2016 19:55:22 +0100, Andrea Venturoli wrote: > Hello. > > A server of mine (10.1) is "spontaneusly" rebooting. > This is not a power failure/panic/crash/whatever, since it properly > shuts down. > > I suspect someone is pushing the power button, but I have no physical > way to check. Problem is, this is not reported in the logs. There are two things that the power button can do: (a) short press: The OS will take the required action (shut down); (b) long press: The computer will be forced to power off (no OS shutdown, no OS action) - equivalent to ripping out the power cord. You can work with (a), and it will cause a log message. Case (b) won't log anything as the system is _forced_ off. > I vaguely remember older FreeBSD versions did this once, but I might be > wrong; I cannot check on this box (100km away), but I tried on another > one and, to my surprise, the fact that I pressed the power button was > NOT logged. Older FreeBSD versions that utilized APM could have a custom action when pressing the power button as in case (a) mentioned above. The corresponding file was /etc/apmd.conf. Today ACPI is being used for controlling what happens when the button is pressed. > Is there any way to enable this? I'm not sure APM can be re-enabled, it's probably not present "in hardware" anymore... > Maybe I'm dumb, but I looked for this and found nothing. No, it just doesn't really exist anymore, no matter how hard you look. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...