Skip to content

Instantly share code, notes, and snippets.

@jbruggem
Last active September 20, 2019 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbruggem/e3ef710ecc3081d2feea90c84266d6f5 to your computer and use it in GitHub Desktop.
Save jbruggem/e3ef710ecc3081d2feea90c84266d6f5 to your computer and use it in GitHub Desktop.
Elixir running processes
("================\n"
<> (Process.list()
|> Enum.map(&Process.info/1)
|> Enum.map(&(&1 |> Access.get(:registered_name)))
|> Enum.filter(&(&1))
|> Enum.join("\n"))
<> "\n================")
|> IO.puts()
########## one-line
Process.list |> Enum.map( fn pid -> Process.info( pid, [:registered_name]) |> Keyword.get(:registered_name) end) |> Enum.filter(&is_atom/1) |> Enum.each(&IO.puts/1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment