News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

Basic Linux Commands : Resource Usage & Killing Processes

Started by Sudhakar, Nov 08, 2009, 11:46 PM

Previous topic - Next topic

Sudhakar

Are you wondering why your server seems to be running slower than it should? Or perhaps, you'd like to know if it's time for an hardware upgrade?

Today I'm going to show you some basic Linux commands that allow you to see how your system performs and how to manage processes. I'm not talking about intensive resource usage monitoring but rather some simple commands every system administrator should know.

free

This command displays the amount of used and free system memory on Linux.

top

This tool is one of my favorites. It prints a display of system processes in real time. Press the Q key to quit.

ps

This command prints a list of the current processes. There are various switches that can be used with PS and depending on the Linux / Unix distribution, the options may vary.

You can also pipe the result through GREP to find a particular keyword in the process list.

Example:

ps -aux | grep mysql

kill process_ids


Kills a particular process identified by its PID (Process ID). When killing a process you can send a signal (given as a number) to the process. For example, using kill -1 process_ids will force the process to re-read its configuration file and restart.

You can use the PS command to find the PID of a process.

killall program

Kills all processes that are instances of the specified program.

You could use Putty or Winscp for performing the about actions.
  8)