Skip to main content

Cách 1 — Status.command / Status.bat (cho người mới)

Double-click setup/Status.command.Output dạng:
pid: 12345
processed_count: 87
last_error: null
last_processed: raw_assets/images/IMG_0042.jpg
Double-click setup\Status.bat.

Cách 2 — Đọc trực tiếp state.json

cat .asset_index/state.json
Cấu trúc:
{
  "pid": 12345,
  "processed_count": 87,
  "last_processed_at": "2026-04-27T10:15:23+07:00",
  "last_processed_path": "raw_assets/images/IMG_0042.jpg",
  "last_error": null,
  "watcher_started_at": "2026-04-27T08:00:00+07:00"
}

Cách 3 — Service status

.venv/bin/python -m tools.asset_index.service status
launchctl list | grep com.video-agent
Nếu thấy com.video-agent.asset-index với pid > 0 → service đang chạy.
.venv\Scripts\python -m tools.asset_index.service status
schtasks /query /tn VideoAgentAssetIndex
systemctl --user status video-agent-asset-index

Trạng thái phổ biến

Trạng tháiÝ nghĩaHành động
pid > 0, last_error = nullWatcher chạy bình thườngOK
pid rỗngWatcher chưa khởi độngChạy service install lại
last_error != nullCó lỗi gần nhấtĐọc log + xem Khắc phục sự cố
processed_count = 0 sau khi drop fileWatcher chạy nhưng không pick fileKiểm tra log, có thể cần --polling

Đọc log

tail -f .asset_index/logs/watcher.out.log
tail -f .asset_index/logs/watcher.err.log
Get-Content -Wait .asset_index\logs\watcher.out.log
Get-Content -Wait .asset_index\logs\watcher.err.log
journalctl --user -u video-agent-asset-index -f

Bước tiếp theo

Verify sau cài

Test end-to-end: drop file → search → kết quả.