Package: haufe.ztop
Introductionhaufe.ztopimplements real-time Zope request analysis
on top of haufe.requestmonitoring.RequirementsZope 2.12.0b2 or higher (or a Zope 2 trunk checkout)haufe.requestmonitoringFeaturesBefore you can use any of these scripts you have to make sure that your Zope
environment is known to the shell. A simplezopectl shellshould be enough in most cases.zanalyseUsingzanalyse:zanalyse [-i intervall] [-n numberLongRequests] [[-b] requestsBasename] [[-d] startDate]prints an ‘sar’ like requests summary from the Zope requests log file
identified byrequestsBasenameandstartDate.The ‘-i’ option specifies the granularity in minutes. It defaults to “10”.requestsBasenameis either an instance tag (in which case it expands
to ‘/var/log/zope/requestsBasename/zope_requests.’) or
the name of a zope requests file (not ending in ‘.’) or of
a zope requests file family (ending in ‘.’).requestsBasenamedefaults to the instance tag ‘Main’.startDatemust have the format year, month and day, each with 2 digits
e.g. ‘040803’. It defaults to the current date. Note thatrequestsBasenamemust be an instance tag or a family name, when you defaultstartDate.Example output:$ bin/zanalyse -i 10 instance

short    load    reqs    rate     avg     min     max  median
         0.05     217    0.36     145       3   24640       5
        24640 /manage_menu
         1385 /manage_main
         1291 /Partner/manage_main
          552 /Applikationen/manage_main
          326 /Partner/manage_workspace
          301 /manage_main
          204 /p_/zopelogo_jpg
           94 /Administration/manage_mainztopUsingztop:ztop [-i interval] [-s shortPeriod] [-m medPeriod] [-l longPeriod]
     [-n numberLongRequests [-t time] [-r]] [[-b] requestsBasename] [[-d] startDate]displays request information by analysis of the Zope requests log file
identified byrequestsBasenameandstartDate.Information contains summaries for up to three periods: ‘short’, ‘med’
and ‘long’. Their length is given byshortPeriod(default: 120),medPeriod(default: 600) andlongPeriod(default: 3600) in seconds.
Summaries contain load averaged over the period, number of finished
requests, request rate, average, min, max and median request times (in ms)
and thenumberLongRequests(default: 3) longest requests in this period.
A period length of “0” suppresses information about this period.The information is repeated everyintervalseconds.intervaldefaults to the value ofshortPeriodor 120.
A “0” value causes ‘ztop’ to stop after one display.The ‘-t’ option tells ‘ztop’ to display information fortimeand then to stop.timeis an ISO datetime or time value,
e.g. ‘2004-08-03T12:00:00’ or ‘12:00:00’.The ‘-r’ option tells ‘ztop’ to display information for the last
restart time and then to stop. ‘-r’ is equivalent to ‘-t <restartTime>’.
This is meant to facilitate the analysis of restarts.requestsBasenameis either an instance tag (in which case it expands
to ‘/var/log/zope/requestsBasename/zope_requests.’) or
the name of a zope requests file (not ending in ‘.’) or of
a zope requests file family (ending in ‘.’).requestsBasenamedefaults to the instance tag ‘Main’.startDatemust have the format year, month and day, each with 2 digits
e.g. ‘040803’. It defaults to the current date. Note thatrequestsBasenamemust be an instance tag or a family name, when you defaultstartDate.Example output:$ bin/ztop -i 10 instance

short    load    reqs    rate     avg     min     max  median
         0.00       4    0.03       9       4      25       4
           25 /Control_Panel/ZTop/manage_monitor
            4 /p_/ltab
            4 /p_/sp

  med    load    reqs    rate     avg     min     max  median
         0.00      20    0.03      17       4     146       8
          146 /Control_Panel/ZTop/manage_monitor
           25 /Control_Panel/ZTop/manage_monitor
           25 /Control_Panel/ZTop/manage_monitor

 long    load    reqs    rate     avg     min     max  median
         0.01     468    0.13      90       3   24640       6
        24640 /manage_menu
         1788 /Auftritte/manage_main
         1385 /manage_mainInstallationaddhaufe.ztopto theeggsoption of your buildout configurationcreate the related scripts using a dedicatedztoppart:[buildout]
parts = ... ztop ...


[ztop]
recipe = zc.recipe.egg
eggs = haufe.ztopAuthorDieter Maurer, Haufe MediengruppeMaintainerAndreas Jung, Haufe MediengruppeLicensehaufe.ztopis published under the Zope Public License V 2.1 (ZPL)
See LICENSE.txt.Changelog0.2.2 (2009/08/11)additional fixes to zanalyse.py0.2.1 (2009/08/11)fixed spelling of ‘zanalyse’0.2.0 (2009/05/12)Initial release