#! /bin/sh
#
# Script to aid debugging users problems by reporting 
# system conditions.
#
#

REPORT="$HOME/ciao_info.report"

\rm -f $REPORT
touch $REPORT

\echo "PDIRS = <$PDIRS>" >> $REPORT
\echo "PFILES = <$PFILES>" >> $REPORT
\echo "UPARM = <$UPARM>" >> $REPORT
\echo "LD_LIBRARY_PATH = <$LD_LIBRARY_PATH>" >> $REPORT
\echo "PATH = <$PATH>" >> $REPORT
\echo "OSTYPE = <$OSTYPE>" >> $REPORT
\echo "HOSTTYPE = <$HOSTTYPE>" >> $REPORT
\echo "MACHTYPE = <$MACHTYPE>" >> $REPORT
\echo "ASCDS_INSTALL = <$ASCDS_INSTALL>" >> $REPORT
\uname -a >> $REPORT
if [ "$ASCDS_INSTALL" != "" ]
then
  \cat $ASCDS_INSTALL/VERSION >> $REPORT
else
  \echo "Error CIAO is NOT setup!" >> $REPORT
fi

if [ "$OSTYPE" = "solaris" ]
then
  sysinfo -class general >> $REPORT
fi
if [ "$OSTYPE" = "linux" ]
then
  free >> $REPORT
fi

\cat $REPORT
\echo
\echo "This information is stored in $REPORT"
 
