FILENAME 3/4 - delete the old get_fun_path etc.
[hiphop-php.git] / hphp / doc / debug.linux
blobf869acd03c505c75b7d349ce3eb00ca86e0d829c
2 <h2>Useful Linux Commands</h2>
4 1. Who's listening on port 80?
6   sudo lsof -t -i :80
8 2. Who's talking to a remote port 11300?
10   netstat -pal | grep 11300
12 3. Incoming web requests
14   ngrep -q "POST|GET"
15   ngrep -q "POST|GET" | egrep "(POST|GET) /"
17 4. Incoming and outgoing web traffic
19   tcpdump "port 80" -X -s 1024
21 5. Who's blocking port access?
23   /sbin/iptables -L
24   /sbin/iptables -F    # flush iptables
26 6. Who's the main www process?
28   ps -e | grep www
30 7. Start gdb by process name
32   gdb --pid=`ps -eo pid,comm | grep www | cut -d' ' -f1`