# command-line options and environment variables for pmwebd(1)

# These defaults expose graphite/resource content and normally placed archives

# (assume pwd=$PCP_LOG_DIR/pmwebd)
OPTIONS="-l pmwebd.log"

#OPTIONS="-p 9999"  # port number

# Graphite
OPTIONS="$OPTIONS -R $PCP_SHARE_DIR/webapps -A $PCP_LOG_DIR -G"
# Shrink minimum graphite metric-sampling interval (to match pmlogger)
# OPTIONS="$OPTIONS -i 30"

# Prefer opening directories as archives for graphite metrics.
# OPTIONS="$OPTIONS -I"

# Assume identity of some user other than "pcp"
# OPTIONS="$OPTIONS -U nobody"

# Add some verbosity
OPTIONS="$OPTIONS -v"

# Add some parallelism [experimental!]
ncpu=`pminfo -Lf hinv.ncpu 2>/dev/null | grep value | awk '{print $2}'`
if expr "$ncpu" : '[0-9]*' >/dev/null; then
   OPTIONS="$OPTIONS -M$ncpu"
fi

# Add any extra derived metrics; see pmLoadDerivedConfig(3) for format.
# PCP_DERIVED_CONFIG=/path/to/your/file
# export PCP_DERIVED_CONFIG

# Shorten timeouts for interactions with pmcd on behalf of clients,
# since pmwebd runs single-threaded.
PMCD_CONNECT_TIMEOUT=3
PMCD_RECONNECT_TIMEOUT=1,2,3
PMCD_REQUEST_TIMEOUT=1
export PMCD_CONNECT_TIMEOUT PMCD_RECONNECT_TIMEOUT PMCD_REQUEST_TIMEOUT
