What product/components do you use and which version/fix level are you on?
Cumulocity IoT v 10.13
Is your question related to the free trial, or to a production (customer) instance?
What are you trying to achieve? Please describe it in detail.
I am looking to send OS commands to a device. For instance, I want to send the command to a Windows device of “mkdir c:\users\public\testdir”
Do you get any error messages? Please provide a full error message screenshot and log file.
Failure reasonUnhandled exception. exception=[WinError 2] The system cannot find the file specified
DescriptionExecute shell command: Test command
I can send the command “show help” and I get this response:
Resultshow packages show processes show memory show cpu-usage show disk-usage show agent logs remove apt-lists show logs [ERROR|WARN|INFO|DEBUG] show uptime show uptime since show uptime seconds exec reboot
Have you installed all the latest fixes for the products and systems you are using?
We are on 10.13 - we’re not ready to update to 10.14 yet
The error you are seeing is happening on the device while processing your command. The device agent there is responsible for error handling in this case (see: Device management library - Cumulocity IoT Guides). Can you describe the device agent you are using and what kind of operation you are sending to it?
The DM-Agent only supports the commands which are shown in the show help output (and on linux OS only).
It can be extended: Adding windows commands here and support could be easily done. You can rebuild the agent afterwards.
Thanks! I’ve found that I can add commands to local/lib/python3.10/site-packages/c8ydm/agentmodules/command_handler.py for Linux and those run after rebooting. For some reason that hasn’t worked on Windows yet…