Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, Im using CentOS 5. I don't know why my logs in /var/log/messages don't work including /var/log/cron
here's my previous logs in /var/log/messages
Code:
Aug 3 23:24:50 localhost smartd[2817]: smartd is exiting (exit status 0)
Aug 3 23:24:50 localhost avahi-daemon[2701]: Got SIGTERM, quitting.
Aug 3 23:24:50 localhost avahi-daemon[2701]: Leaving mDNS multicast group on interface vmnet8.IPv6 with address fe80::250:56ff:fec0:8.
Aug 3 23:24:50 localhost avahi-daemon[2701]: Leaving mDNS multicast group on interface vmnet8.IPv4 with address 172.16.67.1.
Aug 3 23:24:50 localhost avahi-daemon[2701]: Leaving mDNS multicast group on interface vmnet1.IPv6 with address fe80::250:56ff:fec0:1.
Aug 3 23:24:50 localhost avahi-daemon[2701]: Leaving mDNS multicast group on interface vmnet1.IPv4 with address 172.16.123.1.
Aug 3 23:24:50 localhost avahi-daemon[2701]: Leaving mDNS multicast group on interface virbr0.IPv6 with address fe80::200:ff:fe00:0.
Aug 3 23:24:50 localhost avahi-daemon[2701]: Leaving mDNS multicast group on interface virbr0.IPv4 with address 192.168.122.1.
Aug 3 23:24:50 localhost dnsmasq[2699]: reading /etc/resolv.conf
Aug 3 23:24:50 localhost dnsmasq[2699]: using nameserver 192.168.1.1#53
Aug 3 23:24:50 localhost avahi-daemon[2701]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::216:17ff:fe46:90d6.
Aug 3 23:24:50 localhost avahi-daemon[2701]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.183.
Aug 3 23:24:50 localhost libvirtd: Shutting down on signal 15
Aug 3 23:24:50 localhost dnsmasq[2699]: exiting on receipt of SIGTERM
Aug 3 23:24:58 localhost xinetd[7579]: Exiting...
Aug 3 23:25:02 localhost hcid[2252]: Got disconnected from the system message bus
Aug 3 23:25:02 localhost rpc.statd[2185]: Caught signal 15, un-registering and exiting.
Aug 3 23:25:02 localhost portmap[10752]: connect from 127.0.0.1 to unset(status): request from unprivileged port
Aug 3 23:25:03 localhost restorecond: terminated
Aug 3 23:25:03 localhost auditd[2093]: The audit daemon is exiting.
Aug 3 23:25:03 localhost kernel: audit(1217777103.290:237): audit_pid=0 old=2093 by auid=4294967295 subj=system_u:system_r:auditd_t:s0
Aug 3 23:25:03 localhost pcscd: pcscdaemon.c:572:signal_trap() Preparing for suicide
Aug 3 23:25:03 localhost kernel: usb 1-6: USB disconnect, address 2
Aug 3 23:25:03 localhost pcscd: hotplug_libusb.c:376:HPRescanUsbBus() Hotplug stopped
Aug 3 23:25:04 localhost pcscd: readerfactory.c:1379:RFCleanupReaders() entering cleaning function
Aug 3 23:25:04 localhost pcscd: pcscdaemon.c:532:at_exit() cleaning /var/run
Aug 3 23:25:04 localhost kernel: Kernel logging (proc) stopped.
Aug 3 23:25:04 localhost kernel: Kernel log daemon terminating.
Aug 3 23:25:05 localhost exiting on signal 15
This only points to a halt or reboot, not syslog failure. Funny enough I vaguely recall a somwhat similar question not that long ago. When did this failure start? After some update? Does verifying the syslog package with RPM show its OK? When syslog is running does 'lsof -w -n -p $PID_of_syslog' or 'lsof -w -n +D /var' show files opened by syslog? Did anything change in (the (extended) access rights of) syslog.conf?
I can remember, i was trying to get scripts work in crontab by using tail -f /valog/messages and /var/log/cron to see what's happening why my command in crontab is not working after a poweroff and started the next day, it's not receiving any logs.
Quote:
When syslog is running does 'lsof -w -n -p $PID_of_syslog' or 'lsof -w -n +D /var' show files opened by syslog?
Code:
[root@localhost ~]# lsof -w -n -p 2045
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
syslogd 2045 root cwd DIR 8,2 4096 2 /
syslogd 2045 root rtd DIR 8,2 4096 2 /
syslogd 2045 root txt REG 8,2 35832 14633316 /sbin/syslogd
syslogd 2045 root mem REG 8,2 125736 11001562 /lib/ld-2.5.so
syslogd 2045 root mem REG 8,2 1597968 11001577 /lib/libc-2.5.so
syslogd 2045 root mem REG 8,2 46680 10999336 /lib/libnss_files-2.5.so
Quote:
Did anything change in (the (extended) access rights of) syslog.conf?
Code:
[root@localhost ~]# ls -l /etc/syslog.conf
-rw-r--r-- 1 root root 694 May 25 08:45 /etc/syslog.conf
please let me know if theres anything wrong with all of them of if i executed the right command you were asking.
Ive noticed that that all of the files that don't have the read permission were also the same files that stoped logging according to it's date "Aug 3". Does it affect it?
There's a few ways to get more info. One could be to search Linuxquestions.org and the CentOS bug tracker, mailing lists and forum for similar problems. If that doesn't yield anything expand search to Red Hat and other OS sources. If that doesn't yield anything then you've covered everything that could be faster and more efficient and we'll try to work it out ourselves. BTW, does klogd run OK? Your syslogd PID 2045 shows it hasn't opened /dev/log. As root account user, notice the commandline of your running syslog ('pgrep -lf syslogd'), kill it (don't use '/etc/init.d/syslogd stop': keep klogd running), then try to start syslogd from the commandline as '/usr/bin/strace -v -o /tmp/syslog.strace /sbin/syslogd', adding these: "-f /etc/syslog.conf -d -a /dev/log 2>&1 | tee /tmp/syslog.tee" to your default switches to force it to read syslog.conf, enter debug mode and stay in the foreground, force it to use /dev/log and copy stdout and stderr to the file /tmp/syslog.tee. In another terminal screen execute 'pkill -USR1 -f /sbin/syslogd' to make it spit out debug messages if it doesn't already, then type 'logger PING', then type '( \ps axZ|grep syslogd; \ls -alZ /etc/syslog.conf /dev/log /sbin/syslogd; rpm -qVv sysklogd; /usr/sbin/lsof -w -n +D /var/log; \ls -aldZ / /var /var/log /var/log/messages; ) | tee /tmp/syslog.attr'. Now switch back to the first terminal window and CTRL+C to kill strace, then '/etc/init.d/syslogd restart'. Now you have three logs: /tmp/syslog.{tee,strace,attr} to read.
If reading those logs doesn't work for you (and I guess it's a wee bit too much lines to post here?) please upload logs as tarball to some free hoster and post the URI here. Before doing so replace any information in your logs if you need to but please don't delete lines unless you know for certain it won't affect log diagnosis.
I solved the problem by installing rsyslog, don't know yet what will happen next. my primary concern is to get log files working. Thanks for response and tips.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.