1 #
   2 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #
  23 
  24 config.execSuffix=
  25 config.getChildren.pattern=%p
  26 config.getChildren.app=pgrep
  27 config.getChildren.args=-P %p
  28 ################################################################################
  29 # process info to gather
  30 ################################################################################
  31 onTimeout=\
  32   native.DevToolsSecurity \
  33   native.vmmap native.heap native.leaks native.spindump \
  34   native.stack native.core
  35 ################################################################################
  36 native.pattern=%p
  37 native.javaOnly=false
  38 native.args=%p
  39 
  40 native.DevToolsSecurity.app=DevToolsSecurity
  41 native.DevToolsSecurity.args=--status
  42 
  43 # spindump requires root privileges
  44 native.spindump.app=spindump
  45 native.spindump.args=%p -stdout
  46 
  47 native.vmmap.app=bash
  48 native.vmmap.delimiter=\0
  49 native.vmmap.args=-c\0DevToolsSecurity --status | grep enabled > /dev/null && vmmap %p
  50 
  51 native.leaks.app=bash
  52 native.leaks.delimiter=\0
  53 native.leaks.args=-c\0DevToolsSecurity --status | grep enabled > /dev/null && leaks %p
  54 
  55 native.heap.app=bash
  56 native.heap.delimiter=\0
  57 native.heap.args=-c\0DevToolsSecurity --status | grep enabled > /dev/null && heap %p
  58 
  59 native.stack.app=bash
  60 native.stack.delimiter=\0
  61 native.stack.params.repeat=6
  62 native.stack.args=-c\0DevToolsSecurity --status | grep enabled > /dev/null && lldb -o 'attach %p' -o 'thread backtrace all' -o 'detach' -o 'quit'
  63 
  64 native.core.app=bash
  65 native.core.delimiter=\0
  66 native.core.args=-c\0gcore -o ./core.%p %p || \
  67   (DevToolsSecurity --status | grep enabled > /dev/null && lldb -o 'attach %p' -o 'process save-core core.%p' -o 'detach' -o 'quit')
  68 native.core.params.timeout=3600000
  69 ################################################################################
  70 # environment info to gather
  71 ################################################################################
  72 environment=\
  73   users.current users.logged users.last \
  74   disk \
  75   env \
  76   system.dmesg system.sysctl \
  77   process.ps process.top \
  78   memory.vmstat \
  79   netstat.av netstat.aL netstat.m netstat.s
  80 ################################################################################
  81 users.current.app=id
  82 users.current.args=-a
  83 users.logged.app=who
  84 users.logged.args=-a
  85 users.last.app=last
  86 users.last.args=-10
  87 
  88 disk.app=df
  89 disk.args=-h
  90 
  91 env.app=env
  92 
  93 system.dmesg.app=dmesg
  94 system.sysctl.app=sysctl
  95 system.sysctl.args=-a
  96 
  97 process.ps.app=ps
  98 process.ps.args=-Meo pid,pcpu,cputime,start,pmem,vsz,rss,state,wchan,user,args
  99 process.top.app=top
 100 process.top.args=-l 1
 101 
 102 memory.vmstat.app=vm_stat
 103 memory.vmstat.args=-c 3 3
 104 
 105 netstat.app=netstat
 106 netstat.av.args=-av
 107 netstat.aL.args=-aL
 108 netstat.m.args=-m
 109 netstat.s.args=-s
 110 ################################################################################