操作方法

操作方法:自动运行 ArcGIS Data Store 命令实用程序

Last Published: February 27, 2024

描述

要监控并存档 ArcGIS Data Store 的运行状况和状态,自动运行 ArcGIS Data Store 命令实用程序(例如 describedatastore)并将输出保存到日志文件可能会有所帮助。

解决方案或解决方法

可以按照以下步骤完成此操作:

  1. 在 ArcGIS Data Store 计算机上,如果尚未安装 Python 环境,请安装 Python 3.x
  2. 创建一个 .py 文件并将以下脚本粘贴到其中:
import os
from datetime import datetime 

time = datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
DescribeDataStoreBatFile = r"C:\Program Files\ArcGIS\DataStore\tools\describedatastore.bat"
OutputResultsFolder = r"C:\DescribeDataStoreResults"

DescribeDataStore = os.popen(DescribeDataStoreBatFile)
DescriptionOutput = DescribeDataStore.read()
DescribeDataStore.close()

OutputFile = open(os.path.join(OutputResultsFolder,f"Output{time}.log"),"w+")
OutputFile.write(DescriptionOutput)
OutputFile.close()
  1. 编辑 DescribeDataStoreBatFile 参数以指向 .bat 文件的路径。
  2. 编辑 OutputResultsFolder 参数以指向要生成日志文件的文件夹路径。
  3. 可以使用 Windows 任务计划程序自动运行该脚本。
Note:
If you have any issues with permissions, or if the script creates empty files, please consult your IT department before doing the following steps.
  1. 本地安全策略应用程序中,转至用户权限分配,以批处理作业身份登录,然后添加 ArcGIS 服务账户。
  2. 编辑本地用户和群组 > 群组 > 管理员群组中,添加 ArcGIS 服务账户。

文章 ID: 000031821

接收通知并查找新问题或常见问题的解决方案

从我们全新的 AI 聊天机器人中获得简明答案和视频解决方案。

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项