Announcement

Collapse
No announcement yet.

Uptime Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Uptime Script

    Can anyone recommend a good Server Uptime script to use, for linux based server?
    MCSE, MVP, CCIE
    Microsoft Beta Team


  • #2
    Originally posted by Joe Gronlund
    Can anyone recommend a good Server Uptime script to use, for linux based server?
    Regarding apache/http or since last server reboot?
    Trent Gillespie Mod Theater Gillespie Photography

    Comment


    • #3
      Last server reboot
      MCSE, MVP, CCIE
      Microsoft Beta Team

      Comment


      • #4
        I think i got it

        PHP Code:
        <?php
          $data 
        shell_exec('uptime');
          
        $uptime explode(' up '$data);
          
        $uptime explode(','$uptime[1]);
          
        $uptime $uptime[0].', '.$uptime[1];

          echo (
        'Current server uptime: '.$uptime.'

        '
        );

        ?>
        MCSE, MVP, CCIE
        Microsoft Beta Team

        Comment


        • #5
          Originally posted by Joe Gronlund
          I think i got it

          PHP Code:
          <?php
          $data 
          shell_exec('uptime');
          $uptime explode(' up '$data);
          $uptime explode(','$uptime[1]);
          $uptime $uptime[0].', '.$uptime[1];
           
          echo (
          'Current server uptime: '.$uptime.'
           
          '
          );
           
          ?>
          work fine .. thanks

          Comment


          • #6
            I'd cache that, it appears that executing a seperate process is very costly in terms of server performance for a busy site.
            Scott MacVicar

            My Blog | Twitter

            Comment


            • #7
              Hey Scott, how you doing? Long time no talk,,
              MCSE, MVP, CCIE
              Microsoft Beta Team

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X