[lttng-dev] lttng list -u return "Error: Command error"

zhenyu.ren zhenyu.ren at aliyun.com
Wed Jun 3 23:00:42 EDT 2015


Hi,dev-team

   As the subject is my problem. It seems that the function get_cmdline_by_pid() will fail if kernel.pid_max > 100000 (i.e. 131072) 

static char *get_cmdline_by_pid(pid_t pid)
{
        int ret;
        FILE *fp = NULL;
        char *cmdline = NULL;
        char path[20];        /* Can't go bigger than /proc/65535/cmdline */


 I think path[20] is not big enough .Do you have any better idea?

Thanks
zhenyu.ren



More information about the lttng-dev mailing list