LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   cronjob issue (https://www.linuxquestions.org/questions/solaris-opensolaris-20/cronjob-issue-4175431205/)

egarreg 10-08-2012 03:53 PM

cronjob issue
 
I am getting this error and its filling up /var/mail; how can I fix this?


Your "cron" job on alpotaapp-c03
. .profile; $OTA_SC_LOG_ROOT/trace/apisnoop/oodata/tsoodata.sh

produced the following output:

sh: ?: not found
stty: : No such device or address

nugat 10-08-2012 09:06 PM

Quote:

Originally Posted by egarreg (Post 4800657)
I am getting this error and its filling up /var/mail; how can I fix this?


Your "cron" job on alpotaapp-c03
. .profile; $OTA_SC_LOG_ROOT/trace/apisnoop/oodata/tsoodata.sh

produced the following output:

sh: ?: not found
stty: : No such device or address

show the contents of that script:
Code:

cat $OTA_SC_LOG_ROOT/trace/apisnoop/oodata/tsoodata.sh

jlliagre 10-09-2012 12:44 AM

and the .profile content too.

egarreg 10-09-2012 10:18 AM

cat $OTA_SC_LOG_ROOT/trace/apisnoop/oodata/tsoodata.sh
#!/usr/bin/ksh --

LOG=//var/opt/smarttrust/dpa/log/trace/apisnoop/oodata/tsoodata_`/usr/bin/date +%Y%m%d`.txt

/usr/bin/echo "====================================================== " >> $LOG
/usr/bin/echo "STARTED `/usr/bin/date`" >> $LOG
/usr/bin/echo "====================================================== " >> $LOG
/appl/smarttrust/dpa/dp/bin/dtool diag -l 10.162.7.179 10100 >> $LOG

******************************************************************************************


VISUAL=vi
DPTRACELEVEL=2
OTA_HOME=/appl/smarttrust/dpa/dp
DP_HOME=/appl/smarttrust/dpa
OTA_SC_SOFTWARE_ROOT=/appl/smarttrust/dpa/dp
OTA_SC_LOG_ROOT=/var/opt/smarttrust/dpa/log
OTA_SC_DATA_ROOT=/var/opt/smarttrust/dpa/data
OTA_SC_SDK_ROOT=/appl/smarttrust/dpa/dp/sdk
DP_SINGLE_NODE=YES
export VISUAL DPTRACELEVEL OTA_HOME DP_HOME OTA_SC_SOFTWARE_ROOT OTA_SC_LOG_ROOT OTA_SC_DATA_ROOT OTA_SC_SDK_ROOT DP_SINGLE_NODE

# Source the otaenv file
. $OTA_SC_SOFTWARE_ROOT/.otaenv

OPENWINHOME=/usr/openwin
PATH=.:/opt/SUNWste/bin:/usr/bin:/usr/sbin:/etc:/usr/ccs/bin:/usr/ucb:$OPENWINHOME/bin:$ORACLE_HOME/bin:$OTA_SC_SOFTWARE_ROOT/bin:/opt/bin:/usr/local/bin
MANPATH=$OPENWINHOME/share/man:$OPENWINHOME/man:/usr/man
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib32:$ORACLE_HOME/lib:$OPENWINHOME/lib:/opt/SUNWconn/lib:$OTA_SC_SOFTWARE_ROOT/library

# Path used for GemExplorer98 Gateway card module.
SCENARIO_LIB_PATH=$OTA_SC_SOFTWARE_ROOT/config; export SCENARIO_LIB_PATH

# Path used by SNMP master agent.
SR_AGT_CONF_DIR=$OTA_SC_SOFTWARE_ROOT/config
export OPENWINHOME PATH MANPATH LD_LIBRARY_PATH SCENARIO_LIB_PATH SR_AGT_CONF_DIR

# DATE for crontab logging
LOG_DATE=`date '+%Y%m%d'`
export LOG_DATE

ulimit -n 1024

PS1="`whoami`@`hostname`> "
export PS1

alias dp="/appl/smarttrust/dpa/dp/bin/dpoperator"
alias dpcm="/appl/smarttrust/dpa/dp/bin/configurationmanager"
alias dt='dtool diag 10.162.7.178 10106;dtool diag 10.162.7.179 10100'
alias sfmlog="tail -100f $OTA_SC_LOG_ROOT/trace/sfm/sfm1a`date '+%Y%m%d'`.log"
alias tslog="tail -100f $OTA_SC_LOG_ROOT/trace/transport/ts1a`date '+%Y%m%d'`.log"
alias aaclog="tail -100f $OTA_SC_LOG_ROOT/trace/system/aacserver`date '+%Y%m%d'`.log"
alias evlog="tail -100f $OTA_SC_LOG_ROOT/trace/system/eventlogserver`date '+%Y%m%d'`.log"
alias bomlog="tail -100f $OTA_SC_LOG_ROOT/trace/bom/bomserver`date '+%Y%m%d'`.log"
alias bomclog="tail -100f $OTA_SC_LOG_ROOT/trace/bom/bomclient`date '+%Y%m%d'`.log"
alias simlog="tail -100f $OTA_SC_LOG_ROOT/trace/sim_import/simimport`date '+%Y%m%d'`.log"

SS7_CP_CONFIGFILE="/appl/smarttrust/dpa/dp/config/cp.cnf"
export SS7_CP_CONFIGFILE

if (test ! -d /var/opt/smarttrust/dpa/log/trace/ss7)
then
mkdir -p /var/opt/smarttrust/dpa/log/trace/ss7
fi

nugat 10-09-2012 07:46 PM

i don't see anything in either of those files that would cause that. try them one by one.

first:
Code:

. .profile
do you see any errors/output?

then:
Code:

$OTA_SC_LOG_ROOT/trace/apisnoop/oodata/tsoodata.sh
any errors/output?

if so, then try to narrow it down. is the "dtool" program a binary or a text script? you can check with:

Code:

file /appl/smarttrust/dpa/dp/bin/dtool
try to run that command by itself and see if it causes the error:
Code:

/appl/smarttrust/dpa/dp/bin/dtool diag -l 10.162.7.179 10100
Note: be prepared to Ctrl+C or whatever to cancel it, if necessary.


All times are GMT -5. The time now is 08:10 PM.