Commit 17308412 authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

Added OS printout and EMI version printout

parent 5c33e6b8
...@@ -10,6 +10,13 @@ ...@@ -10,6 +10,13 @@
# if the siteis not CERN and is not using CERNVM-FS # if the siteis not CERN and is not using CERNVM-FS
# - prints the type and version of middleware # - prints the type and version of middleware
# - the required version of lcg-cp is installed # - the required version of lcg-cp is installed
# String exit codes:
# SW_DIR_UNDEF: location of CMS software directory undefined
# SW_DIR_NOT_READABLE: CMS software directory not existent or unreadable
# SW_DIR_NOT_WRITABLE: the CMS software area is not writable when it should
# LCG_CP_MISSING: the lcg-cp command is not in the PATH
# STAGEOUT_CMD_INVALID: the version of the stageout command is too old
# OK: everything is OK
export LANG=C export LANG=C
...@@ -37,7 +44,7 @@ if [ $result -eq 0 ] ; then ...@@ -37,7 +44,7 @@ if [ $result -eq 0 ] ; then
else else
echo "WARNING: voms-proxy-info not found" echo "WARNING: voms-proxy-info not found"
fi fi
cat /proc/meminfo | grep Mem cat /proc/meminfo | grep Mem
# Test of the local worker node environment # Test of the local worker node environment
echo echo
...@@ -69,10 +76,10 @@ else ...@@ -69,10 +76,10 @@ else
echo "summary: SW_DIR_UNDEF" echo "summary: SW_DIR_UNDEF"
exit $SAME_ERROR exit $SAME_ERROR
fi fi
if [ ! -d $SW_DIR ] ; then if [ ! -d $SW_DIR -o ! -r $SW_DIR ] ; then
echo "ERROR: software directory non existent or non readable" echo "ERROR: software directory non existent or non readable"
echo "summary: SW_DIR_NOT_READABLE" echo "summary: SW_DIR_NOT_READABLE"
exit $SAME_ERROR exit $SAME_ERROR
fi fi
# Software area space # Software area space
...@@ -91,7 +98,7 @@ if [ -d $SW_DIR ] ; then ...@@ -91,7 +98,7 @@ if [ -d $SW_DIR ] ; then
# Test if we are at CERN # Test if we are at CERN
atCERN=0 atCERN=0
atCERN=`echo $SW_DIR | grep -c cern.ch 2>/dev/null` atCERN=`echo $SW_DIR | grep -c '/afs/cern.ch' 2>/dev/null`
# Test if can write on SwArea (for EGI, non-CVMFS sites excluding CERN) # Test if can write on SwArea (for EGI, non-CVMFS sites excluding CERN)
cantwrite=0 cantwrite=0
...@@ -109,6 +116,20 @@ if [ -d $SW_DIR ] ; then ...@@ -109,6 +116,20 @@ if [ -d $SW_DIR ] ; then
fi fi
fi fi
# check for SL5
echo
echo "Checking OS version from $SW_DIR/common/cmsos and architecture from $SW_DIR/common/cmsarch.."
echo
slVersion="unknown"
if [ -f $SW_DIR/common/cmsos ] ; then
osVersion=`$SW_DIR/common/cmsos`
echo "osVersion: " $osVersion
cmsarch=`$SW_DIR/common/cmsarch`
echo "scram_arch: " $cmsarch
slVersion=`echo $cmsarch|cut -d'_' -f1`
fi
echo "slVersion: " $slVersion
echo echo
echo "Checking middleware installation..." echo "Checking middleware installation..."
echo echo
...@@ -121,6 +142,10 @@ elif [ -f /etc/emi-version ] ; then ...@@ -121,6 +142,10 @@ elif [ -f /etc/emi-version ] ; then
type="EMI" type="EMI"
mwver=`cat /etc/emi-version` mwver=`cat /etc/emi-version`
mw=1 mw=1
elif [ -f $EMI_UI_CONF/etc/emi-version ] ; then
type="EMI"
mwver=`cat $EMI_UI_CONF/etc/emi-version`
mw=1
elif type -f lcg-version > /dev/null 2>&1; then elif type -f lcg-version > /dev/null 2>&1; then
type="LCG" type="LCG"
mwver=`lcg-version` mwver=`lcg-version`
...@@ -150,7 +175,7 @@ else ...@@ -150,7 +175,7 @@ else
else else
echo echo
echo "ERROR: No validated command for remote stageout available" echo "ERROR: No validated command for remote stageout available"
echo "summary: STGOUT_CMD_INVALID" echo "summary: STAGEOUT_CMD_INVALID"
exit $SAME_ERROR exit $SAME_ERROR
fi fi
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment