Application.process_tree

26 views
Skip to first unread message

Adam Lindberg

unread,
Jul 15, 2016, 9:27:24 AM7/15/16
to elixir-lang-core
Would there be any interest in a new function Application.process_tree/1? I’m envisioning something like the shell `tree` utility but for an application process tree for situations when :observer cannot be started (for example, on a remote session via SSH).

Cheers,
Adam

signature.asc

José Valim

unread,
Jul 15, 2016, 9:42:23 AM7/15/16
to elixir-l...@googlegroups.com
Maybe a helper on IEx is enough? It feels like we should do such for printing both the number of apps and a list of registered processes (similar to Erlang regs()).



José Valim
Skype: jv.ptec
Founder and Director of R&D


--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/52109955-72BE-4333-8ACB-23EED7E46C3D%40alind.io.
For more options, visit https://groups.google.com/d/optout.

Adam Lindberg

unread,
Jul 15, 2016, 9:51:25 AM7/15/16
to elixir-l...@googlegroups.com
Yeah, a family of such functions makes sense.

Not every deployment includes IEx necessarily (embedded systems, Erlang releases including Elixir dependencies, etc.). I personally prefer if those would be available in the Process and Application module, because then they are accessible on every system which includes :elixir only.

Cheers,
Adam

Allen Madsen

unread,
Jul 15, 2016, 10:00:07 AM7/15/16
to elixir-l...@googlegroups.com
+1 for the process tree being available via command line. I also want
to be able to visualize it on a server where :observer is not an
option.
Allen Madsen
http://www.allenmadsen.com
> https://groups.google.com/d/msgid/elixir-lang-core/9965D371-3DBF-4EB3-8DF2-3A5D3FD9D4AB%40alind.io.

Adam Lindberg

unread,
Jul 15, 2016, 10:10:36 AM7/15/16
to elixir-l...@googlegroups.com
After thinking a bit more on it, I think there are two parts to these features:

* Functional, low level programmatic access for tools in form of Process.registered() or Application.process_tree() that doesn’t print anything
* Nice, pretty printed forms as IEx helpers

Does that make sense?

Cheers,
Adam
> To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAK-y3CuF6YrzRhSST3JfOJmnuaQ7OAq1F9KkkpbtV4AeOWRCfQ%40mail.gmail.com.

José Valim

unread,
Jul 15, 2016, 10:16:39 AM7/15/16
to elixir-l...@googlegroups.com
Sounds reasonable to me, yes.

For a while I got confused here. I though you were interested in getting the tree of applications. The process tree for an application makes more sense. :) Although now I am concerned with what will happen when you have a simple one for one supervisor with hundreds thousands of children.

Let's wait to get more feedback.

It may be worth pointing out that to run observer you don't need observer running on the node, only runtime tools. You can always connect remotely.



José Valim
Skype: jv.ptec
Founder and Director of R&D

Adam Lindberg

unread,
Jul 15, 2016, 10:22:28 AM7/15/16
to elixir-l...@googlegroups.com
On 15 Jul 2016, at 16:16 , José Valim <jose....@plataformatec.com.br> wrote:

Sounds reasonable to me, yes.

For a while I got confused here. I though you were interested in getting the tree of applications. The process tree for an application makes more sense. :) Although now I am concerned with what will happen when you have a simple one for one supervisor with hundreds thousands of children.

This could maybe be resolved in having a max depth, similar to IO printouts?

Let's wait to get more feedback.

Agree.

It may be worth pointing out that to run observer you don't need observer running on the node, only runtime tools. You can always connect remotely.

Totally true, although it is not always feasible or possible to set up a remote connection. It is especially cumbersome via SSH.

Cheers,
Adam

Reply all
Reply to author
Forward
0 new messages