Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell OpenManage Server Administrator 版本 7.3 用户指南

对运行支持的 Red Hat Enterprise Linux 和 SUSE Linux Enterprise Server 操作系统的系统设置警报措施

设置事件的警报措施时,可以将操作指定为在服务器上显示警报。为了执行此操作,Server Administrator 会将消息写入 /dev/console。如果 Server Administrator 系统运行的是 X Window 系统,则不显示该消息。要在运行 X Window 系统时查看 Red Hat Enterprise Linux 系统上的警报消息,在事件发生之前必须启动 xconsolexterm -C。要在运行 X Window 系统时查看 SUSE Linux Enterprise Server 系统上的警报消息,在事件发生之前必须启动终端,例如: xterm -C

为事件设置警报措施时,可以指定用于 广播消息的操作。为了执行此操作,Server Administrator 会执行 wall 命令,该命令将消息发送到已登录且消息权限设为 的每个人。如果 Server Administrator 系统正在运行 X Window 系统,则默认情况下不会显示该消息。要在 X Window 系统运行时查看广播消息,必须在发生事件前启动诸如 xtermgnome-terminal 之类的终端。

设置事件的警报措施时,您可以将操作指定为 执行应用程序 。对 Server Administrator 可以执行的应用程序有一些限制。 要确保正确执行应用程序:

  • 不要指定基于 X Window 系统的应用程序, 因为 Server Administrator 无法正确执行此类应用程序。
  • 不要指定需要用户输入信息的应用程序,因为 Server Administrator 无法正确执行此类应用程序。
  • 指定应用程序时,请将 stdoutstderr 重定向至文件,以便查看所有输出或错误消息。
  • 如果希望为警报执行多个应用程序(或命令),请创建一个脚本,并将脚本的完整路径放入 应用程序的绝对路径框中。
示例 1: ps -ef >/tmp/psout.txt 2>&1

示例 1 中的命令执行应用程序 ps,将 stdout 重定向至文件 /tmp/psout.txt,并将 stderr 重定向至 stdout 所重定向的同一文件。

示例 2: mail -s "Server Alert" admin </tmp/alertmsg.txt>/tmp/mailout.txt 2>&1

示例 2 中的命令执行邮件应用程序,将文件 /tmp/alertmsg.txt 中包含的消息以 Server Alert(服务器警报)为主题发送至 Red Hat Enterprise Linux 用户或 SUSE Linux Enterprise Server 用户和管理员。用户必须在事件发生之前创建文件 /tmp/alertmsg.txt。此外,出现错误时, stdoutstderr 将重定向至文件 /tmp/mailout.txt


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\