Re: Sysctl uptime

From: Joshua Oreman (oremanj_at_webserver.get-linux.org)
Date: 06/30/03

  • Next message: CGT-VB Moderator: "Welcome to CGT-VB"
    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"


  • Next message: CGT-VB Moderator: "Welcome to CGT-VB"

    Relevant Pages

    • Re: Linux code contamination
      ... The source code has to be made available ... Check the uptime on this box in my sig. ... The uptime on my wife's Linux box is better: ... there are no "bugs" installed in our official Mandrake distro ...
      (alt.os.linux)
    • [PATCH] Info dump on Oops or panic()
      ... panics. ... I accidentally built my testing kernel without the IDE drivers. ... and informed me that my uptime was 0.38 seconds. ... * Dump out uptime info on oops / panic. ...
      (Linux-Kernel)
    • netgraph/ng_eiface double panic & turnstile/sio lock order reversal in 5.2-BETA
      ... page fault while in kernel mode ... Uptime: 2m3s ... panic: msleep ... <ACPI PCI bus> on pcib0 ...
      (freebsd-current)
    • Re: uptime increases during suspend
      ... But I and others have to support all kernels and all operating ... Uptime has been used this way for years ... is the kernel clock tick rate. ... The HZ value used in the kernel may vary according to hacker desire. ...
      (Linux-Kernel)
    • Re: [PATCH] [revised -- version 2] Info dump on Oops or panic()
      ... Two sample notifiers have ... I accidentally built my testing kernel without the IDE drivers. ... and informed me that my uptime was 0.38 seconds. ... + * Dump out uptime info on oops / panic. ...
      (Linux-Kernel)