简介
本文档介绍使用基于java的命令行界面(CLI)的Cisco Finesse服务器或任何其他基于Cisco Voice Operating System(VOS)的产品的多个故障排除场景。
注意:本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
使用CLI排除基于Cisco VOS的Finesse服务器故障
一般概述
Cisco VOS CLI提供了一组命令,可以非常有效地完成某些故障排除任务。
清理磁盘空间
对于任何基于VOS的服务器来说,非常常见的任务是清理公共分区中的空间。此命令可用于此目的。
首先,列出日志文件,并指定路径和可选密钥。
admin:file list activelog /desktop/logs/webservices date detail
11 Aug,2016 20:26:23 1,927,946 Desktop-webservices.2016-08-11T15-53-39.646.startup.log.zip
11 Aug,2016 21:44:42 1,105,322 Error-Desktop-webservices.2016-08-11T15-53-40.166.startup.log.zip
12 Aug,2016 01:48:58 1,741,638 Desktop-webservices.2016-08-11T20-26-23.164.log.zip
12 Aug,2016 03:35:30 1,126,078 Error-Desktop-webservices.2016-08-11T21-44-42.664.log.zip
12 Aug,2016 07:11:33 1,753,064 Desktop-webservices.2016-08-12T01-48-58.164.log.zip
12 Aug,2016 09:26:17 1,125,984 Error-Desktop-webservices.2016-08-12T03-35-30.164.log.zip
12 Aug,2016 12:34:08 1,741,476 Desktop-webservices.2016-08-12T07-11-33.664.log.zip
12 Aug,2016 15:17:05 1,125,790 Error-Desktop-webservices.2016-08-12T09-26-17.664.log.zip
然后删除旧的日志文件。或者,您可以指定noconfirm键来避免,并且不按yes进行确认。
admin:file delete activelog /desktop/logs/webservices/*webservices.2016-08-11* noconfirm
files: found = 4, deleted = 4
输入的审核CLI命令
此命令列出输入的所有VOS CLI命令。即使命令执行不成功。
从输出中可以看到,系统已重新启动,Tomcat-trust证书已导入,Tomcat服务在此之后重新启动。
admin:file search activelog platform/log/cli* "running command" ignorecase recurs
Searching path: /var/log/active/platform/log/cli*
2016-11-03 09:59:12,558 INFO [main] sdMain.main - running command -> [utils system restart ]
2016-11-03 09:38:52,623 INFO [main] sdMain.main - running command -> [set cert import trust tomcat]
2016-11-03 09:39:30,978 INFO [main] sdMain.main - running command -> [utils service restart Cisco Tomcat]
2016-11-03 09:41:16,664 INFO [main] sdMain.main - running command -> [show cert own tomcat]
Search completed
注意:在某些基于VOS的服务器上ignorecase密钥不可用。
联机查看日志
查找相关日志文件
如果特定错误消息显示在Finesse客户端中,则可以使用搜索选项案例来确定确切的时间戳和日志文件。
admin:file search activelog /desktop/logs/ "100011" recurs ignorecase
Searching path: /var/log/active//desktop/logs/
/var/log/active//desktop/logs/realm/realm.log:1289383032: Nov 18 2016 08:14:15.076 +0100:
[http-bio-8445-exec-10] INFO CCRealmConfig.finesseAuthenticate(): Unable to authenticate user: 100011
Search completed
输出显示确切的日志文件、具有msec精度的时间戳和生成的错误消息“无法验证用户:100011”。
联机查看文件
找到相关日志文件后的下一步是查看它。对于大型日志文件使用file dump选项并不是非常有用。可以使用文件视图,因此您可以直接导航到文件的末尾。
admin:file view activelog /desktop/logs/realm/realm.log
0: Aug 11 2016 15:52:14.423 +0200: [localhost-startStop-1] INFO
Loaded realm log config file at: /opt/cisco/desktop/conf/realm/log4j.xml
55577: Aug 11 2016 15:53:10.000 +0200: [Infrastructure Initialization, completed] INFO
Loaded realm log config file at: /opt/cisco/desktop/conf/realm/log4j.xml
options: q=quit, n=next, p=prev, b=begin, e=end (lines 1 - 20 of 374) :
956921239: Nov 14 2016 11:53:13.283 +0100: [http-bio-8445-exec-12] INFO
CCRealmConfig.finesseAuthenticate(): Unable to authenticate user: 1012
1206572479: Nov 17 2016 09:14:04.523 +0100: [http-bio-8082-exec-6] INFO
CCRealmConfig.finesseAuthenticate(): Unable to authenticate user: MEDIASENSE_API
1217996207: Nov 17 2016 12:24:28.251 +0100: [http-bio-8082-exec-10] INFO
CCRealmConfig.finesseAuthenticate(): Unable to authenticate user: MEDIASENSE_API
1289292089: Nov 18 2016 08:12:44.133 +0100: [http-bio-8445-exec-22] INFO
CCRealmConfig.finesseAuthenticate(): Unable to authenticate user: 5678
1289383032: Nov 18 2016 08:14:15.076 +0100: [http-bio-8445-exec-10] INFO
CCRealmConfig.finesseAuthenticate(): Unable to authenticate user: 100011
end of the file reached
options: q=quit, n=next, p=prev, b=begin, e=end (lines 361 - 374 of 374) :
在VOS中浏览目录
可用于多种原因。其中包括检查是否生成了日志文件以证明进程运行、检查日志大小以清理磁盘或自学。
此命令将提供按提供的名称过滤的日志文件列表。选项详细信息显示日期和大小。附加键日期根据文件生成的时间对输出进行排序。
admin:file list activelog /desktop/logs/webservices/*2016-08-12* det date
12 Aug,2016 07:11:33 1,753,064 Desktop-webservices.2016-08-12T01-48-58.164.log.zip
12 Aug,2016 09:26:17 1,125,984 Error-Desktop-webservices.2016-08-12T03-35-30.164.log.zip
12 Aug,2016 12:34:08 1,741,476 Desktop-webservices.2016-08-12T07-11-33.664.log.zip
12 Aug,2016 15:17:05 1,125,790 Error-Desktop-webservices.2016-08-12T09-26-17.664.log.zip
12 Aug,2016 17:56:43 1,741,988 Desktop-webservices.2016-08-12T12-34-08.664.log.zip
12 Aug,2016 21:07:52 1,125,050 Error-Desktop-webservices.2016-08-12T15-17-05.164.log.zip
12 Aug,2016 23:19:18 1,753,089 Desktop-webservices.2016-08-12T17-56-43.663.log.zip
13 Aug,2016 02:58:40 1,125,382 Error-Desktop-webservices.2016-08-12T21-07-52.664.log.zip
13 Aug,2016 04:41:53 1,742,441 Desktop-webservices.2016-08-12T23-19-18.664.log.zip
dir count = 0, file count = 9
检查平台历史记录
有关服务器升级、思科选项包(COP)文件安装和重新启动的基本诊断信息非常有用。尤其是在故障排除过程中。
admin:file dump install system-history.log
=======================================
Product Name - Cisco Finesse
Product Version - 11.0.1.10000-24
Kernel Image - 2.6.32-431.20.3.el6.x86_64
=======================================
08/11/2016 12:46:19 | root: Install 11.0.1.10000-24 Start
08/11/2016 06:02:15 | root: Boot 11.0.1.10000-24 Start
08/11/2016 15:45:52 | root: Install 11.0.1.10000-24 Success
08/11/2016 15:45:53 | root: Boot 11.0.1.10000-24 Start
08/26/2016 12:50:14 | root: Cisco Option Install finesse-cce.1101.ES05.10000.cop Start
08/26/2016 13:25:51 | root: Cisco Option Install finesse-cce.1101.ES05.10000.cop Success
08/26/2016 13:51:14 | root: Restart 11.0.1.10000-24 Start
08/26/2016 13:51:40 | root: Boot 11.0.1.10000-24 Start
10/19/2016 17:16:48 | root: Shutdown 11.0.1.10000-24 Start
10/20/2016 12:17:10 | root: Boot 11.0.1.10000-24 Start
下载日志
如果需要从系统中提取日志以进行进一步分析,则可以使用此命令。当Cisco Tomcat Web服务器关闭且无法使用实时监控工具(RTMT)时,该功能不可替换。
您可以根据时间过滤器提取日志。在本例中是过去两个小时。
admin:file get activelog /desktop/logs/webservices/ reltime hours 2 compress
This command can take significantly long time,
and can also affect the system wide IOWAIT on your system.
Would you like to proceed [y/n]?y
Please wait while the system is gathering files info ...done.
Sub-directories were not traversed.
Number of files affected: 1
Total size in Bytes: 3460015
Total size in Kbytes: 3378.921
Would you like to proceed [y/n]? y
SFTP server IP:
此外,还可以根据名称过滤器提取日志。在本示例中,仅从安装目录提取日志扩展名的文件。文件未压缩。
admin:file get install /*.log
Please wait while the system is gathering files info ...done.
Sub-directories were not traversed.
Number of files affected: 10
Total size in Bytes: 2640585
Total size in Kbytes: 2578.6963
Would you like to proceed [y/n]? n
Files transfer cancelled.
另一个有用的案例是收集日志以进行特定时间范围的根本原因分析。
admin:file get activelog /desktop/logs/ abstime 09:00:11/13/16 09:00:11/14/16 recurs
Please wait while the system is gathering files info ...done.
Sub-directories were traversed.
Number of files affected: 2
Total size in Bytes: 7446444
Total size in Kbytes: 7271.918
Would you like to proceed [y/n]?
注意:确保验证总大小值,如果它过大,请缩小时间范围或放置更具体的目录。