Announcement

Collapse
No announcement yet.

Just Upgraded My Server But Still Getting Errors

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

  • #16
    Originally posted by TurboFC3S
    Hey! You have all the extra stuff in your script too .. http://www.sohh.com/apps/mysql.php

    Mind sharing your script?
    what extra stuff ??? it's the same ?
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment


    • #17
      Eva's he might be referring to another code on this site that just produced the top stats.

      Anyway, I got this code from somewhere on this site but I can't find the link, but I'll post the code here.

      Code:
      // stat.php - Last modified: Sept. 12 09:45
      <html><body><pre>
      <?
      $fp = popen ("top -i -n 1 -b", "r");
      $buffer = "";
      while (!feof ($fp) && ($buffer == ""))
        $buffer = rtrim (fgets ($fp, 4096));
      
      if (!feof ($fp) && $buffer != "") {
        echo $buffer,"\n";
        while (!feof ($fp) && $buffer != "") {
          $buffer = rtrim (fgets ($fp, 4096));
          $pos = strpos ($buffer, "CPU states");
          if (is_string ($pos) && !$pos)
            echo $buffer,"\n";
        }
      }
      while (!feof ($fp)) {
        $buffer = rtrim (fgets ($fp, 4096));
        $user = rtrim (substr ($buffer, 6, 9));
        if ($user == "USER")
          $header = $buffer;
        if (($user == "nobody" || $user == "mysql") && substr ($buffer, 67, 3) != 
      "top") {
          if ($header != "") {
            echo $header,"\n";
            $header = "";
          }
          echo $buffer,"\n";
        }
      }
      echo "\n";
      system ('/usr/local/mysql/bin/mysqladmin extended-status');
      ?>
      </pre></body></html>

      Comment


      • #18
        Eva, not like I need to restart my server or anything but I read on some site that it's good to restart MySQL every now and then. What are your thoughts on this? and how do I restart it the proper way.

        Comment


        • #19
          Originally posted by ibeblunt
          Eva's he might be referring to another code on this site that just produced the top stats.

          Anyway, I got this code from somewhere on this site but I can't find the link, but I'll post the code here.

          Code:
          // stat.php - Last modified: Sept. 12 09:45
          <html><body><pre>
          <?
          $fp = popen ("top -i -n 1 -b", "r");
          $buffer = "";
          while (!feof ($fp) && ($buffer == ""))
            $buffer = rtrim (fgets ($fp, 4096));
          
          if (!feof ($fp) && $buffer != "") {
            echo $buffer,"\n";
            while (!feof ($fp) && $buffer != "") {
              $buffer = rtrim (fgets ($fp, 4096));
              $pos = strpos ($buffer, "CPU states");
              if (is_string ($pos) && !$pos)
                echo $buffer,"\n";
            }
          }
          while (!feof ($fp)) {
            $buffer = rtrim (fgets ($fp, 4096));
            $user = rtrim (substr ($buffer, 6, 9));
            if ($user == "USER")
              $header = $buffer;
            if (($user == "nobody" || $user == "mysql") && substr ($buffer, 67, 3) != 
          "top") {
              if ($header != "") {
                echo $header,"\n";
                $header = "";
              }
              echo $buffer,"\n";
            }
          }
          echo "\n";
          system ('/usr/local/mysql/bin/mysqladmin extended-status');
          ?>
          </pre></body></html>
          that's the old version of the code i posted in the that thread
          :: Always Back Up Forum Database + Attachments BEFORE upgrading !
          :: Nginx SPDY SSL - World Flags Demo [video results]
          :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

          Comment


          • #20
            Originally posted by ibeblunt
            Eva, not like I need to restart my server or anything but I read on some site that it's good to restart MySQL every now and then. What are your thoughts on this? and how do I restart it the proper way.
            not sure how true that is... might be true if the mysql usage patterns and mysql load change constantly and you need to fine tune mysql's settings again... but if you have a constant mysql usage pattern and mysql is properly fine tuned you can go for months..

            my average uptime for mysql is at least 25 - 60 days until i fine tune my mysql settings again..

            i just do

            /etc/rc.d/init.d/mysql stop
            /etc/rc.d/init.d/mysql start
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment


            • #21
              Eva,

              When I do a TOP command it shows my server as being up for 36 days. But how do I restart the server so that it will come up as being up for 1 day?

              I did:

              service httpd restart

              as well as

              /etc/rc.d/init.d/mysql stop
              /etc/rc.d/init.d/mysql start

              But no luck.

              Comment


              • #22
                What are these two files in MySQL?

                In my /var/lib/mysql/ I have two files:

                mysql mysql 45395597 Dec 11 20:47 www-bin.001
                mysql mysql 20563737 Dec 12 13:02 www-bin.002

                What are these? and can I delete them?

                Comment


                • #23
                  you should be able to delete them they're binary logs

                  in my.cnf make sure you have log-bin commented or removed from the my.cnf file and restart mysql
                  :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                  :: Nginx SPDY SSL - World Flags Demo [video results]
                  :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                  Comment

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