Retrieving actor inbox size

30 views
Skip to first unread message

Zvonimir Križ

unread,
Feb 9, 2021, 10:34:19 AM2/9/21
to thespian.py
Hello,

I'm trying to monitor if some actor is a bottleneck.
Is there a way to get a number of messages in some actor waiting to be processed?

Thanks,
Zvone

Kevin Quick

unread,
Feb 9, 2021, 10:57:39 AM2/9/21
to Zvonimir Križ, thespian.py
You can use  the thespian shell to retrieve actor status information: https://thespianpy.com/doc/in_depth.html#hH-efd0ab30-ef4e-4105-b4b6-4831afc5d3de . The easiest way is to (assuming you are using the TCP base with the default admin port of 1900):

> start multprocTCPBase
> address localhost 1900
Actor Address 0: ...
> status 0

This will get a status report from the Admin itself.  The Admin knows the address of all of the top-level Actors, and each Actor knows the addresses of any child actors it has created, so you can use the status reports from each actor to get these addresses.  Alternatively, if you know the port number for the actor you want to query (e.g. from `ps` output) then you can use the `address localhost PORTNUM` command to create an enumerated address for querying that specific actor.

The status information will include pending transmit messages.  Thespian usually queues on the transmit side to better support back-propagation of flow regulation.

-Kevin




--
You received this message because you are subscribed to the Google Groups "thespian.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thespianpy+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thespianpy/fead2f53-5590-4afe-ac1c-8ff3c699dfaan%40googlegroups.com.


--
-KQ

Zvonimir Križ

unread,
Feb 10, 2021, 8:44:36 AM2/10/21
to thespian.py
Hi,

Thank you very much for a very fast and precise answer!
I can use it in a proposed way for some manual monitoring. In the future, it would be great to see Actor status to be exposed through API.  

Best regards,
Zvone


Reply all
Reply to author
Forward
0 new messages