Re: debugging websites running on Apache?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19.11.2010 14:39, Igor GaliÄ wrote:

What are other debugging methods which can be used on a busy
webserver?
Ideally, I'd like to see all connections, database queries, files
opened
for read/write by Apache processes, with timestamps, as I connect from
a
given IP address (so all other noise is excluded).

Even with strace you can reduce the amount of syscalls you see.
Check strace(1) for the -e option.

If you're on a modern Operating System, you'll have something like
DTrace or SystemTap in place, which is a big plus, as it ads almost
no overhead to your actions, and could be considered monitoring.

It's not the amount of syscalls printed by strace which is a problem, but those caused not by me (i.e. by some other user from a different IP browsing the website).

I don't really see how dtrace or systemtap can help here.

In the end, Xdebug doesn't seem to be it for my usage case (at least, not everywhere, or it wouldn't give all hints I should have).

For example, I don't see how it could tell that the webserver did:

execve("/bin/sh", ["sh", "-c", "/usr/sbin/sendmail -t -i"],

which later failed with:

open("maildrop/77441.19034", O_RDWR|O_CREAT|O_EXCL, 0644) = -1 EACCES (Permission denied)

Which made the webserver loop and retry due to some bad code in an obfuscated PHP product.


Oh well. Having a few webservers in the balancer and using one just for yourself is a nice thing to have, but I guess I won't always have it available.

On the other hand, if there is just one webserver, most likely it's not that important, and can take some downtime for debugging.


--
Tomasz Chmielewski
http://wpkg.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux