# sample configuration file for shping PMDA
#
# Warning: these commands will be run as "root" using sh(1) with the
#	current directory set to $PCP_LOG_DIR/pmcd and the
#	following set in the environment:
#		IFS=" \t\n"
#		PATH=... as per $PCP_DIR/etc/pcp.env ...
#

# Specification format, one per line ("Tags" must be unique)
# Tag	Shell command

# minimal effort here, no stress for the shell ... just start and quit
null	exit 0

# not too much work, date(1) is pretty light-weight
date	date

# compile and run the generic simple program ... requires a C compiler
# to be installed
cc	cd /tmp; rm -f $$.[oc] $$; echo "main(){printf(\"g'day world\\\\n\");}" >/tmp/$$.c; cc -o $$ $$.c; ./$$; rm -f $$.[oc] $$

# Is the default DNS server responding?
# CONFIGURE-ME-PLEASE - local customization required
# CONFIGURE-ME-PLEASE - DEFAULT-DNS-SERVER will be changed by Install to
# CONFIGURE-ME-PLEASE - be the hostname for the default DNS server
# CONFIGURE-ME-PLEASE - and NSLOOKUP is the path of the nslookup(1) command
dns	NSLOOKUP - DEFAULT-DNS-SERVER </dev/null

# DNS lookup for localhost
dns-self	NSLOOKUP `hostname`

# DNS lookup that will fail ...
dns-err	NSLOOKUP foo.bar.no.host.com

# ypserv ... if you have yp running
ypserv	ypcat hosts | grep `hostname`

# contact portmap/rpcbind for registered RPC programs
rpcbind	rpcinfo -p

# if smtpd is running here, a simple test
smtp	( echo "expn root"; echo quit ) | telnet-probe localhost 25

# if a web server is running here, a simple test
http	curl http://localhost:80/
