|
|
发表于 2008-10-20 14:42:42
|
显示全部楼层
Post by Akrit;1896329
刚才reboot了两次,暂时没出现什么问题
不过发现/dev/rtc和/dev/rtc0依然存在,不知为什么?
BTW:顺便弱弱的问一下,为什么我机器上没有/var/log/kern.log?
我的问题是没有 rtc0,可能是你的板未使用hpet。。那也没啥问题,原因你可以看下 demsg|grep -i rtc
我的目前是将 - Location: │
- │ -> Device Drivers │
- │ -> Real Time Clock (RTC_CLASS [=m])
复制代码 编成模块,这样里面的子项目 "Set system time from RTC on startup and resume" 就不可用,也就是N,怀疑就是这个闹的
Real Time Clock 里的其它模块也大都是 N
目前为止,没有再死鸡过了
至于 /var/log/kern.log 是因为你没有配置 syslog-ng
鉴于目前gentoo-wiki 不能访问,你可以参考我的: #cat /etc/syslog-ng/syslog-ng.conf
- options { chain_hostnames(off); sync(0); stats(43200); };
- #source where to read log
- source src { unix-stream("/dev/log" max-connections(256)); internal(); };
- source kernsrc { file("/proc/kmsg"); };
- #define destinations
- destination authlog { file("/var/log/auth.log"); };
- destination syslog { file("/var/log/syslog"); };
- destination cron { file("/var/log/cron.log"); };
- destination daemon { file("/var/log/daemon.log"); };
- destination kern { file("/var/log/kern.log"); };
- destination lpr { file("/var/log/lpr.log"); };
- destination user { file("/var/log/user.log"); };
- destination mail { file("/var/log/mail.log"); };
- destination mailinfo { file("/var/log/mail.info"); };
- destination mailwarn { file("/var/log/mail.warn"); };
- destination mailerr { file("/var/log/mail.err"); };
- destination newscrit { file("/var/log/news/news.crit"); };
- destination newserr { file("/var/log/news/news.err"); };
- destination newsnotice { file("/var/log/news/news.notice"); };
- destination debug { file("/var/log/debug"); };
- destination messages { file("/var/log/messages"); };
- destination console { usertty("root"); };
- destination console_all { file("/dev/tty12"); };
- destination xconsole { pipe("/dev/xconsole"); };
- #create filters
- filter f_authpriv { facility(auth, authpriv); };
- filter f_syslog { not facility(authpriv, mail); };
- filter f_cron { facility(cron); };
- filter f_daemon { facility(daemon); };
- filter f_kern { facility(kern); };
- filter f_lpr { facility(lpr); };
- filter f_mail { facility(mail); };
- filter f_user { facility(user); };
- filter f_debug { not facility(auth, authpriv, news, mail); };
- filter f_messages { level(info..warn)
- and not facility(auth, authpriv, mail, news); };
- filter f_emergency { level(emerg); };
- filter f_info { level(info); };
- filter f_notice { level(notice); };
- filter f_warn { level(warn); };
- filter f_crit { level(crit); };
- filter f_err { level(err); };
- filter f_failed { match("failed"); };
- filter f_denied { match("denied"); };
- #connect filter and destination
- log { source(src); filter(f_authpriv); destination(authlog); };
- log { source(src); filter(f_syslog); destination(syslog); };
- log { source(src); filter(f_cron); destination(cron); };
- log { source(src); filter(f_daemon); destination(daemon); };
- log { source(kernsrc); filter(f_kern); destination(kern); };
- log { source(src); filter(f_lpr); destination(lpr); };
- log { source(src); filter(f_mail); destination(mail); };
- log { source(src); filter(f_user); destination(user); };
- log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
- log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
- log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
- log { source(src); filter(f_debug); destination(debug); };
- log { source(src); filter(f_messages); destination(messages); };
- log { source(src); filter(f_emergency); destination(console); };
- #default log
- log { source(src); destination(console_all); };
复制代码
另外,这是 #cat /etc/logrotate.d/syslog-ng,logrotate是用于自动滚动日志的工具(由cron加载,这两个东东安装手册里都有),免的无限增长- # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v 1.2 2004/07/18 02:25:02 dragonheart Exp $
- #
- # Syslog-ng logrotate snippet for Gentoo Linux
- # contributed by Michael Sterrett
- #
- /var/log/messages /var/log/auth.log /var/log/syslog /var/log/cron.log /var/log/daemon.log /var/log/kern.log /var/log/user.log /var/log/debug {
- sharedscripts
- postrotate
- /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
- endscript
- }
复制代码
ps:
clock (baselayout2 为hwclock)还是很重要的,是将时间调整到机器当前的时间,否则就只有借助ntp-client,如果也没使用,那么时间就会不对的。。特别是对当时启动的服务。。
至于ntp-client 我是设置在 /etc/cron.daily/ 里做为每日任务,并不推荐放在启动里,那样在每次重启时还要=它连接到远程对时,没网络时更要命(虽然设置了timeout还是浪费那几秒)。。 |
|