My trusty home firewall is getting a new kernel, because I need CONFIG_FILTER for the dhcp server and in my case it’s not modularised. This means I’ll lose this very respectable uptime:
monster:~# uptime
23:00:07 up 142 days, 22:00, 2 users, load average: 1.09, 0.81, 0.39
*sniff*

2 Comments to “Uptime schmuptime”
July 28, 2003
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
July 28, 2003
*LOL*
Goof, you’re becoming far too cynical for your own good.