msantos/prx

Can I set beam's own proctitle with this library?

Closed this issue · 2 comments

Hello :)

I read the docs but didn't understand if I can set current process title. Sorry, I'm new to Erlang.

We run Erlang 19 and 21 on CentOS 6 and 7 and I would like a simple way to set nice OS process titles. Right now they are just very long beam.smp invokations with a lot of arguments :)

Thanks!

No, calling proctitle() would only set the unix port process. But there is a trick to set the beam process name:

$ ESCRIPT_NAME="foo123" erl

# msantos  25335 24793 12 10:29 pts/43   00:00:00 foo123 -- -root /home/msantos/.asdf/installs/erlang/21.1.1 -progname erl -- -home /home/msantos -- -kernel shell_history enabled

Thanks! That’s something 😀