[ltt-dev] Change process name to be command line

Ajit R ajitrzid at yahoo.com
Thu Aug 27 06:31:17 EDT 2009


--- On Thu, 8/27/09, Bryan Hsieh <bryanhsieh at fihspec.com> wrote:

> From: Bryan Hsieh <bryanhsieh at fihspec.com>
> Subject: [ltt-dev] Change process name to be command line
> To: "'ltt-dev at lists.casi.polymtl.ca'" <ltt-dev at lists.casi.polymtl.ca>
> Date: Thursday, August 27, 2009, 2:26 PM
> Hi All,
> My user space process name are all the same - "app_process"
> in LTTV, I'd like to distinguish with them, it seems LTT cat
> from /proc/[number]/stat. I'd like to change to be command
> line from /proc/[number]/cmdline when the process name is
> specific name or just like what the busybox implement in PS,
> where can I modify in LTT patch?
> Thank you very much!
> Best regards,
> Bryan Hsieh
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

You could change the app names by using the prctl system call. 
This works for threads too. Refer to this discussion on the ltt-dev 
about how you can get thread/process names and can be seen by ltt: 


Also if you have an older ltt implementation you might have to 
 use the marker differently, in "set_task_comm" add this line
trace_mark(fs_exec, "filename %s", tsk->comm).

In Busybox too you would have to enable code to use the task 
structure's "comm" field printing. 




More information about the lttng-dev mailing list