Good day
Please assist with below .
I have created a simple script below which I have put in cron . I want
the script to run at specified times for 30 mins, how ever ndstrace is
not started when the job starts .
When i run this script manually it runs ok and i get the out put i
expect .But I am not getting the same out put when running a cron job
..it looks like ndstrace does not start at all .Nothing is being written
to the output file as well

#!/bin/bash
#rm -f /tmp/duplicat-user.log
#sleep 5
ndstrace -l > /tmp/duplicat-user.log &

sleep 5
ndstrace -c "set ndstrace = NODEBUG"
ndstrace -c 'dstrace file on'
ndstrace -c 'dstrace +time +tags +ldap'
sleep 300
#Let's check to see if ndstrace is already loaded, if so, unload it.
#

ps -ef|grep ndstrace|grep -v grep
if [ $? -eq 0 ]; then
ndstrace -u
fi


--
nkululeko
------------------------------------------------------------------------
nkululeko's Profile: https://forums.netiq.com/member.php?userid=666
View this thread: https://forums.netiq.com/showthread.php?t=52961