Life cycle of an agent
The following state diagram illustrates the life cycle of an agent.

Figure 1:
State icon |
State |
 |
Stand-alone |
 |
Running |
 |
Registered |
 |
Attached |
 |
Monitored |
 |
Deregistered |
The states and the transitions between states (which are represented by
numbers both in the diagram and in the explanation that follows), in the life
cycle of the agent are described below:
- Stand-alone
The agent cannot connect to the Agent Controller. This could happen if the
agent is bootstrapped by the host process but the Agent Controller is not
currently running on the machine.
- Stand-alone to registered
The agent connects to the Agent Controller. Normally this would happen
immediately when the host process bootstraps the agent. However, if the Agent
Controller is not presently running it will be registered only when the Agent
Controller is started.
- Registered to stand-alone
The Agent Controller is stopped while the agent is still active. This takes
the agent back to the stand-alone state.
Note: The agent may transition between the stand-alone state and the
registered state as a result of the Agent Controller being started or stopped at any
point in the agent's lifetime. These two states are together referred to as
the running state.
- Registered to attached
The test client attaches to the registered agent for the purpose of
collecting data or sending control messages to the agent.
- Attached to registered
The test client detaches from the agent even though the agent is still being
hosted by the host process. However, the test client has finished collecting data
from the agent and interacting with it.
- Attached to monitored
After having attached to the agent, the test client starts monitoring the
agent, which is connected to the Agent Controller.
Note: You can only start monitoring an agent that is still
running, or one that is not attached to a client (all agents except those
that are identified by the Stop symbol
, and the Monitor symbol
). Furthermore, only one client at a time
can be attached to each agent.
- Monitored to attached
The test client, though still attached to the agent (which is connected to
the Agent Controller) stops monitoring the agent.
- Deregistered
The application exits or explicitly deregisters the agent. The agent is no
longer connected to the Agent Controller, the test client is not attached to
the agent, and therefore all monitoring stops. This state can be reached from
any of the states running, attached, or monitored.
Related tasks
Administering the Agent Controller