可在 CLI 中的 maintenance logs 上下文下查看日志。
使用 show 命令列出可用日志以及各个日志类型的最后一个日志条目的时间戳。
caji:> maintenance logs caji:maintenance logs> show Logs: LOG ENTRIES LAST alert 2 2013-10-16 02:44:04 audit 42 2013-10-16 18:19:53 fltlog 2 2013-10-16 02:44:04 scrk 0 - system 100 2013-10-16 03:51:01
最多可查看每个日志中最新的 100 个条目。
可通过两种不同的方式查看日志:
查看所有日志条目
查看日志条目组
将 select 命令与日志名称一起使用,并使用 list -a 命令查看所有日志条目。最新的条目显示在列表底部。
caji:maintenance logs> select audit caji:maintenance logs audit> list -a ENTRY TIME SUMMARY entry-000 2013-1-9 15:13:50 root, 10.154.161.197, User logged in entry-001 2013-1-9 15:17:42 root, 10.154.161.197, Released resources to cluster peer entry-002 2013-1-9 15:20:17 root, 10.154.161.197, Cluster takeover requested entry-003 2013-1-9 15:20:33 root, 10.154.161.197, Transferred ak:/net/igb1 to 2917b8aa-0b0a-4b74-f36b-ff0a8d150c3b ... entry-2077 2013-12-17 05:24:43 osc_agent, 10.80.218.16, User logged in entry-2078 2013-12-17 05:24:45 osc_agent, 10.80.218.16, User logged out entry-2079 2013-12-17 05:24:53 osc_agent, 10.80.218.16, User logged in
要一次性查看最多的 100 日志条目,选择日志并使用 show 命令。
caji:maintenance logs> select audit caji:maintenance logs audit> show ENTRY TIME SUMMARY entry-2874 2014-2-20 18:05:44 root, 10.159.134.211, Beginning system update to ak-nas@2014.02.11,1-0 entry-2875 2014-2-20 18:08:18 root, 10.159.134.211, Rebooting system as part of update to ak-nas@2014.02.11,1-0 entry-2876 2014-2-20 18:08:20 root, 10.159.134.211, User logged out entry-2877 2014-2-20 18:16:06 root, 10.159.134.211, User logged in entry-2878 2014-2-20 18:18:20 root, 10.159.134.211, Deleted update media ak-nas@2011.04.24.8.0,1-1.43 entry-2879 2014-2-20 18:34:19 root, 10.159.134.211, Cluster takeover requested ... entry-2970 2014-2-27 17:40:37 root, dhcp-amer-vpn-rmdc-anyconnect-10-159-100-157.vpn.oracle.com, User logged out of CLI entry-2971 2014-2-27 17:48:23 root, 10.159.100.157, User logged in entry-2972 2014-2-27 19:05:46 root, 10.159.100.157, Browser session timed out entry-2973 2014-2-27 23:53:31 root, dhcp-amer-vpn-rmdc-anyconnect-10-159-125-20.vpn.oracle.com, User logged in via CLI
然后使用 previous 或 next 命令查看前 100 个或后 100 个条目。
caji:maintenance logs alert> list ENTRY TIME SUMMARY entry-023 2013-1-16 15:06:36 d1dd862d-93ff-6e3d-a51c-fe5f81159a3e, System software update cannot proceed: J4400 and J4500 disk shelves are not supported in this ... entry-122 2013-2-17 20:34:06 65f79e6b-1a77-6041-9a92-9440dbba4c40, Finished replicating project 'Test1' from appliance 'AdamZhang'., Minor Alert
caji:maintenance logs alert> previous ENTRY TIME SUMMARY entry-000 2013-11-21 15:45:23 67ccd46c-3d4d-eb86-8966-f9e0ec497293, System software update cannot proceed: J4400 and J4500 disk shelves are not supported in this release., Minor alert ... entry-022 2013-1-16 15:06:10 2f840123-221c-49dc-ae26-e5bfe0952599, System software update cannot proceed: see alert log for condition(s) that are preventing upgrade, Minor alert
要一次性查看某个特定的日志条目组,选择此日志并将 list - 命令与一个数字一起使用,以列出所需数量的最新条目。
caji:maintenance logs> select audit caji:maintenance logs audit> list -5 ENTRY TIME SUMMARY entry-721 2013-2-18 22:02:02 <system>, <system>, Request to create replication package entry-722 2013-2-18 22:02:08 <system>, <system>, Request to modify replication package entry-723 2013-2-18 23:33:32 root, 10.135.69.243, User logged in entry-724 2013-2-19 00:48:51 root, 10.135.69.243, Browser session timed out entry-725 2013-2-19 23:30:11 root, User logged in via CLI
要查看日志条目的详细信息,将 select 命令与该条目名称一起使用,并使用 show 命令。
caji:maintenance logs> select audit caji:maintenance logs audit> select entry-000 show Properties: timestamp = 2013-10-15 00:59:37 user = root address = <console> summary = Enabled datalink:igb0 service annotation =
"annotation"(注释)指会话注释,在配置用户时可启用它。有关用户配置的信息,请参见Oracle ZFS Storage Appliance 管理指南 中的第 7 章 用户配置。
要导出日志,使用各个日志节点上提供的 collect 命令。将把包含所有请求日志信息的 <stdout> gz 文件下载到您的本地计算机上。
caji:maintenance logs> show Logs: LOG ENTRIES LAST alert 3458 2013-2-18 23:02:29 audit 731 2013-2-20 16:13:04 fltlog 2 2013-2-3 06:29:02 scrk 0 - system 44 2013-1-14 18:19:59 caji:maintenance logs> select fltlog caji:maintenance logs fltlog> collect SUNW-MSG-ID: AK-8000-86, TYPE: Defect, VER: 1, SEVERITY: Major EVENT-TIME: Wed Nov 13 03:50:15 UTC 2013 PLATFORM: Sun-Fire-X4240, CSN: 0000000000, HOSTNAME: hpc-iwashi-01 SOURCE: ak-diagnosis, REV: 1.0 EVENT-ID: d83655cd-c03d-efff-efde-9c78dd47259e DESC: The service processor needs to be reset to ensure proper functioning. AUTO-RESPONSE: None. IMPACT: Service Processor-controlled functionality, including LEDs, fault management, and the serial console, may not work correctly. REC-ACTION: Click the initiate repair button. SUNW-MSG-ID: FMD-8000-4M, TYPE: Repair, VER: 1, SEVERITY: Major EVENT-TIME: Wed Nov 13 03:50:15 UTC 2013 PLATFORM: Sun-Fire-X4240, CSN: 0000000000, HOSTNAME: hpc-iwashi-01 SOURCE: ak-diagnosis, REV: 1.0 EVENT-ID: d83655cd-c03d-efff-efde-9c78dd47259e DESC: All faults associated with an event id have been addressed. AUTO-RESPONSE: Some system components offlined because of the original fault may have been brought back online. IMPACT: Performance degradation of the system due to the original fault may have been recovered. REC-ACTION: No action is required. caji:maintenance logs fltlog>