Server usage with PHP/MYSQL

Discussion in 'PHP' started by Luke, Nov 27, 2006.

  1. #1
    I would like to detect and store server usage in any way possible.

    I currently use the TOP command to see the MYSQL CPU % used by the process and the overall server load, located at the top 1.22, 1.65, 1.98 for example.

    Is there anyway to detect and get these into a variables in PHP, i am aware of the time based microtime benchmark but thats not what i am after.
     
    Luke, Nov 27, 2006 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use the php system or passthru function to execute commands in the shell and get the output back.
     
    exam, Nov 27, 2006 IP
  3. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0