第四十三章 使用多个 IRIS 实例(三)
Windows
上的 iris
命令
在 Windows
上,必须从 install-dir\bin
目录运行 iris
命令(或在命令中包含完整路径)。
-
iris all
列出所有已安装实例的摘要信息,每行一个实例,如下所述。
注意:如果需要完整的信息,例如用于解析或报告目的,请使用 iris list
。
C:\InterSystems\IRISHealth\bin>iris all
Instance Version ID Port Directory
------------- ---------- ---- ---------
up irishealth 2022.1.0.114.0 51773 c:\intersystems\irishealth
-
iris allw
为每个实例列出与iris all
相同的信息,而不包含长字段值。可能会产生超过80
个字符的行。
C:\InterSystems\IRISHealth\bin>iris allw
Instance Name Version ID Port Directory
------------------------------- ---------------------------- ----- --------------------------------
up irishealth 2022.1.0.114.0 51773 c:\intersystems\irishealth
-
iris console instname [arguments]
在操作系统命令窗口而不是终端窗口中打开Terminal
。
-
iris force instname
强制关闭实例。 -
iris help
显示有关iris
命令的最新信息。
C:\InterSystems\IRISHealth\bin>iris help
usage:
iris start <instance> [<cpf_file>]
to start instance <instance>, optionally using the specified .cpf file.
An optional /EmergencyId=Username,Password can be used to start
InterSystems IRIS in emergency mode. When the EmergencyId argument
is supplied, the system starts up in emergency mode in which only the
baseline databases are mounted and access to InterSystems IRIS is
governed by InterSystems IRIS login using that username and password.
Emergency mode is supplied to give access in the event that privileged
users are not available or their password is forgotten. Emergency
startup is only available from an administrator account.
When InterSystems IRIS is started in emergency mode, the IRIS control
service is not used. This means that if you log out of Windows, all
the InterSystems IRIS processes will immediately exit.
or: iris startnostu <instance>
to start instance <instance> without running ^STU.
or: iris stop <instance>
to shut down instance <instance>.
or: iris stopnoshut <instance>
to shut down instance <instance> without running user shutdown routines.
or: iris stopstart <instance>
to shut down and restart instance <instance>.
Note: An optional /nofailover argument can be specified for stop,
stopnoshut, or stopstart to not trigger a mirror failover.
or: iris force <instance>
to force down instance <instance>.
or: iris [ run OR console OR terminal ] <instance>
to run InterSystems IRIS in programmer mode with
[ no-device OR console OR terminal ] for $Principal.
or: iris [ run OR console OR terminal ] <instance> <Rou>
to run InterSystems IRIS routine <Rou> in application mode with
[ no-device OR console OR terminal ] for $Principal.
or: iris [ run OR console OR terminal ] <instance> <Rou> <namespace>
to run InterSystems IRIS routine <Rou> in <namespace> in application
mode with [ no-device OR console OR terminal ] for $Principal.
or: iris runw <instance> <Rou> [<namespace>]
to run InterSystems IRIS routine <Rou> in application mode with
no input/output device for $Principal using the optional namespace.
When run from a batch script, iris will wait for the InterSystems IRIS
process to terminate before returning. The exit code from the InterSystems
IRIS process will be returned by iris.
Note: An optional /Title="Title string" can specify the console
or terminal title bar text.
or: iris iristraystart <instance>
to start IRISTray for instance <instance>.
or: iris iristraystop <instance>
to stop IRISTray for instance <instance>.
or: iris licmanagerstop <instance>
to stop licmanager running in instance <instance>.
or: iris all [> outputfile]
to list all installed instances.
or: iris allw [> outputfile]
to list (wide format) all installed instances.
or: iris list [<instance>] [> outputfile]
to list information about all installed instances or the
specified instance.
or: iris qlist [<instance>] [> outputfile]
to display a quick list of information about all installed
instances or the specified instance, in a format suitable
for parsing in command scripts.
The record for an instance contains fields separated by "^" (carats):
Field 1: instance name
Field 2: instance directory
Field 3: version identifier
Field 4: current status for the instance
Field 5: configuration file name last used
Field 6: SuperServer port number
Field 7: WebServer port number
Field 8: JDBC Gateway port number
Field 9: Instance status (e.g., ok, warn, alert)
Field 10: Product name of the instance
Field 11: Mirror Member Type (e.g., Failover, Disaster Recovery)
Field 12: Mirror Status (e.g., Primary, Backup, Connected)
or: iris serverlist [> outputfile]
to list information about all defined servers.
Note: When [> outputfile] is present, output is redirected
to the file instead of being displayed on the terminal.
or: iris telnetstop <instance>
to stop the InterSystems IRIS TELNET daemon.
or: iris telnettrace <instance>
to toggle the TELNET trace state.
or: iris iristrmdstop <instance>
to stop the InterSystems IRIS terminal daemon.
Note: iris often displays error information in a message box.
You can suppress the message box containing error information
by adding "quietly" (without the quotation marks) as the
final argument to the iris command.
or: iris help [display]
to show this help. If display is specified the help
is displayed in a browser window.
-
iris list [arguments]
显示有关已安装IRIS
实例的信息,如下所述。
C:\InterSystems\IRISHealth\bin>iris list irishealth
Instance 'irishealth' (Custom installation)
directory: 'C:\InterSystems\IRISHealth'
versionid: '2022.1.0.114.0'
conf file: 'c:\intersystems\irishealth\iris.cpf' (SuperServer port = 51773, WebServer port = 52773)
status : 'running, since Mon Sep 12 08:08:58 2022'
Product : InterSystems IRISHealth
instname
— 可以选择指定 IRIS
实例名称以仅显示有关该实例的信息。例如,iris list MyIRIS
仅显示有关 MyIRIS
实例的信息。
-
iris qlist [参数]
与iris list
类似,但有附加信息。每个实例的输出(如下所述)在一行中给出,字段由插入符号 (^
) 分隔。
instname
— 可以选择指定 IRIS
实例名称以仅显示有关该实例的信息。例如,iris qlist MyIRIS
仅显示有关 MyIRIS
实例的信息。
C:\InterSystems\IRISHealth\bin>iris qlist irishealth
irishealth^C:\InterSystems\IRISHealth^2022.1.0.114.0^running, since Mon Sep 12 08:08:58 2022^c:\intersystems\irishealth\iris.cpf^51773^52773^^^IRISHealth^^
-
iris run instname [arguments]
在没有$Principal
的输入/输出设备的程序员模式下运行 IRIS。 -
iris runw instname 例程 [参数]
在应用程序模式下运行命名的IRIS
例程,没有$Principal
的输入/输出设备。从批处理脚本运行时,该命令会等待IRIS
进程终止,然后再从进程返回退出代码。
namespace
— 在指定的命名空间中运行例程。
注意:如果使用指定了启动命名空间的用户帐户启动 IRIS
,则命名空间参数无效(请参阅用户帐户属性)。
-
iris start instname [参数]
启动实例。
注意:系统可能会提示以“紧急模式”启动。
完整的 CPF
路径 — 默认情况下, IRIS
从位于 <install-dir>/mgr
目录中的 iris.cpf
文件中读取某些设置。可以提供另一个 .cpf
文件的完整路径以供使用。
-
iris startnostu instname
启动指定的实例而不运行^STU
。 -
iris stop instname [参数]
关闭实例。
/nofailover
— 指定此可选参数以防止触发镜像故障转移。
-
iris stopnoshut instname [参数]
使用INTNOSHUT^SHUTDOWN
关闭命名实例。
注意:只有实例所有者和 irisusr
可以在不登录终端的情况下运行 INTNOSHUT^SHUTDOWN
。
/nofailover
— 指定此可选参数以防止触发镜像故障转移。
-
iris stopstart instname [参数]
关闭实例后启动它。
/nofailover
— 指定此可选参数以防止触发镜像故障转移。
-
iris terminal instname [参数]
打开实例的Terminal
。
routine
— 在终端中以应用程序模式为 $Principal
运行命名的 IRIS
例程。 "[label[+offset]]^routine"
— 指定要在用户模式下运行的 ObjectScript
程序的名称。除了指定的格式之外,还可以传递由字符串和/
或数字文字组成的参数列表,以及省略的 (void
) 参数,如下所示:
"routine[([parameter-list])]"
"[label]^routine[([parameter-list])]"
"##CLASS(package.class).method[([parameter-list])]"
其中,例如,参数列表以“string literal
”的形式指定,-+-000123.45600E+07
,省略的参数作为 $Data(parameter)=0
传递给目标。
注意:空格和 shell
元字符必须以依赖于操作系统的形式引用。
命名空间 — 与例程一起使用,在指定的命名空间中运行例程。
注意:如果您用指定了启动命名空间的用户帐户启动 IRIS
,则命名空间无效(请参阅用户帐户属性)。
iris list, qlist, and all
iris all
列出有关一个或多个 IRIS
实例的以下信息:
- 实例状态,如下
-
<blank>
(状态不可用,登录已禁用) -
dn
(关闭或已崩溃) -
up
(running) -
st
(starting or stopping)
-
- 实例名称
-
IRIS
版本 - 超级服务器端口号
- 安装目录
iris list
列出有关一个或多个 IRIS
实例的以下信息:
- 实例名称(和安装类型)
- 安装目录
-
IRIS
版本 -
IRIS
参数 (.cpf
) 文件的路径名 - 超级服务器和网络服务器端口号
- 实例状态,如下
running
down
starting or stopping
- 不完整的启动或停止,登录被禁用
- 实例的系统健康状态,如果正在运行(不包括在
Windows
中) - 镜像成员类型和状态(如果是镜像成员)
iris qlist
为一个或多个 IRIS
实例在单行上输出以下信息,以插入符号 (^
) 分隔:
- 实例名称(和安装类型)
- 安装目录
-
IRIS
版本 - 实例状态
- 当前配置参数文件的路径名,相对于安装目录。
Windows
系统改为显示完整路径。 - 超级服务器端口号
- 网络服务器端口号
-
JDBC
网关端口号 - 实例的系统健康状态,如果正在运行(在
Windows
上总是空白) - 产品名称
- 镜像成员类型(如果是镜像成员)
- 镜像状态(如果是镜像成员)
- 数据目录(如果适用)