Loading ...
Sorry, an error occurred while loading the content.

Apache::Scoreboard problem

Expand Messages
  • Malcolm J Harwood
    I m trying to get some per-request stats for the entire request, not just the response phase, and Apache::Scoreboard looked like it would do the job. However,
    Message 1 of 4 , Mar 2, 2005
    • 0 Attachment
      I'm trying to get some per-request stats for the entire request, not just the
      response phase, and Apache::Scoreboard looked like it would do the job.
      However, I'm having a few problems with it.

      I have the following installed as a CleanupHandler (by which time everything
      should be done), it's just test code to try out Apache::Scoreboard so I'm not
      doing anything fancy with the data. As much as possible it's pulled straight
      from the docs.

      sub handler
      {
      my $r = shift;
      my $sp = $r->pool->new;
      my $image = Apache::Scoreboard->image($sp);

      for (my $parent_score = $image->parent_score;
      $parent_score;
      $parent_score = $parent_score->next)
      {
      next unless ($parent_score->pid == $$); # only want this process

      my $server = $parent_score->server; #Apache::ServerScore object
      next unless $server;

      warn "count: ", $server->access_count;
      warn "request: ", $server->request;
      warn "served: ", $server->bytes_served;
      warn "conn_bytes : ", $server->conn_bytes ;
      warn "conn_count : ", $server->conn_count ;
      warn "req_time : ", $server->req_time ;
      }
      }

      However, on use, I get the following:

      Can't locate object method "server" via package
      "Apache::ScoreboardParentScore"

      According to the docs, that should be Apache::ParentScore not
      Apache::ScoreboardParentScore.

      I'm currently using: Apache/2.0.52, mod_perl 2.0.0_RC3 and Apache::Scoreboard
      2.05.

      Is there something obvious I'm doing wrong?
    • Stas Bekman
      ... [...] ... Malcomlm, the docs coming with 2.05 were a copy of 0.x version s docs. This method is now worker_score(). I ve revamped the docs, but it s still
      Message 2 of 4 , Mar 2, 2005
      • 0 Attachment
        Malcolm J Harwood wrote:
        > I'm trying to get some per-request stats for the entire request, not just the
        > response phase, and Apache::Scoreboard looked like it would do the job.
        > However, I'm having a few problems with it.
        [...]
        > my $server = $parent_score->server; #Apache::ServerScore object

        Malcomlm, the docs coming with 2.05 were a copy of 0.x version's docs.
        This method is now worker_score().

        I've revamped the docs, but it's still incomplete (takes too much time).
        Please take a look at:
        http://apache.org/~stas/Apache-Scoreboard-2.06.tar.gz

        --
        __________________________________________________________________
        Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
        http://stason.org/ mod_perl Guide ---> http://perl.apache.org
        mailto:stas@... http://use.perl.org http://apacheweek.com
        http://modperlbook.org http://apache.org http://ticketmaster.com
      • Malcolm J Harwood
        ... It looks fine from a quick once-over (at least relative to what I worked out looking at the source). Am I correct in assuming that under pre-fork there
        Message 3 of 4 , Mar 2, 2005
        • 0 Attachment
          On Wednesday 02 March 2005 11:14 pm, Stas Bekman wrote:

          > I've revamped the docs, but it's still incomplete (takes too much time).
          > Please take a look at:
          > http://apache.org/~stas/Apache-Scoreboard-2.06.tar.gz

          It looks fine from a quick once-over (at least relative to what I worked out
          looking at the source).

          Am I correct in assuming that under pre-fork there would be only one
          worker_score per parent_score?


          --
          "Truth comes in three stages. First, it is disbelieved; second
          it is violently opposed; third it is accepted as self-evident."
          - Schopenhauer
        • Stas Bekman
          ... Thanks, Malcolm. So I ll get a new version out, soon. ... That s correct. Patches to improve the docs (as you discover things) are very welcome. Your best
          Message 4 of 4 , Mar 2, 2005
          • 0 Attachment
            Malcolm J Harwood wrote:
            > On Wednesday 02 March 2005 11:14 pm, Stas Bekman wrote:
            >
            >
            >>I've revamped the docs, but it's still incomplete (takes too much time).
            >>Please take a look at:
            >>http://apache.org/~stas/Apache-Scoreboard-2.06.tar.gz
            >
            >
            > It looks fine from a quick once-over (at least relative to what I worked out
            > looking at the source).

            Thanks, Malcolm. So I'll get a new version out, soon.

            > Am I correct in assuming that under pre-fork there would be only one
            > worker_score per parent_score?

            That's correct. Patches to improve the docs (as you discover things) are
            very welcome.

            Your best tutorial is Apache::VMonitor 2.x.

            --
            __________________________________________________________________
            Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
            http://stason.org/ mod_perl Guide ---> http://perl.apache.org
            mailto:stas@... http://use.perl.org http://apacheweek.com
            http://modperlbook.org http://apache.org http://ticketmaster.com
          Your message has been successfully submitted and would be delivered to recipients shortly.