Date: Sun, 29 Jun 2003 21:40:56 -0700 From: Joshua Oreman <oremanj@webserver.get-linux.org> To: "Remington L." <cableboy@charter.net> Cc: questions@freebsd.org Subject: Re: Sysctl uptime Message-ID: <20030630044056.GB18417@webserver.get-linux.org> In-Reply-To: <auto-000078205314@remt20.cluster1.charter.net> References: <auto-000078205314@remt20.cluster1.charter.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030630044056.GB18417>