Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP

Viewing all open/active sessions?

 

 

ModPerl asp RSS feed   Index | Next | Previous | View Threaded


moxie_freak at yahoo

Apr 13, 2006, 11:19 AM

Post #1 of 4 (3830 views)
Permalink
Viewing all open/active sessions?

Greetings,

Is there an easy way to view all open sessions for a
given instance of Apache::ASP? I realize that it is
possible for me to keep track of this myself, but
since the system manages sessions transparently, I
really don't want to reinvent the wheel. Even a
command-line perl tool to interrogate a state
directory would be great; I just want some way of
measuring active usage at any given time.

Thank you for your help!
Steve


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


moxie_freak at yahoo

Apr 13, 2006, 6:48 AM

Post #2 of 4 (3618 views)
Permalink
Viewing all open/active sessions? [In reply to]

Greetings,

Is there an easy way to view all open sessions for a given instance of
Apache::ASP? I realize that it is possible for me to keep track of
this myself, but since the system manages sessions transparently, I
really don't want to reinvent the wheel. Even a command-line perl
tool to interrogate a state directory would be great; I just want some
way of measuring active usage at any given time.

Thank you for your help!
Steve




---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


john.drago at data393

Apr 13, 2006, 11:55 AM

Post #3 of 4 (3617 views)
Permalink
RE: Viewing all open/active sessions? [In reply to]

> Is there an easy way to view all open sessions for a
> given instance of Apache::ASP?

Yes, it is possible.

> I realize that it is
> possible for me to keep track of this myself, but
> since the system manages sessions transparently, I
> really don't want to reinvent the wheel.

If you are using Sync::MLDBM as your persistence mechanism then you can
descend through the state directory, looking for sessions that have not
timed out.

> Even a
> command-line perl tool to interrogate a state
> directory would be great; I just want some way of
> measuring active usage at any given time.

Another way to go about it might include:

sub Session_OnStart
{
push @{ $Application->{session_ids} }, $Session->{SessionID};
}

sub Session_OnEnd
{
my @ids = @{ $Application->{session_ids} };
@ids = grep { $_ ne $Session->{SessionID} };
$Application->{session_ids} = \@ids;
}

...Then, to get a list of all active sessions, just access
$Application->{session_ids}

>
> Thank you for your help!
> Steve
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe [at] perl
> For additional commands, e-mail: asp-help [at] perl
>


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


john.drago at data393

Apr 13, 2006, 3:48 PM

Post #4 of 4 (3613 views)
Permalink
RE: Viewing all open/active sessions? [In reply to]

Woops, that would be:

sub Session_OnEnd
{
my @ids = @{ $Application->{session_ids} };
@ids = grep { $_ ne $Session->{SessionID} } @ids;
$Application->{session_ids} = \@ids;
}



> -----Original Message-----
> From: John Drago [mailto:john.drago [at] data393]
> Sent: Thursday, April 13, 2006 12:55 PM
> To: Steve B; asp [at] perl
> Subject: RE: Viewing all open/active sessions?
>
> > Is there an easy way to view all open sessions for a
> > given instance of Apache::ASP?
>
> Yes, it is possible.
>
> > I realize that it is
> > possible for me to keep track of this myself, but
> > since the system manages sessions transparently, I
> > really don't want to reinvent the wheel.
>
> If you are using Sync::MLDBM as your persistence mechanism then you
can
> descend through the state directory, looking for sessions that have
not
> timed out.
>
> > Even a
> > command-line perl tool to interrogate a state
> > directory would be great; I just want some way of
> > measuring active usage at any given time.
>
> Another way to go about it might include:
>
> sub Session_OnStart
> {
> push @{ $Application->{session_ids} }, $Session->{SessionID};
> }
>
> sub Session_OnEnd
> {
> my @ids = @{ $Application->{session_ids} };
> @ids = grep { $_ ne $Session->{SessionID} };
> $Application->{session_ids} = \@ids;
> }
>
> ...Then, to get a list of all active sessions, just access
> $Application->{session_ids}
>
> >
> > Thank you for your help!
> > Steve
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: asp-unsubscribe [at] perl
> > For additional commands, e-mail: asp-help [at] perl
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe [at] perl
> For additional commands, e-mail: asp-help [at] perl
>


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl

ModPerl asp RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.