Page 1 of 1

Logeintrag confixx_counterscript.pl

Posted: 2003-09-02 21:09
by schl
wo muss ich das einstellen, dass das confixx counterscript nicht bei jedem ausführen einen logeintrag in die /var/log/messages schreibt???

danke

Re: Logeintrag confixx_counterscript.pl

Posted: 2003-09-02 21:55
by ichschonwieder
Setz ein Minus

Code: Select all

- 
vor den Eintrag in der cron

BTW: Mit der Boardsuche hättest du nicht fragen brauchen ;)

Re: Logeintrag confixx_counterscript.pl

Posted: 2003-09-03 14:29
by static
Hi,
wenn die Frage grad mal wieder auftaucht frag ich auch nochmal nach:

Weiss jemand wie man das unter Debian hinbekommt? Ich habe darüber leider nichts gefunden.

so long
static

Re: Logeintrag confixx_counterscript.pl

Posted: 2003-09-04 10:48
by ice

Code: Select all

 > /dev/null 
Fehlerfrei --> keinen Eintrag
Fehler --> Eintrag

Code: Select all

 > /dev/null 2>&1
Fehler, Fehler frei --> keinen Eintrag

Re: Logeintrag confixx_counterscript.pl

Posted: 2003-09-04 19:42
by static
Hi,
@ICE, das war natürlich das Erste was ich ausprobiert habe, leider ohne Erfolg:

Code: Select all

meriadoc:~# tail /var/log/syslog -n 1
Sep  4 16:36:01 meriadoc /USR/SBIN/CRON[12889]: (root) CMD (/root/testscript.sh > /dev/null 2>&1)
so long
static

Re: Logeintrag confixx_counterscript.pl

Posted: 2003-09-04 20:28
by ice
Dann hast Du das File "confixx" in /etc/cron.d/. Ich habe den Eintrag im crontab.

Re: Logeintrag confixx_counterscript.pl

Posted: 2003-09-04 20:42
by static
Hi,
das hat ja eigentlich nichts mit Confixx zu tun... Geht allgemein darum wie ich einen Cronjob aus den Logs rauskriege.
Ausserdem steht der in der Crontab und nicht in cron.d:

Code: Select all

meriadoc:~# cat /etc/crontab 
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
25 6    * * *   root    test -e /usr/sbin/anacron || run-parts --report /etc/cron.daily
47 6    * * 7   root    test -e /usr/sbin/anacron || run-parts --report /etc/cron.weekly
52 6    1 * *   root    test -e /usr/sbin/anacron || run-parts --report /etc/cron.monthly
#


*/1 *   * * *   root    /root/testscript.sh > /dev/null 2>&1
Ergibt:

Code: Select all

meriadoc:~# tail /var/log/syslog -n 1
Sep  4 16:36:01 meriadoc /USR/SBIN/CRON[12889]: (root) CMD (/root/testscript.sh > /dev/null 2>&1)
Jemand ne Idee?

so long
static

Re: Logeintrag confixx_counterscript.pl

Posted: 2003-12-06 01:10
by headdown
Ich weiß nicht wie das bei Debian ist, aber bei SuSE bekommt man mit man 5 crontab unter EXTENSIONS den Hinweis:
If the uid of the owner is 0, he can put a "-" as first character of a crontab entry. Then cron won't write a syslog message about this command.
Die pipes regeln NICHT den syslog!

Re: Logeintrag confixx_counterscript.pl

Posted: 2004-03-09 21:24
by gilligan
Bei der Suse ist das auch so. Und funktioniert auch. Gruß, G.