From owner-freebsd-questions@FreeBSD.ORG Sun Jun 29 21:38:10 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E680137B401 for ; Sun, 29 Jun 2003 21:38:10 -0700 (PDT) Received: from adsl-64-161-78-226.dsl.lsan03.pacbell.net (adsl-64-161-78-226.dsl.lsan03.pacbell.net [64.161.78.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 240214402B for ; Sun, 29 Jun 2003 21:38:10 -0700 (PDT) (envelope-from oremanj@adsl-64-161-78-226.dsl.lsan03.pacbell.net) Received: (qmail 18630 invoked by uid 1001); 30 Jun 2003 04:40:56 -0000 Date: Sun, 29 Jun 2003 21:40:56 -0700 From: Joshua Oreman To: "Remington L." Message-ID: <20030630044056.GB18417@webserver.get-linux.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: questions@freebsd.org Subject: Re: Sysctl uptime X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 04:38:11 -0000 On Mon, Jun 30, 2003 at 09:17:54PM -0700 or thereabouts, Remington L. wrote: > Is there a sysctl string that can tell me my uptime? No, but kern.boottime is the boot time of the kernel, so subtract that from `date +%s` and you have uptime in seconds. Note that sysctl's output for this field will need some parsing. I found this out from the source code for `w', btw. Use the Source, Luke! -- Josh > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"