mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
parent
59bc304f27
commit
226c51ca0e
2 changed files with 5 additions and 3 deletions
|
@ -35,6 +35,7 @@ module LogStash
|
|||
|
||||
def jvm
|
||||
memory_bean = ManagementFactory.getMemoryMXBean()
|
||||
|
||||
{
|
||||
:pid => ManagementFactory.getRuntimeMXBean().getName().split("@").first.to_i,
|
||||
:version => java.lang.System.getProperty("java.version"),
|
||||
|
@ -48,14 +49,14 @@ module LogStash
|
|||
:heap_max_in_bytes => (memory_bean.getHeapMemoryUsage().getMax() < 0 ? 0 : memory_bean.getHeapMemoryUsage().getMax()),
|
||||
:non_heap_init_in_bytes => (memory_bean.getNonHeapMemoryUsage().getInit() < 0 ? 0 : memory_bean.getNonHeapMemoryUsage().getInit()),
|
||||
:non_heap_max_in_bytes => (memory_bean.getNonHeapMemoryUsage().getMax() < 0 ? 0 : memory_bean.getNonHeapMemoryUsage().getMax())
|
||||
}
|
||||
},
|
||||
:gc_collectors => ManagementFactory.getGarbageCollectorMXBeans().collect(&:getName)
|
||||
}
|
||||
end
|
||||
|
||||
def hot_threads(options={})
|
||||
HotThreadsReport.new(self, options)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -82,7 +82,8 @@ describe LogStash::Api::Modules::Node do
|
|||
"heap_max_in_bytes" => Numeric,
|
||||
"non_heap_init_in_bytes" => Numeric,
|
||||
"non_heap_max_in_bytes" => Numeric
|
||||
}
|
||||
},
|
||||
"gc_collectors" => Array
|
||||
},
|
||||
"hot_threads"=> {
|
||||
"time" => String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue