Agent Commands Reference
This guide provides useful commands for troubleshooting and managing the ZEM Cloud agent on endpoints.
Viewing Agent Logs
Agent logs contain detailed information about agent activity, errors, and communication with the server.
Linux (Ubuntu, Debian, Arch, Fedora)
View the last 50 lines of the log:
sudo tail -50 /var/log/zen-update-agent.logFollow the log in real-time:
sudo tail -f /var/log/zen-update-agent.logSearch for errors in the log:
sudo grep -i error /var/log/zen-update-agent.logmacOS
View the last 50 lines of the log:
sudo tail -50 /var/log/zen-update-agent.logFollow the log in real-time:
sudo tail -f /var/log/zen-update-agent.logWindows
View the last 50 lines of the log (PowerShell):
Get-Content "C:\ProgramData\ZenUpdate\logs\agent.log" -Tail 50Follow the log in real-time (PowerShell):
Get-Content "C:\ProgramData\ZenUpdate\logs\agent.log" -Wait -Tail 20Search for errors (PowerShell):
Select-String -Path "C:\ProgramData\ZenUpdate\logs\agent.log" -Pattern "error"Checking Agent Status
Linux (Ubuntu, Debian, Arch, Fedora)
Check the agent timer status:
systemctl status zen-update-agent.timerCheck all ZEM Cloud services:
systemctl list-timers | grep zenmacOS
List all ZEM Cloud services:
launchctl list | grep zeniarCheck if a specific service is loaded:
launchctl print system/com.zeniar.zen-update-agentWindows
Check the agent service status (PowerShell as Administrator):
Get-Service ZenUpdateAgentList all ZEM Cloud services:
Get-Service | Where-Object {$_.Name -like "ZenUpdate*"}Restarting the Agent
Linux (Ubuntu, Debian, Arch, Fedora)
Restart the agent timer:
sudo systemctl restart zen-update-agent.timerRestart all ZEM Cloud services:
sudo systemctl restart zen-update-agent.timer zen-update-report.timer zen-update-telemetry.timer zen-update-hwinfo.timermacOS
Unload and reload the agent:
sudo launchctl unload /Library/LaunchDaemons/com.zeniar.zen-update-agent.plist
sudo launchctl load /Library/LaunchDaemons/com.zeniar.zen-update-agent.plistRestart all ZEM Cloud services:
sudo launchctl unload /Library/LaunchDaemons/com.zeniar.zen-update-*.plist
sudo launchctl load /Library/LaunchDaemons/com.zeniar.zen-update-*.plistWindows
Restart the agent service (PowerShell as Administrator):
Restart-Service ZenUpdateAgentRestart all ZEM Cloud services:
Get-Service | Where-Object {$_.Name -like "ZenUpdate*"} | Restart-ServiceTesting Server Connectivity
Verify the endpoint can communicate with your ZEM Cloud server.
Linux / macOS
Test basic connectivity:
curl -I https://your-zem-server.com/api/agent_versionTest with verbose output:
curl -v https://your-zem-server.com/api/agent_versionCheck DNS resolution:
nslookup your-zem-server.comWindows
Test basic connectivity (PowerShell):
Invoke-WebRequest -Uri "https://your-zem-server.com/api/agent_version" -UseBasicParsingTest with detailed output:
Test-NetConnection -ComputerName your-zem-server.com -Port 443Check DNS resolution:
Resolve-DnsName your-zem-server.comForcing a Report
Manually trigger a status report to update the dashboard immediately.
Linux (Ubuntu/Debian)
sudo /usr/local/bin/zen-update-report.shLinux (Arch)
sudo /usr/local/bin/zen-update-report-arch.shLinux (Fedora)
sudo /usr/local/bin/zen-update-report-fedora.shmacOS
sudo /usr/local/bin/zen-update-report-macos.shWindows
& "C:\Program Files\ZenUpdate\zen-update-report-windows.ps1"Checking Agent Configuration
View the agent configuration file to verify settings.
Linux
sudo cat /etc/zen-update/agent.confmacOS
sudo cat "/Library/Application Support/ZenUpdate/agent.conf"Windows
Get-Content "C:\ProgramData\ZenUpdate\agent.conf"Checking Agent Version
Verify which version of the agent is installed.
Linux
grep "^VERSION=" /usr/local/bin/zen-update-agent.shmacOS
grep "^VERSION=" /usr/local/bin/zen-update-agent-macos.shWindows
Select-String -Path "C:\Program Files\ZenUpdate\zen-update-agent-windows.ps1" -Pattern '^\$VERSION'