Is there a tool for Win/Linux which shows me all file system hits on a webserver?
I once saw something like that for OS X with XCode. I want to improve the systems performance and I'm afraid I miss unnecessary "expensive" hits by Apache, MySQL o开发者_如何学编程r PHP.
Things I want to prevent:
- Apache scanning folders for .htaccess files
- PHP traversing for all include_path paths
There's strace. Start your apache with
$ strace -f -e open,access,stat -w apache2-io.log apache2
You can also attach with to a running process with the -p
option. If you want to see the filesystem hits in real time, skip -w apache2-io.log
.
Have a look at the manpage for more information.
On a Unix System you can use lsof
(list open files), but beware, many files are open usually. You may want to filter the list somewhat, i.e. lsof | grep apache
.
精彩评论