第四十三章 使用多个 IRIS 实例(三)

第四十三章 使用多个 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
image.png
  • 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 从位于 &lt;install-dir&gt;/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 实例在单行上输出以下信息,以插入符号 (^) 分隔:

  1. 实例名称(和安装类型)
  2. 安装目录
  3. IRIS版本
  4. 实例状态
  5. 当前配置参数文件的路径名,相对于安装目录。 Windows 系统改为显示完整路径。
  6. 超级服务器端口号
  7. 网络服务器端口号
  8. JDBC 网关端口号
  9. 实例的系统健康状态,如果正在运行(在 Windows 上总是空白)
  10. 产品名称
  11. 镜像成员类型(如果是镜像成员)
  12. 镜像状态(如果是镜像成员)
  13. 数据目录(如果适用)
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 219,701评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,649评论 3 396
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 166,037评论 0 356
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,994评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 68,018评论 6 395
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,796评论 1 308
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,481评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,370评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,868评论 1 319
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,014评论 3 338
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,153评论 1 352
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,832评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,494评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,039评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,156评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,437评论 3 373
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,131评论 2 356

推荐阅读更多精彩内容