linux - Different result when executed from Crontab -
i trying number of open files periodically through crontab using lsof|wc -l. returns zero. giving correct result when run directly.any idea strange behaviour?is related pipe size result can quite large?thanks lot.
kaka
the main difference environment variables.
in case might path. lsof found in or /usr/sbin , might in path when run interactivly, while not in path when run cron.
try /usr/sbin/lsof|wc -l
in cron script. , check local mail, cron output sent there, there might relevant error messages.
is related pipe size result can quite large?
no.
Comments
Post a Comment