mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
(8782) Unknown garbage collector name
Fix this https://github.com/elastic/logstash/issues/8782 Fixes #8784
This commit is contained in:
parent
54de04cb90
commit
81f8ad7584
1 changed files with 5 additions and 3 deletions
|
@ -20,8 +20,8 @@ java_import 'org.logstash.instrument.reports.ProcessReport'
|
||||||
module LogStash module Instrument module PeriodicPoller
|
module LogStash module Instrument module PeriodicPoller
|
||||||
class JVM < Base
|
class JVM < Base
|
||||||
class GarbageCollectorName
|
class GarbageCollectorName
|
||||||
YOUNG_GC_NAMES = Set.new(["Copy", "PS Scavenge", "ParNew", "G1 Young Generation"])
|
YOUNG_GC_NAMES = Set.new(["Copy", "PS Scavenge", "ParNew", "G1 Young Generation", "scavenge"])
|
||||||
OLD_GC_NAMES = Set.new(["MarkSweepCompact", "PS MarkSweep", "ConcurrentMarkSweep", "G1 Old Generation"])
|
OLD_GC_NAMES = Set.new(["MarkSweepCompact", "PS MarkSweep", "ConcurrentMarkSweep", "G1 Old Generation", "global"])
|
||||||
|
|
||||||
YOUNG = :young
|
YOUNG = :young
|
||||||
OLD = :old
|
OLD = :old
|
||||||
|
@ -64,7 +64,9 @@ module LogStash module Instrument module PeriodicPoller
|
||||||
garbage_collectors = ManagementFactory.getGarbageCollectorMXBeans()
|
garbage_collectors = ManagementFactory.getGarbageCollectorMXBeans()
|
||||||
|
|
||||||
garbage_collectors.each do |collector|
|
garbage_collectors.each do |collector|
|
||||||
name = GarbageCollectorName.get(collector.getName())
|
collector_name = collector.getName()
|
||||||
|
logger.error("collector name", :name => collector_name)
|
||||||
|
name = GarbageCollectorName.get(collector_name)
|
||||||
if name.nil?
|
if name.nil?
|
||||||
logger.error("Unknown garbage collector name", :name => name)
|
logger.error("Unknown garbage collector name", :name => name)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue