[zeromq-dev] ZeroMQ context threads names
paul at colomiets.name
Mon Sep 17 23:26:44 CEST 2012
On Mon, Sep 17, 2012 at 11:49 PM, DATACOM - Samuel Lucas
<samuellucas at datacom.ind.br> wrote:
> I'm writing a linux application that uses zeromq. I'm also writing
> a cpu usage monitor for my application that take in account all threads
> (reading from /proc/<pid>/tasks/<thread id>/stat). I would like to set
> the thread name (prctl, PR_SET_NAME) for my zeromq threads so I can
> easily identify it.
> Is there any way to do this?
As it's very linux specific, you can probably just do write to a
"/proc/<pid>/task/<thread id>/comm". I think all threads are started
when you call zmq_init. So it should be easy to identify them.
More information about the zeromq-dev