[Mono-list] Change mono process name in ps/top
Bryan Murphy
bmurphy1976 at gmail.com
Sun Jan 24 10:08:37 EST 2010
On Sat, Jan 23, 2010 at 3:41 PM, Michael Hutchinson <
m.j.hutchinson at gmail.com> wrote:
> For setting the name that ps uses you can use the -a argument to exec.
> Some older systems may not support this, such as MacOS 10.4, but we do
> it in MonoDevelop and haven't seen any problems reported with Linuxes.
>
> exec -a processname mono your.exe
>
> You need to use both tricks to make sure the name shows up everywhere.
>
I tried Robert's suggestion, however, because it doesn't work under ps it's
not as useful as I would like it to be. At the end of the day, I'm trying
to accomplish something like what postgres does:
ps aux | grep postgres
postgres: IDLE
postgres: SELECT
postgres: INSERT
etc.
where I can get a quick idea what the process is doing without having to dig
around a bunch of log files. It's clearly possible, other applications do
it.
I'll poke around in the code for some of the other applications I've seen
that do this, maybe I can find the magic string of bits that needs to be
tickled this way, or maybe there's a Python or Ruby library out there that
can show me the way.
Thanks,
Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20100124/789fac8d/attachment.html
More information about the Mono-list
mailing list