Results 1 to 5 of 5

Thread: Ubuntu - Machine Uptime and Total Hours

  1. #1
    Join Date
    Feb 2009
    Location
    Minehead - UK
    Beans
    28
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Ubuntu - Machine Uptime and Total Hours

    Hi Guys,

    I need to know what hours my machine has been running. I'm assuming that there is some register of when the machine has been 'on' - if so can I get a report of maybe date/time it was running?

    Hope you can help any suggestions will be willingly tried.
    Free the web - free the world

  2. #2
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Ubuntu - Machine Uptime and Total Hours

    Terminal...
    Code:
    uptime
    Also have a look at uptimed and uprecords-cgi
    The uptime daemon tracks a system's highest uptimes via boot IDs,
    using the system boot time to keep sessions apart from each other.
    It features a console program to display statistics, and can
    send mail if a milestone or a new record is reached.

    Also have a look at the last command.
    eg
    Code:
    last reboot
    For older records try...
    Code:
    last reboot -f /var/log/wtmp.1
    Last edited by stinkeye; February 5th, 2013 at 05:41 AM.

  3. #3
    Join Date
    Feb 2009
    Location
    Minehead - UK
    Beans
    28
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Ubuntu - Machine Uptime and Total Hours

    Thank you - this is good info.

    However; I should establish what I am trying to understand. (I should have done this more clearly in the first place )

    I am trying to get an idea of how much energy my machine has used over the last month. Uptime is giving me information that includes standby time when energy consumption is at a minimum.

    If my machine has a combined load of 100W I need to know that it has been 'Working' for 'x' hours.

    Is this possible?
    Free the web - free the world

  4. #4
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Ubuntu - Machine Uptime and Total Hours

    The only way to get an accurate measurement of power consumption is to plug it into a device that measures electricity usage.

    Just knowing the uptime of your machine won't help as the computer will use varying amounts of power depending on what it's doing.

    How are you calculating the load of your machine?
    Cheesemill

  5. #5
    Join Date
    Feb 2009
    Location
    Minehead - UK
    Beans
    28
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Ubuntu - Machine Uptime and Total Hours

    You are correct of course, however it will give me an indicative power usage which is all I need right now. I am planning to connect something like https://energyathome.googlecode.com/hg/ this in time but I have other projects running at the moment.
    I would be using the rated power of my combined system so ((Watts X Hrs)/ capacity factor of say 80%) - thus giving a ballpark energy consumption for the system.
    Free the web - free the world

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •