For an interactive agent you can use the 'quit' prompt command.
You can also stop agent that are in inventory via an operation on the RHQ Agent resource. In this way you can also shut down several agents by placing them in a resource group of all the target agents and executing the operation on the group.
I want to create a script for the agent start up and shut down.
Is there anything like "rhq-agent.sh stop" ? or something to be executed from the command prompt...