Re: top for apache? [OT]
* Nigel Hamilton [EMAIL PROTECTED] [2002-09-21 04:31]: I just found a really cool tool (mentioned in SysAdmin journal). It shows a dynamic picture of MySQL processes just like 'top' [-- snip --] It would be great to have a similar tool for mod_perl/apache. You could see the memory consumption of children over time, number of requests served, average response time etc. Have you seen mod_status? It produces parsable output; you can get nice useful info like: Srv PIDAcc M CPUSS Req Conn Child Slot ClientVHost Request 0-0 6762 0/13/43 _ 12.98 85 0 0.0 0.20 0.59 127.0.0.1 foo GET /images/header_logo2.gif HTTP/1.1 1-0 6760 0/18/48 _ 19.44 85 1 0.0 0.42 0.68 127.0.0.1 foo GET /images/336633.gif HTTP/1.1 2-0 6761 0/16/46 _ 12.96 85 0 0.0 0.39 1.04 127.0.0.1 foo GET /images/curve_white2.gif HTTP/1.1 3-0 6763 0/15/45 _ 13.01 85 0 0.0 0.38 0.40 127.0.0.1 foo GET /images/99cc99_h10.gif HTTP/1.1 4-0 6764 0/11/41 _ 6.64 85 0 0.0 0.20 0.45 127.0.0.1 foo GET /images/336633_w119.gif HTTP/1.1 5-0 6765 0/9/39 _ 6.70 85 0 0.0 0.20 0.63 127.0.0.1 foo GET /images/header_end2.gif HTTP/1.1 6-0 6766 0/7/37 W 6.53 85 0 0.0 0.20 0.80 127.0.0.1 foo GET /server-status HTTP/1.0 7-0 6767 0/4/34 _ 0.01 85 5 0.0 0.00 0.40 127.0.0.1 foo GET /server-status HTTP/1.0 8-0 6768 0/1/31 _ 0.00 85 1 0.0 0.00 0.01 127.0.0.1 foo GET /images/clear.gif HTTP/1.1 9-0 -0/0/30 . 13.06 105 0 0.0 0.00 0.22 127.0.0.1 foo GET /images/curve_white2.gif HTTP/1.1 10-0 -0/0/3 . 0.01 1069 1 0.0 0.00 0.00 127.0.0.1 foo GET /images/336633.gif HTTP/1.1 (darren) PS Yes, mytop is very cool. -- Do what thou wilt shall be the whole of the Law. Love is the law, love under will.
Re: top for apache? [OT]
--On Sunday, September 22, 2002 09:54:02 -0400 Perrin Harkins [EMAIL PROTECTED] wrote: Nigel Hamilton wrote: It would be great to have a similar tool for mod_perl/apache. The closest thing available is a combination of mod_status and Apache::Status. If you haven't tried these yet, give them a shot. They provide a good deal of information. You might also want to check out Apache::VMonitor. From the module's description: This module emulates the reporting functionalities of top(1), extended for mod_perl processes, mount(1), and df(1) utilities. It has a visual alerting capabilities and configurable automatic refresh mode. All the sections can be shown/hidden dynamically through the web interface. -- Eric Cholet
Re: top for apache? [OT]
Nigel Hamilton wrote: It would be great to have a similar tool for mod_perl/apache. The closest thing available is a combination of mod_status and Apache::Status. If you haven't tried these yet, give them a shot. They provide a good deal of information. - Perrin
Re: top for apache? [OT]
On Sat, 21 Sep 2002, Nigel Hamilton wrote: to see the number of children and then make guestimates of average per child memory consumption. I'm not sure what the equivalent for other operating systems is, but here's a Solaris tip for the archives... we use /usr/proc/bin/pmap to determine memory consumption: for p in `pgrep httpd`; do /usr/proc/bin/pmap -x $p | tail -1; done pmap gives you the total memory usage, amount actually resident, amount shared, and the amount not shared (private). - Kyle
top for apache? [OT]
Hi, I just found a really cool tool (mentioned in SysAdmin journal). It shows a dynamic picture of MySQL processes just like 'top' (see below). MySQL on localhost (3.23.37) up 2+20:24:55 [09:12:03] Queries Total: 543,555Avg/Sec: 2.21 Slow: 1 Threads Total: 13Active: 1 Cached: 0 Key Efficiency: 97.87% Bytes in: 186,667,281 Bytes out: 227,159,325 Id User Host DB TimeCmd Query or State -- -- --- -- 16776 root localhosttest 0 Query show full processlist 16749search localhost search 1 Sleep 16745search localhost search 2 Sleep 16746search localhost search 19 Sleep 16752search localhost search 19 Sleep 16763search localhost search 23 Sleep You can see what queries are taking too long and kill queries interactively. You can find it here: http://jeremy.zawodny.com/mysql/mytop It would be great to have a similar tool for mod_perl/apache. You could see the memory consumption of children over time, number of requests served, average response time etc. At the moment I end up repeatedly doing things like: ps -aux | grep apache | wc -l to see the number of children and then make guestimates of average per child memory consumption. Does anyone want to code this up over the weekend? ;-) Nige -- Nigel Hamilton Turbo10 Metasearch Engine email: [EMAIL PROTECTED] tel:+44 (0) 207 987 5460 fax:+44 (0) 207 987 5468 http://turbo10.com Search Deeper. Browse Faster.