More than a week after upgrading from Mandrake 10.1 to Mandriva 2009 I'm still trying to iron out problems. One is running logcheck. In 10.1 I had this in my crontab:
0 * * * * root /usr/local/etc/logcheck.sh
which ran logcheck every hour. Now in 2009 I can't get it to run. It's the same version as I had before using the same config files. Using this command from the cli:
su -s /bin/bash -c "/usr/sbin/logcheck -d -t" logcheck
logcheck will run but gives me these errors:
logoutput called with file: /var/log/syslog
Running logtail: /var/log/syslog
error: Killing lockfile-touch - 20489
error: Removing lockfile: /var/lock/logcheck.lock
Error: Could not run logtail or save output
Cleanup: Removing - /var/tmp/logcheck.rHWifN
The output mailed to me is:
Warning: If you are seeing this message, your log files may not have been
checked!
Details:
Could not run logtail or save output
Check temporary directory: /var/tmp/logcheck.lapCCo
declare -x DISPLAY=":0.0"
declare -x ENV="/root/.bashrc"
declare -x GCONF_TMPDIR="/tmp"
declare -x G_FILENAME_ENCODING="@locale"
declare -x HISTCONTROL="ignoredups"
declare -x HISTSIZE="1000"
declare -x HOME="/etc/logcheck"
declare -x HOSTNAME="localhost"
declare -x INPUTRC="/etc/inputrc"
declare -x LANG="en_US.UTF-8"
declare -x LANGUAGE="en_US.UTF-8:en_US:en"
declare -x LC_ADDRESS="en_US.UTF-8"
declare -x LC_COLLATE="en_US.UTF-8"
declare -x LC_CTYPE="en_US.UTF-8"
declare -x LC_IDENTIFICATION="en_US.UTF-8"
declare -x LC_MEASUREMENT="en_US.UTF-8"
declare -x LC_MESSAGES="en_US.UTF-8"
declare -x LC_MONETARY="en_US.UTF-8"
declare -x LC_NAME="en_US.UTF-8"
declare -x LC_NUMERIC="en_US.UTF-8"
declare -x LC_PAPER="en_US.UTF-8"
declare -x LC_SOURCED="1"
declare -x LC_TELEPHONE="en_US.UTF-8"
declare -x LC_TIME="en_US.UTF-8"
declare -x LESS="-MM"
declare -x LESSCHARSET="utf-8"
declare -x LESSKEY="/etc/.less"
declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s"
declare -x LOGNAME="logcheck"
declare -x LS_COLORS="rs=0:di=01;34:ln=01;36
i=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01
r=01;05;37;41: mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42
w=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=0 1;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31: *.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;3 1:*.tbz2=01;31:*.tz=01;31:*.lzma=01;31:*.tlz=01;31:*.deb=01;31:*.rpm=01;31:*.cpio=01;31:*.jar=01;31: *.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.iso=01;31:*.jpg=01;35:*.jpe g=01;35:*.JPG=01;35:*.JPEG=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=0 1;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01; 35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35: *.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmv b=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;3 5:*.yuv=01;35:*.divx=01;35:*.xvid=01;35:*.asf=01;35:*.wmv=01;35:*.mp4=01;35:*.3gp=01;35:*.flv=01;35: *.ico=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.m pc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.mp2=00;36:*.mod=00;36:*.xm=00;36:*.s3m=00;36:*.it=00;3 6:*.wma=00;36:*~=47;30:*.bak=47;30:*.swp=47;30:*.bck=47;30:*.bk=47;30:*.old=47;30:*.tmp=47;30:*.save =47;30:*.rpmsave=47;30:*.rpmnew=47;30:"
declare -x MAIL="/var/spool/mail/root"
declare -x MDV_MENU_STYLE="mandriva"
declare -x META_CLASS="download"
declare -x MPIRUN_HOME="/usr/bin"
declare -x NLSPATH="/usr/share/locale/%l/%N"
declare -x OLDPWD
declare -x PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin"
declare -x PWD="/root"
declare -x PYTHONPATH="/usr/lib/ooo-3.0/basis-link/program"
declare -x PYTHONSTARTUP="/etc/pythonrc.py"
declare -x QT4DOCDIR="/usr/share/doc/qt4/doc"
declare -x QTDIR="/usr/lib/qt3/"
declare -x QTINC=""
declare -x QTLIB=""
declare -x SCREENDIR="/root/tmp"
declare -x SECURE_LEVEL="3"
declare -x SHELL="/bin/bash"
declare -x SHLVL="3"
declare -x TERM="xterm"
declare -x TMP="/root/tmp"
declare -x TMPDIR="/var/tmp/logcheck.lapCCo"
declare -x USER="logcheck"
declare -x USERNAME="root"
declare -x XAUTHORITY="/etc/logcheck/.xauthLiJyUb"
declare -x XDG_DATA_DIRS="/usr/share:/opt/kde3/share"
I've made a user 'logcheck' in group 'logcheck' as I've seen suggested elsewhere. The above output is when run from the command line. When run from a cronjob this is all I see:
standard in must be a tty
I can't figure out why it ran so easily in 10.1 but won't in 2009.
Any advice would be greatly appreciated.
Chris