Skip to content

5. HOWTO : Start stop ztm hub and agent

CaiShu edited this page Sep 22, 2024 · 1 revision

How to start ztm hub in foreground by CLI?

ztm run hub

How to start ztm hub in background by CLI?

ztm start hub

Or, on most Linux:

systemctl start ztm-hub

Where is ztm hub logs when ztm hub runs in background?

Log file locates in /var/log/ztm/hub.log

root@ip-172-31-11-117:~# tail /var/log/ztm/hub.log
2024-09-22 00:06:50.683 [INF] Endpoint cai-iphone (uuid = d20372c8-62c7-4693-b3ee-43b59f3e89b6) outdated
2024-09-22 00:17:18.559 [INF] Endpoint 30deb884-2fa0-458a-85f3-23530d25d0f8 joined, connections = 1
2024-09-22 00:17:18.559 [INF] Endpoint 30deb884-2fa0-458a-85f3-23530d25d0f8 joined, connections = 2
2024-09-22 00:20:29.134 [INF] Endpoint zhangcheng (uuid = 30deb884-2fa0-458a-85f3-23530d25d0f8) ping failure, connections = 1
2024-09-22 00:20:29.134 [INF] Endpoint zhangcheng (uuid = 30deb884-2fa0-458a-85f3-23530d25d0f8) ping failure, connections = 0
2024-09-22 00:20:29.134 [INF] Endpoint zhangcheng (uuid = 30deb884-2fa0-458a-85f3-23530d25d0f8) left, connections = 0
2024-09-22 00:20:29.134 [INF] Endpoint zhangcheng (uuid = 30deb884-2fa0-458a-85f3-23530d25d0f8) left, connections = 0
2024-09-22 00:21:50.686 [INF] Endpoint zhangcheng (uuid = 30deb884-2fa0-458a-85f3-23530d25d0f8) outdated
2024-09-22 00:26:45.408 [INF] Endpoint caishu-mac (uuid = 66155520-64e2-4c36-965b-8894b989b7c7) left, connections = 0
2024-09-22 00:26:49.141 [INF] Endpoint caishu-mac (uuid = 66155520-64e2-4c36-965b-8894b989b7c7) joined, connections = 1

How to start ztm agent in foreground by CLI?

ztm run agent

How to start ztm agent in background by CLI?

ztm start agent

Or, on most Linux:

systemctl start ztm-agent

Where is ztm agent logs when ztm agent runs in background?

It locates in /var/log/ztm/agent.log

root@ip-172-31-11-117:~# tail /var/log/ztm/agent.log
2024-09-21 23:56:22.890 [INF] Proxy to local app proxy ended
2024-09-21 23:56:22.893 [INF] Proxy to local app proxy ended
2024-09-21 23:56:23.065 [INF] Proxy to local app proxy ended
2024-09-21 23:56:23.134 [INF] Proxy to local app proxy ended
2024-09-21 23:56:23.439 [INF] Proxy to local app proxy ended
2024-09-21 23:56:23.615 [INF] Proxy to local app proxy ended
2024-09-21 23:56:26.443 [INF] Proxy to local app proxy ended
2024-09-21 23:56:27.320 [INF] Proxy to local app proxy
2024-09-21 23:56:27.321 [INF] [ztm/proxy] Forward to clientservices.googleapis.com:443
2024-09-21 23:56:27.587 [INF] Proxy to local app proxy ended

How to start ztm agent in GUI ?

start-agent-gui