Getting into a server with SSH, seeing stats etc.

I recently had some troubles with a dedicated server that is hosting many websites at work, hosted with another company, which was getting a lot of traffic to huge table heavy websites. The server couldn’t handle the load and all websites were slowing down a lot.

Here is some useful hints on how to access the terminal of the server and find some stuff out ~

  1. Download win SCP used for SSH-ing into the server
  2. Type the IP address and port 22 (for the server), then click login
  3. It will then ask you for username and password.
  4. You can login as ROOT for all privileges, but make sure you don’t mess with the config files, or you could break a website.. or all of them…
  5. Type “top” to see a running list of the top processes and some stats on RAM, CPU etc. (like task manager on windows)
  6. Press “c” to also see which files are causing the CPU load… (maybe it’s a MySQL script in “display.php” or something like that..
  7. You can check MySQL information by typing “mysql” and then you may need to login with those details (not if you’re logged in as ROOT)