powtac
powtac

Reputation: 41040

Tool for IO analysis?

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 or PHP.

Things I want to prevent:

Upvotes: 2

Views: 71

Answers (2)

Mnementh
Mnementh

Reputation: 51311

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.

Upvotes: 1

phihag
phihag

Reputation: 287805

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.

Upvotes: 3

Related Questions