Why does htop display an exclamation mark next to uptime?

I keep getting the exclamation mark in htop next to the uptime and always wondered why it’s there. According to this mailing list post it’s a little easter egg in UptimeMeter.c:

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 }

One Trackback/Pingback

  1. [...] 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 } [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*