hi
would it also be possible to add the following?

1. server uptime (*nix only)
2. httpd uptime
3. mysql uptime

i discovered from my hosting provider that they regularly restart the mysqld process to enhance performance. i would like to know when they do this.

thanks

Comments

marafa’s picture

show status like 'uptime';

rstamm’s picture

I want to integrate phpSysInfo, http://phpsysinfo.sourceforge.net, in version 2. It displays uptime and other server information.

marafa’s picture

i found that script some time back but it doesnt have mysql status as that is per database per user

rstamm’s picture

Version: 4.7.x-1.x-dev » 5.x-2.x-dev

phpsysinfo displays the server uptime.

web server uptime can only displayed by the Apache module mod_status, http://httpd.apache.org/docs/2.0/mod/mod_status.html

mysql uptime is displayed on the database info page in version 2.

marafa’s picture

hi
on this demo page: http://phpsysinfo.sourceforge.net/phpsysinfo-dev/index.php i cant find page 2.
pls give me a link?
thanks

marafa’s picture

hi again
after much time and searching i finally know how to get uptime status shown in days, hours, minutes, etc.:

   $status = explode (' ', mysql_stat($dbconnect));
   print (sprintf("Mysql Uptime: %d days %02d hours of %02d minutes of %02d seconds", $status[1]/60/60/24, ($status[1]/60/60)%24, ($status[1]/60)%60, $status[1]%60));
lolandese’s picture

A D7 module has just been released called Uptime Widget. It uses the third party service UptimeRobot.com.

The widget style (color) is easily modified through CSS. It is a block, so visibility can be set based on page, role, content type and theme.