Useful Commands

Command to find the no of process running by each user

ps aux |awk '{$1} {++P[$1]} END {for(a in P) if (a !="USER") print a,P[a]}' | sort -k 2

Command to find total no of php process running be each user

ps aux | grep php  |awk '{$1} {++P[$1]} END {for(a in P) if (a !="USER") print a,P[a]}' | sort -n -k 2

Command to find total no of dovecot process running be each user

ps aux | grep dovecot  |awk '{$1} {++P[$1]} END {for(a in P) if (a !="USER") print a,P[a]}' | sort -n -k 2

Command to kill all the Dovecot process

 ps -aux | grep dovecot | awk '{print $2}' | xargs kill -9 

Find Plesk admin password from commandline

/usr/local/psa/bin/admin --show-password

Command to kill all process running on Port 80

 ps -aux | grep dovecot | awk '{print $2}' | xargs kill -9

Leave a Reply

Your email address will not be published. Required fields are marked *