Hi,
Since I am a beginner maybe I don’t give the correct information… if this is the case please let me know.
Thanks,
Jordi
Root version:
root-5.30.01_slc5_gcc4.1_x86-64
Here is the xrootd configuration file(/etc/init.d/xrootd):
#!/bin/sh
chkconfig: 345 99 0
description: The xrootd daemon is used to as file server and starter of
the PROOF worker processes.
xrootd Start/Stop the XROOTD daemon
processname: xrootd
pidfile: /var/run/xrootd.pid
config:
NFSCONFIG=/software/at3/admin/proof_nodes/root/
Specify here the full path to the configuration file to be used
XRDCF=$NFSCONFIG/etc/conf/xpd.cf
. $NFSCONFIG/setup.sh
XROOTD=$ROOTSYS/bin/xrootd
XRDLIBS=$ROOTSYS/lib
Get xrootd config
. $NFSCONFIG/etc/sysconfig/xrootd
Source function library.
. /etc/init.d/functions
Get config.
. /etc/sysconfig/network
if [[ “X$XRDLOG” == “$XRDLOG” ]]; then
echo "Error: XRDLOG not defined.
exit 1
fi
if [ ! -d dirname $XRDLOG
] ; then
mkdir -p dirname $XRDLOG
touch $XRDLOG
fi
if [ ! -f $XRDLOG ] ; then
touch $XRDLOG
fi
if [[ “X$XPDMONLOG” == “$XPDMONLOG” ]]; then
echo "Error: XPDMONLOG not defined.
exit 1
fi
if [ ! -d dirname $XPDMONLOG
] ; then
mkdir -p dirname $XPDMONLOG
touch $XPDMONLOG
fi
if [ ! -f $XPDMONLOG ] ; then
touch $XPDMONLOG
fi
xpdmonowner=ls -l $XPDMONLOG | awk '{print $3}'
if [[ $xpdmonowner != “xrootd” ]] ; then
chown xrootd.xrootd $XPDMONLOG
fi
xpdmon_permit=ls -l $XPDMONLOG | awk '{print $1}'
if [[ $xpdmon_permit != “-rw-rw-rw-” ]]; then
chmod 666 $XPDMONLOG
fi
Read user config
[ ! -z “$XRDUSERCONFIG” ] && [ -f “$XRDUSERCONFIG” ] && . $XRDUSERCONFIG
Check that networking is up.
if [ ${NETWORKING} = “no” ]; then
exit 0
fi
[ -x $XROOTD ] || exit 0
RETVAL=0
prog=“xrootd”
export DAEMON_COREFILE_LIMIT=unlimited
start() {
echo -n $"Starting $prog: "
# Options are specified in /etc/sysconfig/xrootd .
# See $ROOTSYS/etc/daemons/xrootd.sysconfig for an example.
# $XRDUSER must be the name of an existing non-privileged user.
export LD_LIBRARY_PATH=$XRDLIBS:$LD_LIBRARY_PATH
cd /var/log/root/xrootd
# workaround change xroot.log access rights
if [ ! -f xrootd.log ]; then
touch xrootd.log
fi
chown xrootd:xrootd xrootd.log
limit on 1 GB resident memory, and 2 GB virtual memory
ulimit -m 1048576 -v 2097152 -n 65000
echo "daemon $XROOTD -b -l $XRDLOG -R $XRDUSER -c $XRDCF $XRDDEBUG"
daemon $XROOTD -b -l $XRDLOG -R $XRDUSER -c $XRDCF $XRDDEBUG
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/xrootd
return $RETVAL
}
stop() {
[ ! -f /var/lock/subsys/xrootd ] && return 0 || true
echo -n $"Stopping $prog: "
killproc proofserv.exe
Assuming proofd is on port 1093
killproc xrootd will also kill the standalone xrootd
So we prefer here to look for the xrootd process associated with proofd on 1093
proofdpid=`netstat -ptln | grep ":1093" | grep xrootd | awk '{print $7}' | sed 's/\/xrootd//g'`
RETVAL=0
if [[ "X$proofdpid" != "X" ]] ; then
kill $proofdpid
killproc xrootd
RETVAL=$?
fi
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/xrootd
return $RETVAL
}
See how we were called.
case “$1” in
start)
start
;;
stop)
stop
;;
status)
status xrootd
RETVAL=$?
;;
restart|reload)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/xrootd ]; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
exit 1
esac
exit $RETVAL