LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Find out with wich loglevel cron is running (https://www.linuxquestions.org/questions/linux-server-73/find-out-with-wich-loglevel-cron-is-running-4175526436/)

markush 11-25-2014 05:00 AM

Find out with wich loglevel cron is running
 
Hi all,

i'm running a Debian and an Ubuntu (12.04 LTS) Server. Last night some cronjobs failed and Im trying to find out, how wo change the loglevel for cron.

In the internet I found that one can add a line
Code:

EXTRA_OPTS="-L 2"
to /etc/default/cron or /etc/cron.conf respectively. Unfortunately I cannot seem to find out if cron was really started with this new option.

Here my question: Is it possible to find out with which commandline exactly a daemon was started? I don't see any additional logentries compared with before the change.

Markus

pan64 11-25-2014 09:54 AM

I think you need to debug the job itself, not the cron. You can try to write a small wrapper/starter script to log what you want and start the job.

eSelix 11-25-2014 10:26 AM

About question of reading command line, you can use
Code:

ps -Af | grep cron
to find it.

markush 11-25-2014 02:57 PM

Thanks to eSelix, the f option for ps is what I'm looking for.

Markus


All times are GMT -5. The time now is 11:15 AM.