Home > Computers, This Site > Webserver: 103 Days of Uptime and Counting

Webserver: 103 Days of Uptime and Counting

January 29th, 2009

I missed the screenshot for the bigg one-oh-oh, but the above screenshot gets the point accross. I personally like the easter egg that htop shows when you reach the 100 days of uptime. Notice the (!) to the right of the uptime readout. This is one of the many reasons I love linux…

The little bit of code that does this can be found in the source code of UptimeMeter.c (as I learned from atc):

35 char daysbuf[15];
36 if (days > 100) {
37 sprintf(daysbuf, “%d days(!), “, days);
38 } else if (days > 1) {
39 sprintf(daysbuf, “%d days, “, days);
40 } else if (days == 1) {
41 sprintf(daysbuf, “1 day, “);
42 } else {
43 daysbuf[0] = ‘\0′;
44 }

Computers, This Site , ,

Comments are closed.