ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Solaris10 accounting报错-ACCT ERRORS : see /var/adm/acct/nite/active0818

Solaris10 accounting报错-ACCT ERRORS : see /var/adm/acct/nite/active0818

原创 Linux操作系统 作者:cqubityj 时间:2009-08-18 09:23:59 0 删除 编辑
最近启用了Solaris10的accounting功能,但发现messages中有如下报错:

Aug 18 02:27:46 ols00biiacc001 inetd[1840]: [ID 317013 daemon.notice] ftp[8999] from 10.0.17.98 3848
Aug 18 02:30:00 ols00biiacc001 adm: [ID 702911 daemon.notice]
Aug 18 02:30:00 ols00biiacc001 last message repeated 4 times
Aug 18 02:30:00 ols00biiacc001 adm: [ID 702911 daemon.notice] **********  SYSTEM ACCOUNTING STARTED Tue Aug 18 02:30:00 CST 2009  **
********
Aug 18 02:30:00 ols00biiacc001 adm: [ID 702911 daemon.notice]
Aug 18 02:30:00 ols00biiacc001 last message repeated 4 times
Aug 18 02:31:41 ols00biiacc001 inetd[1840]: [ID 317013 daemon.notice] ftp[12137] from 10.0.17.98 3869
Aug 18 02:44:54 ols00biiacc001 adm: [ID 702911 daemon.error]
Aug 18 02:44:54 ols00biiacc001 last message repeated 1 time
Aug 18 02:44:54 ols00biiacc001 adm: [ID 702911 daemon.error] ************ ACCT ERRORS : see  /var/adm/acct/nite/active0818********
Aug 18 02:44:54 ols00biiacc001 adm: [ID 702911 daemon.error]
Aug 18 02:44:54 ols00biiacc001 last message repeated 1 time
Aug 18 02:46:05 ols00biiacc001 adm: [ID 702911 daemon.notice] ********** SYSTEM ACCOUNTING COMPLETED Tue Aug 18 02:46:05 CST 2009 **
********

实际上在系统中,文件/var/adm/acct/nite/active0818并未生成。

accounting功能是通过adm的cron job方式启用的,先看看adm的cron job.

root@ols00biiacc001:~ #> crontab -l adm
#ident  "@(#)adm        1.5     92/07/14 SMI"   /* SVr4.0 1.2   */
#
# The adm crontab file should contain startup of performance collection if
# the profiling and performance feature has been installed.
#
0 * * * * /usr/lib/acct/ckpacct
30 2 * * * /usr/lib/acct/runacct 2> /var/adm/acct/nite/fd2log
30 7 1 * * /usr/lib/acct/monacct

其中runacct是每天运行一次的cron job, 报错是由这个后台任务造成的。而runacct运行时将报错信息写入了fd2log文件,通过这个文件应该可以看出runacct报错的原因。

下面是fd2log文件中的信息:
root@ols00biiacc001:~ #> more /var/adm/acct/nite/fd2log
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***

文件中提示要更新/etc/acct/holidays文件,这个文件中记录了一些holiday的信息。

以下是/etc/acct/holidays文件:
root@ols00biiacc001:~ #> more /etc/acct/holidays
* @(#)holidays  January 1, 2006
*
* Prime/Nonprime Table for UNIX Accounting System
*
* Curr  Prime   Non-Prime
* Year  Start   Start
*
  2006  0800    1800
*
* only the first column (month/day) is significiant.
*
* month/day     Company
*               Holiday
*
1/1             New Years Day
7/4             Indep. Day
12/25           Christmas

可以看到,该文件中显示的年份还是2006年,其它设置看起来应该都没什么问题。把2006年改为2009年并保存,以后就不会再出现日志中的报错了。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/228190/viewspace-612547/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-19

  • 博文量
    133
  • 访问量
    425059