strace_apache_speed
This is an old revision of the document!
Only works with NON https Website!!!!
Only works with apache
SCREEN 1
screen -S telnet
$ telnet localhost 80 GET / HTTP/1.1 Host: example.com*Press ENTER Once*
“Ctrl-a” *New Screen Session*
SCREEN 2
screen -S strace
lsof -p `pidof telnet`
netstat -nap | grep PID
strace -o /tmp/output -f -r -s4096 -p 16742
"Ctrl-a"
Flag | Description |
---|---|
o | ouput file |
f | Trace child processes as they are created by currently traced processes as a result of the fork(2) system call |
r | Print a relative timestamp upon entry to each system call. This records the time difference between the beginning of successive system calls |
p | PID |
s | string size (IMPORTANT - strings are truncated by default, sometimes you need to see larger string size to analyse correctly |
—————————-
SCREEN 1
*go back to telnet and press enter twice * * wait for http response * “Ctrl-a”
SCREEN 2
* go back to screen session with strace and close once http response etc)*
cat /tmp/output | cut -c12-16 | sort -rn | head
strace_apache_speed.1458855355.txt.gz · Last modified: 2024/05/23 07:26 (external edit)