Wednesday, May 27, 2015

Use full command

Find particular word in files. directory & subdirectory

grep -r EAJggRQ * > asdf

Find particular files. directory & subdirectory

find . -print | grep -i 'index.php'


Mobile test

curl -s -D - -A 'Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; HTC Desire 1.19.161.5 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17' http://dsroutage.com/ > asd

Find Out apache load per process

ps aux | grep 'httpd' | awk '{print $6/1024 " MB";}'
ps -aux | grep 'httpd' | awk '{print $6/1024 " MB";}'
ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{avg += ($1 - avg) / NR;} END {print avg " MB";}'
ps aux | grep 'mysql' | awk '{print $6/1024 " MB";}')
ps aux | grep 'mysql' | awk '{print $6/1024 " MB";}'

for check memory  : free -g

most cpu & ram using process :  top -c


High load cpu & Ram using   :  ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr | head -10
Plesk Mysql login without password

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Plesk Mysql login password
/usr/local/psa/bin/admin --show-password

apache overload stop contain
vi /etc/httpd/conf.d/fcgid.conf

##FcgidIOTimeout 45
  FcgidIOTimeout 300

GracefulShutDownTimeout 3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
FcgidMaxRequestLen 533554432

/scripts/ensure_vhost_includes --all-users

http://www.zyxware.com/articles/2714/how-to-make-custom-changes-to-virtualhost-settings-in-httpd-conf-on-a-whmcpanel-vps-without-losing-the-changes

0 comments:

Post a Comment