Actor Commands
Petabridge.Cmd.Host
contains a set of commands designed to help Akka.NET users visualize their actor hierarchies and acquire other important pieces of information about the state of their actors.
Available Commands
Command Name | Description |
---|---|
actor hierarchy |
Prints the actor hierarchy from a given starting position all the way down to a specified level of depth. |
actor system |
Gets the full name and address of the currently connected ActorSystem . |
actor hierarchy
A useful tool in the course of managing or debugging an Akka.NET application is the ability to visualize what the current state of an actor hierarchy looks like. You can see how many children a particular actor has, what they're named, whether they're remotely deployed or not, and so forth.
actor hierarchy
takes the following arguments:
Argument Name | Switches | Mandatory? | Allow Multiple? | Is Flag? | Description |
---|---|---|---|---|---|
start | -s or -S | no | no | no | The starting actor path to use in the query; everything in the trace will traverse the actor hierarchy from this point onward. Defaults to akka://{ActorSystem}/user/ if left blank. Can also be a remote ActorPath if Akka.Remote is used. |
depth | -d or -D | no | no | no | The depth in the actor hierarchy to query. A depth of 1 means that only children of the starting actor are queried. Depth of 2 means that grandchildren are queried. And so forth. Defaults to 2 . |
timeout-per-layer | -t or -T | no | no | no | The time in milliseconds given to collect actor's responses to ActorIdentity message on each layer of the hierarchy. Defaults to 40 . |
Examples Querying the top-level actors of the current actor hierarchy.
pbm [[email protected]] actor hierarchy -d 1
Querying the actor hierarchy up to 6 layers deep and exporting the results to a file (Windows.) Uses "single shot" mode of pbm
.
C:\> pbm [[email protected]] actor hierarchy -d 6 > actor-hierarchy.txt
Querying a non-root actor's children.
pbm [[email protected]] actor hierarchy -s /user/foo/child1 -d 1
Querying the actor hierarchy up to 6 layers deep with timeout per layer increased up to 400ms
pbm [[email protected]] actor hierarchy -d 6 -t 400
NOTE: If you get inconsistent results when running
actor hierarchy
command (i.e. some actors are not displayed in the output from time to time), try to expand the timeout parameter value.
actor system
Prints the fully qualified name of the ActorSystem
of the current Petabridge.Cmd.Host
, including any inbound Akka.Remote listening information.
actor system
takes no arguments.
Examples
Query the name of the current ActorSystem
.
pbm [host:port] actor system