Monday, February 4, 2013

Server Monitoring Commands in Linux...:-)

::>> To check disk space of server :

df -h

::>> To get the disk space used by specific account : go to account on
server :

du -csh *

::>> To know that which domain or account using more resources and
causing load :

hload 20

::>> If the crons are set at same time and causing load then you can edit
and change the cron time using :

vi /var/spool/cron/(username)

Or, you can use the following :

crontab -e -u (username)

::>> Instead of hload 20, you can use :

hload 200 | sort -k 3

::>> To check the spamming load :

Go to path : cd /var/spool/exim/input

Command : egrep “X-PHP-Script” * -R

::>> To get the processes and server load caused by them :

ps -auxf

::>> To get the cron jobs running on the server :

tail -f /var/log/cron

::>> netstat

It displays a lot of network related information, such as socket usage, routing, interface, protocol, network statistics, and more. following are the parameters of netstat command.

-a Show all socket information

-r Show routing information

-i Show network interface statistics

-s Show network protocol statistics

No comments:

Post a Comment