主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

mps-check

WindowsLinuxmacOS 系统上通过命令行测试和诊断服务器实例的问题

语法

mps-check host:port [--bearer-token bearer token] [--help|-h] [--timeout seconds] [--verbose|-v]

描述

mps-checkMATLAB® Production Server™ 实例发送请求并接收状态报告,您可以使用该报告来识别导致产品运行不佳的问题。

mps-checkstdout 报告的信息包括:

  • 服务器实例的状态

  • HTTP 接口正在监听的端口

  • 为服务器实例部署的存档

输入参数

host:port

指定运行服务器实例的计算机的主机名以及服务器实例侦听请求的端口号。

--bearer-token bearer token

如果在服务器实例上启用了应用程序访问控制,则此参量是必需的。要使用此参量,访问控制策略文件必须包含以下规则,以允许特定用户或用户组执行 mps-check 命令。

{
    "id": "<rule_id>",
    "subject": { "users": ["<user_id>"] ,
                 "groups": ["<group_id>"] },
    "resource": { "ctf": ["mps_check*"] },
    "action": ["execute"]
}
如果不添加规则,当 403 NotAuthorized 命令尝试验证已安装的 MATLAB Runtime 版本时,会出现 mps-check 错误。有关启用访问控制和访问控制策略文件的信息,请参阅 应用程序访问控制

--help | -h

显示使用 mps-check 命令的选项列表。使用此参量时,指定主机名和端口号是可选的。

--timeout seconds

seconds 中指定在超时之前等待服务器响应的时间。默认值为两分钟。

--verbose | -v

显示与服务器状态报告相关的详细系统消息。

示例

  • 显示在本地计算机端口 9910 上运行的服务器实例的诊断信息。

    在系统命令提示符下键入以下内容:

    mps-check localhost:9910
    Checking the MATLAB Runtime version 9.9.0 at C:\Program Files\MATLAB\
    Check completed successfully
  • 使用详尽选项显示在本地计算机端口 9910 上运行的服务器实例的诊断信息。

    在系统命令提示符下键入以下内容:

    C:\tmp>mps-check -v localhost:9910
    -- Resolve the hostname
    -- Start the mps-check client
    -- Retrieving the list of installed MATLAB Runtimes from the MATLAB Production Server
    -- start timer 00:02:00
    -- Connecting to the peer server
    -- Conncted. Start receiving TCP data
    -- Send HTTP request
    -- Send TCP data
    -- TCP data sent succeeded
    -- HTTP request sent
    -- TCP data received
    -- HTTP/1.1 200 OK
    -- HTTP response completed
    -- Cancel timer
    -- HTTP/1.1 200 OK
    Content-Length: 126
    Connection: Keep-Alive
    
    
    -- Retrieving the MATLAB Runtime list succeeded
    -- Shutdown TCP client
    -- Socket closed
    Checking the MATLAB Runtime version 9.9.0 at C:\Program Files\MATLAB\
    -- start timer 00:02:00
    -- Connecting to the peer server
    -- Conncted. Start receiving TCP data
    -- Send HTTP request
    -- Send TCP data
    -- TCP data sent succeeded
    -- HTTP request sent
    -- TCP data received
    -- HTTP/1.1 200 OK
    -- HTTP response completed
    -- Cancel timer
    -- Verify http response against the input
    -- Input = 25921
    -- Output = 161
    -- Verification succeeded
    Check completed successfully
    -- Shutdown TCP client
    -- Socket closed
    
    -- Terminated

版本历史记录

在 R2012b 中推出