# the log directory where holds the output of this script
LOGDIR=$TOP/logs/diagnostic/env_info

if [ ! -d $LOGDIR ]; then
        mkdir -p $LOGDIR
fi

# source the common.functions
. $TOP/bin/diagnostic/common/common.functions

# put timestamp and version info in README.txt file
getReportHeader > $LOGDIR/README.txt

# a list of commands to be executed
# you may expand the list to incorporate more system commands

# get uname info
if [ "X`which uname 2> /dev/null`" != "X" ]; then
	uname -a > $LOGDIR/uname.out
fi

# get ulimit setting, ulimit is a shell built-in
ulimit -a > $LOGDIR/ulimit.out

# get all the environment vairable setup
if [ "X`which env 2> /dev/null`" != "X" ]; then
	env > $LOGDIR/env.out
fi

# the hostname
if [ "X`which hostname 2> /dev/null`" != "X" ]; then
	hostname > $LOGDIR/hostname.out
fi

# ps -ef > $LOGDIR/ps.out

