Hello , welcome to Castle-Murray
Login Register

page load size

:1
Date posted: Nov. 29, 2022, 2:45 a.m.
Problem: page loading slowly. Hitting I/O limit on page loads?
What does it do?: find how much data is being loaded by an index.php file
sean@castle-murray.com[~/bash/php] #
strace_index(){
touch results.txt
strace -o results.txt -ttfe trace=open php index.php 2&>1 /dev/null
files=$(awk -F "\"" '!/No such file/ && /open/ && /home/ {print $2}' results.txt)
echo -e "\n\t Loading $(echo "${files}" | wc -l) files."
echo -e "\n\t $(echo "${files}" | xargs du -k | awk '{sum+=$1;} END{print sum;}') KB total.\n"
rm -rf results.txt
}
strace_index
sean@castle-murray.com[~/bash/php] #
This is a comment.

Add a comment

Login to comment.