Script for checking apache process and working directory

Very intersting script i learn this from one of my friends the purpose of the script is to check all apache processes and check which process is running and on which directory ( something like that ) very good to identify problem on the server ,


ps -aux 2>&1 | grep "^apache" | awk '{print $2}' |
while read pid; do
a=`lsof -np $pid | grep " cwd \|IP"`
echo "$a"
echo "-"



All rights reservered to Avi Blacky Many Thanks !!!

כתיבת תגובה

צריך להכנס למערכת בשביל להשאיר תגובה.