On Fri, May 20, 2011 at 9:02 AM, Matyas Markovics <markovics.mat...@gmail.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > I am trying to get jvm metrics from the new verison of hadoop. > I have read the migration instructions and come up with the following > content for hadoop-metrics2.properties: > > *.sink.file.class=org.apache.hadoop.metrics2.sink.FileSink > jvm.sink.file.period=2 > jvm.sink.file.filename=/home/ec2-user/jvmmetrics.log
The (documented) syntax is [lowercased-service].sink.[sink-name].[option], So for jobtracker it would be jobtracker.sink.file... This will get all metrics from all the contexts (unlike metrics1 where you're required to configure each context). If you want to restrict the sink to only jvm metrics do this: jobtracker.sink.jvmfile.class=${*.sink.file.class} jobtracker.sink.jvmfile.context=jvm jobtracker.sink.jvmfile.filename=/path/to/namenode-jvm-metrics.out > Any help would be appreciated even if you have a different approach to > get memory usage from reducers. reducetask.sink.file.filename=/path/to/reducetask-metrics.out __Luke