On Tue, Dec 10, 2019, at 11:10, Magnus Edenhill wrote:
> Hi Colin,
> 

Hi Magnus,

Thanks for taking a look.

> aren't those counters (ever increasing), rather than gauges (fluctuating)?

Since this is in the Kafka broker, we're using Yammer.  This might be 
confusing, but Yammer's concept of a "counter" is not actually monotonic.  It 
can decrease as well as increase.

In general Yammer counters require you to call inc(amount) or dec(amount) on 
them.  This doesn't match up with what we need to do here, which is to 
(essentially) make a callback into the kernel by reading from /proc.

The counter/gauge dichotomy doesn't affect the JMX, (I think?), so it's really 
kind of an implementation detail.

> 
> You also mention CPU usage as a side note, you could use getrusage(2)'s
> ru_utime (user) and ru_stime (sys)
> to allow the broker to monitor its own CPU usage.
> 

Interesting idea.  It might be better to save that for a future KIP, though, to 
avoid scope creep.

best,
Colin

> /Magnus
> 
> Den tis 10 dec. 2019 kl 19:33 skrev Colin McCabe <cmcc...@apache.org>:
> 
> > Hi all,
> >
> > I wrote KIP about adding support for exposing disk read and write
> > metrics.  Check it out here:
> >
> > https://cwiki.apache.org/confluence/x/sotSC
> >
> > best,
> > Colin
> >
>

Reply via email to