AIX 机器上的系统日志

发布于 2024-10-06 15:16:44 字数 587 浏览 14 评论 0原文

我需要查看 AIX 机器上的 syslog。 我对此一无所知。 我浏览了 syslog.conf 文件并得到了类似的内容:

# "mail messages, at debug or higher, go to Log file. File must exist."
# "all facilities, at debug and higher, go to console"
# "all facilities, at crit or higher, go to all users"
#  mail.debug           /usr/spool/mqueue/syslog
#  *.debug              /dev/console
#  *.crit                       *
#  *.debug              /tmp/syslog.out     rotate size 100k files 4
#  *.crit               /tmp/syslog.out     rotate time 1d

Also,I don't know how to access /dev/console 有人可以帮忙吗?

I need to view syslog on AIX machine.
I have no clue about this.
I went through syslog.conf file and got something like this:

# "mail messages, at debug or higher, go to Log file. File must exist."
# "all facilities, at debug and higher, go to console"
# "all facilities, at crit or higher, go to all users"
#  mail.debug           /usr/spool/mqueue/syslog
#  *.debug              /dev/console
#  *.crit                       *
#  *.debug              /tmp/syslog.out     rotate size 100k files 4
#  *.crit               /tmp/syslog.out     rotate time 1d

Also,I donot know how to access /dev/console
Can somebody help out?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

征棹 2024-10-13 15:16:44

请参阅如何配置 AIX syslogd管理 AIX 日志

从您的配置中,我发现所有 syslogged 信息都可以在 /tmp/syslog.out 中找到,因为这是记录 *.debug 的位置。

如果您在那里没有找到任何内容,您应该检查 syslogd 守护进程是否确实在运行。

如果您对 syslog.conf 文件进行更改,则必须使用

refresh -s syslogd

Update 重新启动守护进程:我看到 syslog.conf 中的所有内容都是注释掉了。如果您想查看某些日志,则必须启用某些日志记录功能。例如,它应该如下所示:

# "mail messages, at debug or higher, go to Log file. File must exist."
# "all facilities, at debug and higher, go to console"
# "all facilities, at crit or higher, go to all users"
#  mail.debug           /usr/spool/mqueue/syslog
#  *.debug              /dev/console
#  *.crit                       *
*.debug              /tmp/syslog.out     rotate size 100k files 4
#  *.crit               /tmp/syslog.out     rotate time 1d

如果您想查看 /tmp/syslog.out 中的任何内容。

并且,不要忘记重新启动守护进程!

更新 2

要启用所有内容的日志记录,请将其放入 syslog.conf 中:

*.*              /tmp/syslog.out     rotate size 100k files 4

这样您就可以看到日志记录是否确实有效。

See How to configure AIX syslogd and managing AIX logs.

From your configuration, I see that all syslogged information can be found in /tmp/syslog.out since this is where *.debug is being logged.

If you don't find anything there, you should check if the syslogd daemon is actually running.

If you make a change to syslog.conf file, you have to restart the daemon using

refresh -s syslogd

Update: I see that everything in syslog.conf is commented out. If you want to see some logs, you have to enable some logging facility. For example, it should look like this:

# "mail messages, at debug or higher, go to Log file. File must exist."
# "all facilities, at debug and higher, go to console"
# "all facilities, at crit or higher, go to all users"
#  mail.debug           /usr/spool/mqueue/syslog
#  *.debug              /dev/console
#  *.crit                       *
*.debug              /tmp/syslog.out     rotate size 100k files 4
#  *.crit               /tmp/syslog.out     rotate time 1d

if you want to see anything in /tmp/syslog.out.

And, don't forget to restart the daemon!

Update 2:

To enable logging of everything, put this in syslog.conf:

*.*              /tmp/syslog.out     rotate size 100k files 4

This way you'll see if logging really is working.

星光不落少年眉 2024-10-13 15:16:44

您忘记了该文件必须存在:

touch /tmp/syslog.out

refresh -s syslogd

You forget that the file must exist:

touch /tmp/syslog.out

refresh -s syslogd
风蛊 2024-10-13 15:16:44

嗯,/dev/console控制台,一个(几乎可以肯定)连接到盒子本身的物理终端。它不是您可以从中获取信息的存储设备。

至于您需要查看哪个文件,它通常由您向我们展示的文件控制,并且可以根据设施和优先级将单独的消息发送到不同的地方。但是,由于您看到的所有这些行都被注释掉,因此它们将转到默认值,这可能是控制台。

Well, /dev/console is the console, a (almost certainly) physical terminal connected to the box itself. It's not a storage device that you can get the information back from.

As to which file you need to look at, it's usually controlled by that file you showed us and individual messages can be sent to different places based on the facility and priority. However, since all those lines you see are commented out, they'll go to the default, which is probably the console.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文