Re: Sysctl uptime
From: Joshua Oreman (oremanj_at_webserver.get-linux.org)
Date: 06/30/03
- Previous message: Shrikant Mhatre: "Re: How do i uninstall Jdk1.3 or any jdk version fron freebsd ."
- In reply to: Remington L.: "Sysctl uptime"
- Next in thread: Shantanu Mahajan: "Re: Sysctl uptime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 29 Jun 2003 21:40:56 -0700 To: "Remington L." <cableboy@charter.net>
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"
_______________________________________________
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"
- Previous message: Shrikant Mhatre: "Re: How do i uninstall Jdk1.3 or any jdk version fron freebsd ."
- In reply to: Remington L.: "Sysctl uptime"
- Next in thread: Shantanu Mahajan: "Re: Sysctl uptime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|