#
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

config.execSuffix=
config.getChildren.pattern=%p
config.getChildren.app=pgrep
config.getChildren.args=-P %p
################################################################################
# process info to gather
################################################################################
onTimeout=\
  native.vmmap native.heap native.leaks native.spindump \
  native.stack native.core
################################################################################
native.pattern=%p
native.javaOnly=false
native.args=%p

# Some of them require root privileges
native.vmmap.app=vmmap
native.heap.app=heap
native.leaks.app=leaks
native.spindump.app=spindump
native.spindump.args=%p -stdout

native.stack.app=lldb
native.stack.delimiter=\0
native.stack.params.repeat=6
native.stack.args=-o\0attach %p\0-o\0thread backtrace all\0-o\0detach\0-o\0quit

native.core.app=bash
native.core.delimiter=\0
native.core.args=-c\0gcore -o ./core.%p %p || \
  lldb -o 'attach %p' -o 'process save-core core.%p' -o 'detach' -o 'quit'
native.core.params.timeout=3600000
################################################################################
# environment info to gather
################################################################################
environment=\
  users.current users.logged users.last \
  disk \
  env \
  system.dmesg system.sysctl \
  process.ps process.top \
  memory.vmstat \
  netstat.av netstat.aL netstat.m netstat.s
################################################################################
users.current.app=id
users.current.args=-a
users.logged.app=who
users.logged.args=-a
users.last.app=last
users.last.args=-10

disk.app=df
disk.args=-h

env.app=env

system.dmesg.app=dmesg
system.sysctl.app=sysctl
system.sysctl.args=-a

process.ps.app=ps
process.ps.args=-Meo pid,pcpu,cputime,start,pmem,vsz,rss,state,wchan,user,args
process.top.app=top
process.top.args=-l 1

memory.vmstat.app=vm_stat
memory.vmstat.args=-c 3 3


netstat.app=netstat
netstat.av.args=-av
netstat.aL.args=-aL
netstat.m.args=-m
netstat.s.args=-s
################################################################################
