透過命令列執行 Deep Security Agent 操作
總覽
您可以在 Windows 與 Linux 系統中,透過命令列指示 Deep Security Agent 執行多項維護工作。
透過 Windows 命令提示字元執行操作
以系統管理員身分開啟 Windows 命令提示字元,並瀏覽至 Deep Security Agent 主機電腦上的下列位置:
C:\Program Files\Trend Micro\Deep Security Agent\
透過 Linux 終端機執行操作
以 root 使用者身分開啟 Linux 終端機,並瀏覽至 Deep Security Agent 主機電腦上的下列位置:
/opt/ds_agent/
命令語法
dsa_control [-a <str>] [-r] [-m] [-s <num>] [-R <str>] [-d] [-b] [-x] [-u] [-g <str>]
[-c <str>] [-p <str>] [-t <num>]
支援的命令列參數包括:
| Argument |
Description |
-a <str>, --activate=<str> |
使用指定 URL 啟用 Agent 與 Deep Security Manager 的連線。URL 格式必須為下列格式:<br> <br>dsm://<DSM hostname or IP>:<port>/<br> <br>(其中 <port> 為 Manager 的 heartbeat 通訊埠,預設為 4120) |
-r, --reset |
重設 Agent 組態 |
-m, --heartbeat |
要求 Agent 立即與 Deep Security Manager 聯繫 |
-s <num>, --selfprotect=<num> |
透過防止本機使用者解除安裝、停止或以其他方式控制 Agent,啟用 Agent 上的自我防護。若已設定驗證密碼,執行需驗證的命令列指令時須提供既有密碼。(-a、-x、-y 例外)(1:啟用,0:停用) |
-R <str>, --restore=<str> |
還原已隔離的檔案 |
-d, --diag |
產生 Agent 診斷套件 |
-b, --bundle |
建立供實體隔離(air-gapped)Relay 使用的更新套件 |
-x, --proxy |
設定 Agent 與 Deep Security Manager 通訊所用的代理伺服器位址。URL 格式必須為下列格式:dsm_proxy://proxyURL/ |
-u, --unpw |
以 key:value(用冒號分隔)的格式設定代理伺服器的使用者名稱與密碼 |
-g <str>, --Agent=<str> |
顯示 Agent URL。預設為 https://localhost:4418 |
-c <str>, --cert=<str> |
指定憑證檔案 |
-p <str>, --passwd=<str> |
提供先前在 Deep Security Manager 設定的驗證密碼 |
-t <num>, --retries=<num> |
若 dsa_control 無法連線至 Deep Security Agent 服務以執行對應指令,此參數會指示 dsa_control 重試 <num> 次。每次重試之間會暫停一秒。 |
注意: 這些操作也可以透過 Deep Security Manager Web 主控台執行;不過,當 Deep Security Agent 已無法透過 Deep Security Manager 控制時(例如因組態或網路問題),從 Deep Security Agent 主機電腦的命令提示字元執行這些命令會特別有幫助。這些命令也可以搭配腳本使用。
重設 Agent
dsa_control -r
在 Deep Security Web 主控台中,從 Computers 清單重新啟用發生問題的 Agent。