2 thoughts on “Uptime schmuptime”

  1. This patch might clear up your tears – just set the offset according to you needs ;)

    — linux/fs/proc/proc_misc.c 2002-12-05 08:42:45.000000000 +0200
    +++ linux/fs/proc/proc_misc.c-goof 2003-07-28 09:33:56.000000000 +0200
    @@ -114,6 +114,9 @@
    return proc_calc_metrics(page, start, off, count, eof, len);
    }

    +// fine-tune according to your needs
    +#define RESPECTABLE_UPTIME_OFFSET 0
    +
    static int uptime_read_proc(char *page, char **start, off_t off,
    int count, int *eof, void *data)
    {
    @@ -121,7 +124,7 @@
    unsigned long idle;
    int len;

    – uptime = jiffies;
    + uptime = jiffies + RESPECTABLE_UPTIME_OFFSET;
    idle = init_tasks[0]->times.tms_utime + init_tasks[0]->times.tms_stime;

    /* The formula for the fraction parts really is ((t * 100) / HZ) % 100, but

Leave a Reply

Your email address will not be published. Required fields are marked *