Bill Shannon wrote:
> So the get command itself doesn't cause a sample to be taken?
It does sample the values when the get command is run.
For example when a webapp is deployed and the servlet in the webapp is
never accessed its requestcount stat will be 0 as initialized by the
webcontainer when monitoring is enabled.
So you execute the get command , the command goes and "actually"
reads/samples the stats value as 0 and compares its value against the
initial value (again 0). Since it was never changed the lastsampletime
is printed as -1
My point is that when a sample is taken whether it is the initial value
or changed value, the lastsampletime should be the time when get command
is run.
> It just reports on the last sample, which would've been triggered
> by something else?
AFAIK, the samples were taken when the get command is run and it is not
triggered by anything else. Of course the stats change according to the
runtime status of the server, but it is measured only at the time of get
command execution.
> And you're looking for a way to represent the
> last sample time in the case where no sample has ever been taken?
>
> Well, I suppose -1 is reasonable in that case, but it is a small
> incompatibility. I suppose we could consider it a bug fix since
> with v2 it was lying when it told you the last sample time even
> though no sample was taken.
>
>
> Jennifer Chou wrote:
>> Hi Bill,
>>
>> For the lastsampletime in the monitoring stats, we wanted to change
>> what it is initialized to.
>>
>> In v3 lastsampletime is currently initialized to -1 when nothing has
>> triggered a statistic measurement to be taken (ie ping a url for a
>> web app).
>> In v2 lastsampletime used to display the current time as the get
>> command was run.
>>
>> We changed this in v3 because it seemed a more accurate reflection of
>> the definition...
>>
>> lastsampletime - The time of the last measurement represented as a
>> long, whose value is the number of milliseconds since January 1,
>> 1970, 00:00:00.
>> starttime - The time of the first measurement represented as a long,
>> whose value is the number of milliseconds since January 1, 1970,
>> 00:00:00.
>>
>> Do you think this will be ok?
>>
>> Examples....
>>
>> v2:
>>
>> server.applications.hello.server.activesessionscurrent-count = 0
>> server.applications.hello.server.activesessionscurrent-description =
>> Number of currently active sessions
>> *server.applications.hello.server.activesessionscurrent-lastsampletime
>> = 1255626451250*
>> server.applications.hello.server.activesessionscurrent-name =
>> ActiveSessionsCurrent
>> server.applications.hello.server.activesessionscurrent-starttime =
>> 1255626253015
>> server.applications.hello.server.activesessionscurrent-unit = count
>>
>> server.applications.hello.server.sessionstotal-count = 0
>> server.applications.hello.server.sessionstotal-description = Total
>> number of sessions created
>> server.applications.hello.server.sessionstotal-lastsampletime =
>> 1255626451234
>> server.applications.hello.server.sessionstotal-name = SessionsTotal
>> server.applications.hello.server.sessionstotal-starttime = 1255626253015
>> server.applications.hello.server.sessionstotal-unit = count
>>
>> v3:
>>
>> server.applications.hello.server.activesessionscount-current = 0
>> server.applications.hello.server.activesessionscount-description =
>> Number of active sessions
>> server.applications.hello.server.activesessionscount-highwatermark = 0
>> *server.applications.hello.server.activesessionscount-lastsampletime
>> = -1*
>> server.applications.hello.server.activesessionscount-lowwatermark = 0
>> server.applications.hello.server.activesessionscount-name =
>> ActiveSessions
>> server.applications.hello.server.activesessionscount-starttime =
>> 1255626696046
>> server.applications.hello.server.activesessionscount-unit = count
>>
>> server.applications.hello.server.sessionstotal-count = 0
>> server.applications.hello.server.sessionstotal-description = Total
>> number of sessions ever created
>> *server.applications.hello.server.sessionstotal-lastsampletime = -1*
>> server.applications.hello.server.sessionstotal-name = SessionsTotal
>> server.applications.hello.server.sessionstotal-starttime = 1255626696046
>> server.applications.hello.server.sessionstotal-unit = count
>>
>> Thanks,
>> Jennifer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>