How to Identify a "Stuck" Command Using the amagent Log
If you suspect a command might be stuck on your device, reviewing the amagent.log can help you identify the issue. This guide walks you through identifying stuck commands and when to take further action.
Identifying a Stuck Command
The amagent.log contains entries indicating the status of commands executed on the device. A command may be "stuck" if you notice repetitive log entries similar to the example below:
2022/09/15 13:39:59 cmd.go:194: Executing command: 7917317685 has been running for 1h45m0.1035288s
2022/09/15 14:20:00 cmd.go:194: Executing command: 7917317685 has been running for 2h25m0.1627982s
What to Look For:
- Command Duration: Note the duration listed (e.g., "2h25m0.1627982s"). Commands running for hours without completion are often indicative of a stuck state.
- Lack of Response: Commands should typically show a response logged in the amagent.log. If no response is noted after repeated entries, it may indicate a stuck condition.
Troubleshooting a Stuck Command
- Verify Command Details:
- Ensure the command number aligns with the expected action.
- Check if other commands are executing properly.
- Restart the Agent Service:
- For Windows:
net stop amagent
net start amagent
- For Linux:
sudo service amagent restart
- For macOS:
sudo launchctl kickstart -k system/com.automox.agent
- Escalate if Necessary:
- If restarting the agent does not resolve the issue, or the command continues running, contact Automox Support. Provide the following:
- Device Name/ID
- Relevant amagent.log entries
- If restarting the agent does not resolve the issue, or the command continues running, contact Automox Support. Provide the following:
Additional Considerations
- Long-running commands are not always an issue but should be reviewed to ensure proper functionality.