Show kernel and CPU type
authorJamie Cameron <jcameron@webmin.com>
Sun, 8 Jun 2008 00:17:47 +0000 (00:17 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sun, 8 Jun 2008 00:17:47 +0000 (00:17 +0000)
blue-theme/lang/en
blue-theme/right.cgi

index 29fb262..01f48cf 100644 (file)
@@ -31,3 +31,6 @@ right_uptime=System uptime
 right_updays=$1 days, $2 hours, $3 minutes
 right_uphours=$1 hours, $2 minutes
 right_upmins=$1 minutes
+right_kernel=Kernel and CPU
+right_kernelon=$1 $2 on $3
+
index 0b570e1..2bd6461 100755 (executable)
@@ -51,6 +51,13 @@ if ($level == 0) {
        print "<tr> <td><b>$text{'right_time'}</b></td>\n";
        print "<td>$tm</td> </tr>\n";
 
+       # Kernel and CPU
+       $out = &backquote_command(
+         "uname -r 2>/dev/null ; uname -m 2>/dev/null ; uname -s 2>/dev/null");
+       local ($r, $m, $o) = split(/\r?\n/, $out);
+       print "<tr> <td><b>$text{'right_kernel'}</b></td>\n";
+       print "<td>",&text('right_kernelon', $o, $r, $m),"</td> </tr>\n";
+
        # System uptime
        $out = &backquote_command("uptime");
        $uptime = undef;