You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Alberto Bustamante Reyes <al...@est.tech> on 2019/04/16 13:19:35 UTC

How to publish client stats on server

Hi Geode community,

Im trying to run a simple test to check how the client stats are published on the server, but I have not been able to do it.

The server is started with the statistic sampling enabled, and in the client I set the sending interval with setPoolStatisticInterval, but when I open the stats file with VSD, I cannot see any "ClientStat" there. I was expecting to see the stats "Client-to-Server Messaging Performance (ClientStats)".

I have checked the code and these two actions (setting time interval and stats sampling) are the two conditions that enable the publishing of the client stats, if Im not wrong.

What am I missing? Thanks in advance.

BR/

Alberto

Re: How to publish client stats on server

Posted by Dan Smith <ds...@pivotal.io>.
As Anthony pointed out, each member (client, server, locator, etc.) writes
it's own statistics to it's own stats file.

There is are some server side stats that might have the information you are
looking for - see CacheServerStats. That has information about how many
operations the server has received, etc.

-Dan

On Tue, Apr 16, 2019 at 8:36 AM Anthony Baker <ab...@pivotal.io> wrote:

> The client stats are written to a file on the client. They don’t get
> published to the server.
>
> Anthony
>
> > On Apr 16, 2019, at 6:19 AM, Alberto Bustamante Reyes
> <al...@est.tech> wrote:
> >
> > Hi Geode community,
> >
> > Im trying to run a simple test to check how the client stats are
> published on the server, but I have not been able to do it.
> >
> > The server is started with the statistic sampling enabled, and in the
> client I set the sending interval with setPoolStatisticInterval, but when I
> open the stats file with VSD, I cannot see any "ClientStat" there. I was
> expecting to see the stats "Client-to-Server Messaging Performance
> (ClientStats)".
> >
> > I have checked the code and these two actions (setting time interval and
> stats sampling) are the two conditions that enable the publishing of the
> client stats, if Im not wrong.
> >
> > What am I missing? Thanks in advance.
> >
> > BR/
> >
> > Alberto
>

Re: How to publish client stats on server

Posted by Anthony Baker <ab...@pivotal.io>.
The client stats are written to a file on the client. They don’t get published to the server. 

Anthony

> On Apr 16, 2019, at 6:19 AM, Alberto Bustamante Reyes <al...@est.tech> wrote:
> 
> Hi Geode community,
> 
> Im trying to run a simple test to check how the client stats are published on the server, but I have not been able to do it.
> 
> The server is started with the statistic sampling enabled, and in the client I set the sending interval with setPoolStatisticInterval, but when I open the stats file with VSD, I cannot see any "ClientStat" there. I was expecting to see the stats "Client-to-Server Messaging Performance (ClientStats)".
> 
> I have checked the code and these two actions (setting time interval and stats sampling) are the two conditions that enable the publishing of the client stats, if Im not wrong.
> 
> What am I missing? Thanks in advance.
> 
> BR/
> 
> Alberto

Re: How to publish client stats on server

Posted by John Blum <jb...@pivotal.io>.
Or alternatively, when using Spring, you can just use @EnableStatistics [1].

[1]
https://docs.spring.io/spring-data/geode/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableStatistics.html

On Tue, Apr 16, 2019 at 10:44 AM Darrel Schneider <ds...@pivotal.io>
wrote:

> setPoolStatisticInterval does cause the client to send some of its stats
> periodically to the server. But the server puts this information into
> MBeans and does not write them to the server's statistic archive. This is
> why the javadoc's on setPoolStatisticInterval refers to "gfmon".
> Your best bet, as Dan and Anthony pointed out, is to have your client
> generate its own gfs file. You can do this be configuring the geode/gemfire
> properties as documented. You should find documentation about setting the
> following properties: statistic-sampling-enabled, statistic-sample-rate,
> statistic-archive-file, enable-time-statistics.
> One of the ways you can set these properties is using
> ClientCacheFactory.set(String, String)
>
> On Tue, Apr 16, 2019 at 6:29 AM Alberto Bustamante Reyes
> <al...@est.tech> wrote:
>
> > Hi Geode community,
> >
> > Im trying to run a simple test to check how the client stats are
> published
> > on the server, but I have not been able to do it.
> >
> > The server is started with the statistic sampling enabled, and in the
> > client I set the sending interval with setPoolStatisticInterval, but
> when I
> > open the stats file with VSD, I cannot see any "ClientStat" there. I was
> > expecting to see the stats "Client-to-Server Messaging Performance
> > (ClientStats)".
> >
> > I have checked the code and these two actions (setting time interval and
> > stats sampling) are the two conditions that enable the publishing of the
> > client stats, if Im not wrong.
> >
> > What am I missing? Thanks in advance.
> >
> > BR/
> >
> > Alberto
> >
>


-- 
-John
john.blum10101 (skype)

Re: How to publish client stats on server

Posted by Darrel Schneider <ds...@pivotal.io>.
setPoolStatisticInterval does cause the client to send some of its stats
periodically to the server. But the server puts this information into
MBeans and does not write them to the server's statistic archive. This is
why the javadoc's on setPoolStatisticInterval refers to "gfmon".
Your best bet, as Dan and Anthony pointed out, is to have your client
generate its own gfs file. You can do this be configuring the geode/gemfire
properties as documented. You should find documentation about setting the
following properties: statistic-sampling-enabled, statistic-sample-rate,
statistic-archive-file, enable-time-statistics.
One of the ways you can set these properties is using
ClientCacheFactory.set(String, String)

On Tue, Apr 16, 2019 at 6:29 AM Alberto Bustamante Reyes
<al...@est.tech> wrote:

> Hi Geode community,
>
> Im trying to run a simple test to check how the client stats are published
> on the server, but I have not been able to do it.
>
> The server is started with the statistic sampling enabled, and in the
> client I set the sending interval with setPoolStatisticInterval, but when I
> open the stats file with VSD, I cannot see any "ClientStat" there. I was
> expecting to see the stats "Client-to-Server Messaging Performance
> (ClientStats)".
>
> I have checked the code and these two actions (setting time interval and
> stats sampling) are the two conditions that enable the publishing of the
> client stats, if Im not wrong.
>
> What am I missing? Thanks in advance.
>
> BR/
>
> Alberto
>