All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: make a trace_event in a modul (driver)
       [not found] <527DF369.4020704@gmx.de>
@ 2013-11-13 17:37 ` Klaus Dannecker
       [not found] ` <5283B8BD.9020703@gmx.de>
  1 sibling, 0 replies; 17+ messages in thread
From: Klaus Dannecker @ 2013-11-13 17:37 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1432 bytes --]


Am 09.11.2013 09:33, schrieb Klaus Dannecker:
> Hi,
> I want to write a driver with trace events.
> In the first step i compile the example  trace-events-sample.c with 
> the makefile:
>
> ifneq ($(KERNELRELEASE),)
>     obj-m  := modul_trace-events-sample.o
>     modul_trace-events-sample-y := trace-events-sample.o
>     ccflags-y := -I$(src)
> else
>     KDIR ?= /lib/modules/`uname -r`/build
> default:
>     $(MAKE) -C $(KDIR) M=$$PWD
> endif
>
> now i get the modul_trace-events-sample.ko File.
> now:
> insmod modul_trace-events-sample.ko
> lttng create
> lttng enable-event -k -a
> lttng start
> ...wait...
> lttng stop
> lttng destroy
>
> now i look the result in the eclise viewer, but i found event 
> "trace_foo_bar" not in the session!
> what am I doing wrong?
>
> I use ubuntu 13.04 in a vmware
>
> Thanks
>
> _______________________________________________
Hi,

now i found a answer:
http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
now i download the lttng-module and compiled it.

|$ git clone git://git.lttng.org/lttng-modules.git
||$ cd lttng-tools|
|$ make|
|$ sudo make modules_install
|here I get  error
INSTALL /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
Can't read private key
...
what does that mean?
what  should I do?

please help me!

another question:
when i create atrace events in module_a,
can i use it in module_b?
if yes,what  should I do?

thanks Klaus

[-- Attachment #1.2: Type: text/html, Size: 3688 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found] ` <5283B8BD.9020703@gmx.de>
@ 2013-11-21  9:48   ` Klaus Dannecker
       [not found]   ` <528DD70B.8040504@gmx.de>
  1 sibling, 0 replies; 17+ messages in thread
From: Klaus Dannecker @ 2013-11-21  9:48 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 2178 bytes --]

Hi,

Nobody can help me?

now i have ubuntu 13.10 installed  in a vmware.
but i have the same error!

s$ sudo make modules_install
make -C /lib/modules/3.11.0-12-generic/build 
M=/home/klaus/lttng_src/lttng-modules modules_install
make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
   INSTALL /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
Can't read private key
....
lsmod | grep lttng
-> no module found

Thanks!

Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>
> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>> Hi,
>> I want to write a driver with trace events.
>> In the first step i compile the example  trace-events-sample.c with 
>> the makefile:
>>
>> ifneq ($(KERNELRELEASE),)
>>     obj-m  := modul_trace-events-sample.o
>>     modul_trace-events-sample-y := trace-events-sample.o
>>     ccflags-y := -I$(src)
>> else
>>     KDIR ?= /lib/modules/`uname -r`/build
>> default:
>>     $(MAKE) -C $(KDIR) M=$$PWD
>> endif
>>
>> now i get the modul_trace-events-sample.ko File.
>> now:
>> insmod modul_trace-events-sample.ko
>> lttng create
>> lttng enable-event -k -a
>> lttng start
>> ...wait...
>> lttng stop
>> lttng destroy
>>
>> now i look the result in the eclise viewer, but i found event 
>> "trace_foo_bar" not in the session!
>> what am I doing wrong?
>>
>> I use ubuntu 13.04 in a vmware
>>
>> Thanks
>>
>> _______________________________________________
> Hi,
>
> now i found a answer:
> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
> now i download the lttng-module and compiled it.
> |$ git clone git://git.lttng.org/lttng-modules.git
> ||$ cd lttng-tools|
> |$ make|
> |$ sudo make modules_install
> |here I get  error
> INSTALL /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
> Can't read private key
> ...
> what does that mean?
> what  should I do?
>
> please help me!
>
> another question:
> when i create atrace events in module_a,
> can i use it in module_b?
> if yes,what  should I do?
> thanks Klaus
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[-- Attachment #1.2: Type: text/html, Size: 5458 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]   ` <528DD70B.8040504@gmx.de>
@ 2013-11-21 15:49     ` Jérémie Galarneau
       [not found]     ` <CA+jJMxsybZ4mo1Mp369hhgNSCi-pfNh8VG1F5S2H5DpKL5nSsw@mail.gmail.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Jérémie Galarneau @ 2013-11-21 15:49 UTC (permalink / raw)
  To: Klaus Dannecker; +Cc: lttng-dev

On Thu, Nov 21, 2013 at 4:48 AM, Klaus Dannecker <klaus.dannecker@gmx.de> wrote:
> Hi,
>
> Nobody can help me?
>
> now i have ubuntu 13.10 installed  in a vmware.
> but i have the same error!
>
> s$ sudo make modules_install
> make -C /lib/modules/3.11.0-12-generic/build
> M=/home/klaus/lttng_src/lttng-modules modules_install
> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>   INSTALL /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>
> Can't read private key

Ubuntu now ships with module signing enabled by default.
Does the installation fail, or is it just a warning?

> ....
> lsmod | grep lttng
> -> no module found
>

The modules will not be automatically loaded after being built and
installed. You have to launch lttng-sessiond (as root) for that. What
is the output of the following commands?

make
sudo make modules_install
sudo depmod -a
sudo lttng-sessiond &
lsmod | grep lttng

Regards,
Jérémie

> Thanks!
>
> Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>
>
> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>
> Hi,
> I want to write a driver with trace events.
> In the first step i compile the example  trace-events-sample.c with the
> makefile:
>
> ifneq ($(KERNELRELEASE),)
>     obj-m  := modul_trace-events-sample.o
>     modul_trace-events-sample-y := trace-events-sample.o
>     ccflags-y := -I$(src)
> else
>     KDIR ?= /lib/modules/`uname -r`/build
> default:
>     $(MAKE) -C $(KDIR) M=$$PWD
> endif
>
> now i get the modul_trace-events-sample.ko File.
> now:
> insmod modul_trace-events-sample.ko
> lttng create
> lttng enable-event -k -a
> lttng start
> ...wait...
> lttng stop
> lttng destroy
>
> now i look the result in the eclise viewer, but i found event
> "trace_foo_bar" not in the session!
> what am I doing wrong?
>
> I use ubuntu 13.04 in a vmware
>
> Thanks
>
> _______________________________________________
>
> Hi,
>
> now i found a answer:
> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
> now i download the lttng-module and compiled it.
>
> $ git clone git://git.lttng.org/lttng-modules.git
> $ cd lttng-tools
> $ make
> $ sudo make modules_install
> here I get error
> INSTALL /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
> Can't read private key
> ...
> what does that mean?
> what should I do?
>
> please help me!
>
> another question:
> when i create a trace events in module_a,
> can i use it in module_b?
> if yes, what should I do?
>
> thanks Klaus
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]     ` <CA+jJMxsybZ4mo1Mp369hhgNSCi-pfNh8VG1F5S2H5DpKL5nSsw@mail.gmail.com>
@ 2013-11-21 16:42       ` Klaus Dannecker
       [not found]       ` <528E37D8.3060606@gmx.de>
  1 sibling, 0 replies; 17+ messages in thread
From: Klaus Dannecker @ 2013-11-21 16:42 UTC (permalink / raw)
  To: Jérémie Galarneau; +Cc: lttng-dev


Am 21.11.2013 16:49, schrieb Jérémie Galarneau:
> On Thu, Nov 21, 2013 at 4:48 AM, Klaus Dannecker <klaus.dannecker@gmx.de> wrote:
>> Hi,
>>
>> Nobody can help me?
>>
>> now i have ubuntu 13.10 installed  in a vmware.
>> but i have the same error!
>>
>> s$ sudo make modules_install
>> make -C /lib/modules/3.11.0-12-generic/build
>> M=/home/klaus/lttng_src/lttng-modules modules_install
>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>    INSTALL /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>
>> Can't read private key
> Ubuntu now ships with module signing enabled by default.
> Does the installation fail, or is it just a warning?
i don't know
>> ....
>> lsmod | grep lttng
>> -> no module found
>>
> The modules will not be automatically loaded after being built and
> installed. You have to launch lttng-sessiond (as root) for that. What
> is the output of the following commands?
>
> make
> sudo make modules_install
> sudo depmod -a
> sudo lttng-sessiond &
> lsmod | grep lttng
klaus@ubuntu:~/lttng_src/lttng-modules$ make
make -C /lib/modules/3.11.0-12-generic/build 
M=/home/klaus/lttng_src/lttng-modules modules
make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
/home/klaus/lttng_src/lttng-modules/probes/Makefile:30: File 
/usr/src/linux-headers-3.11.0-12-generic/virt/kvm/iodev.h not found. 
Probe "kvm" x86-specific is disabled. Use full kernel source tree to 
enable it.
/home/klaus/lttng_src/lttng-modules/probes/Makefile:81: Files 
/usr/src/linux-headers-3.11.0-12-generic/fs/ext3/*.h not found. Probe 
"ext3" is disabled. Use full kernel source tree to enable it.
/home/klaus/lttng_src/lttng-modules/probes/Makefile:142: Files 
/usr/src/linux-headers-3.11.0-12-generic/fs/btrfs/*.h not found. Probe 
"btrfs" is disabled. Use full kernel source tree to enable it.
/home/klaus/lttng_src/lttng-modules/probes/Makefile:158: Files 
/usr/src/linux-headers-3.11.0-12-generic/fs/ext4/*.h not found. Probe 
"ext4" is disabled. Use full kernel source tree to enable it.
   Building modules, stage 2.
   MODPOST 44 modules
make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'

klaus@ubuntu:~/lttng_src/lttng-modules$ sudo make modules_install
make -C /lib/modules/3.11.0-12-generic/build 
M=/home/klaus/lttng_src/lttng-modules modules_install
make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
   INSTALL /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
Can't read private key
   INSTALL 
/home/klaus/lttng_src/lttng-modules/lttng-ring-buffer-client-discard.ko
Can't read private key
...
   DEPMOD  3.11.0-12-generic
make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
klaus@ubuntu:~/lttng_src/lttng-modules$

klaus@ubuntu:~/lttng_src/lttng-modules$ sudo depmod -a
klaus@ubuntu:~/lttng_src/lttng-modules$
klaus@ubuntu:~/lttng_src/lttng-modules$ sudo lttng-sessiond &
[1] 23486
klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng

[1]+  Stopped                 sudo lttng-sessiond
klaus@ubuntu:~/lttng_src/lttng-modules$

Thanks for your help!

Regards,
Klaus
> Regards,
> Jérémie
>
>> Thanks!
>>
>> Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>>
>>
>> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>>
>> Hi,
>> I want to write a driver with trace events.
>> In the first step i compile the example  trace-events-sample.c with the
>> makefile:
>>
>> ifneq ($(KERNELRELEASE),)
>>      obj-m  := modul_trace-events-sample.o
>>      modul_trace-events-sample-y := trace-events-sample.o
>>      ccflags-y := -I$(src)
>> else
>>      KDIR ?= /lib/modules/`uname -r`/build
>> default:
>>      $(MAKE) -C $(KDIR) M=$$PWD
>> endif
>>
>> now i get the modul_trace-events-sample.ko File.
>> now:
>> insmod modul_trace-events-sample.ko
>> lttng create
>> lttng enable-event -k -a
>> lttng start
>> ...wait...
>> lttng stop
>> lttng destroy
>>
>> now i look the result in the eclise viewer, but i found event
>> "trace_foo_bar" not in the session!
>> what am I doing wrong?
>>
>> I use ubuntu 13.04 in a vmware
>>
>> Thanks
>>
>> _______________________________________________
>>
>> Hi,
>>
>> now i found a answer:
>> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
>> now i download the lttng-module and compiled it.
>>
>> $ git clone git://git.lttng.org/lttng-modules.git
>> $ cd lttng-tools
>> $ make
>> $ sudo make modules_install
>> here I get error
>> INSTALL /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
>> Can't read private key
>> ...
>> what does that mean?
>> what should I do?
>>
>> please help me!
>>
>> another question:
>> when i create a trace events in module_a,
>> can i use it in module_b?
>> if yes, what should I do?
>>
>> thanks Klaus
>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>
>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]       ` <528E37D8.3060606@gmx.de>
@ 2013-11-21 17:41         ` Jérémie Galarneau
       [not found]         ` <CA+jJMxt89qdM98hu536heBwk90AQEPwONvpa7s-vqKGQ036euQ@mail.gmail.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Jérémie Galarneau @ 2013-11-21 17:41 UTC (permalink / raw)
  To: Klaus Dannecker; +Cc: lttng-dev

On Thu, Nov 21, 2013 at 11:42 AM, Klaus Dannecker
<klaus.dannecker@gmx.de> wrote:
>
> Am 21.11.2013 16:49, schrieb Jérémie Galarneau:
>
>> On Thu, Nov 21, 2013 at 4:48 AM, Klaus Dannecker <klaus.dannecker@gmx.de>
>> wrote:
>>>
>>> Hi,
>>>
>>> Nobody can help me?
>>>
>>> now i have ubuntu 13.10 installed  in a vmware.
>>> but i have the same error!
>>>
>>> s$ sudo make modules_install
>>> make -C /lib/modules/3.11.0-12-generic/build
>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>    INSTALL
>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>
>>> Can't read private key
>>
>> Ubuntu now ships with module signing enabled by default.
>> Does the installation fail, or is it just a warning?
>
> i don't know
>
>>> ....
>>> lsmod | grep lttng
>>> -> no module found
>>>
>> The modules will not be automatically loaded after being built and
>> installed. You have to launch lttng-sessiond (as root) for that. What
>> is the output of the following commands?
>>
>> make
>> sudo make modules_install
>> sudo depmod -a
>> sudo lttng-sessiond &
>> lsmod | grep lttng
>
> klaus@ubuntu:~/lttng_src/lttng-modules$ make
> make -C /lib/modules/3.11.0-12-generic/build
> M=/home/klaus/lttng_src/lttng-modules modules
>
> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
> /home/klaus/lttng_src/lttng-modules/probes/Makefile:30: File
> /usr/src/linux-headers-3.11.0-12-generic/virt/kvm/iodev.h not found. Probe
> "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
> /home/klaus/lttng_src/lttng-modules/probes/Makefile:81: Files
> /usr/src/linux-headers-3.11.0-12-generic/fs/ext3/*.h not found. Probe "ext3"
> is disabled. Use full kernel source tree to enable it.
> /home/klaus/lttng_src/lttng-modules/probes/Makefile:142: Files
> /usr/src/linux-headers-3.11.0-12-generic/fs/btrfs/*.h not found. Probe
> "btrfs" is disabled. Use full kernel source tree to enable it.
> /home/klaus/lttng_src/lttng-modules/probes/Makefile:158: Files
> /usr/src/linux-headers-3.11.0-12-generic/fs/ext4/*.h not found. Probe "ext4"
> is disabled. Use full kernel source tree to enable it.
>   Building modules, stage 2.
>   MODPOST 44 modules
> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>
> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo make modules_install
>
> make -C /lib/modules/3.11.0-12-generic/build
> M=/home/klaus/lttng_src/lttng-modules modules_install
> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>   INSTALL /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
> Can't read private key
>   INSTALL
> /home/klaus/lttng_src/lttng-modules/lttng-ring-buffer-client-discard.ko
>
> Can't read private key
> ...
>   DEPMOD  3.11.0-12-generic
> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
> klaus@ubuntu:~/lttng_src/lttng-modules$
>
> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo depmod -a
> klaus@ubuntu:~/lttng_src/lttng-modules$
> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo lttng-sessiond &
> [1] 23486
> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>
> [1]+  Stopped                 sudo lttng-sessiond
> klaus@ubuntu:~/lttng_src/lttng-modules$
>

Hard to say why lttng-sessiond received SIGSTOP...

Could you try running the session daemon in verbose mode in another terminal?
sudo lttng-sessiond -vvv

This should load the modules or at least log an error if it fails to do so.

> Thanks for your help!
>
> Regards,
> Klaus
>
>> Regards,
>> Jérémie
>>
>>> Thanks!
>>>
>>> Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>>>
>>>
>>> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>>>
>>> Hi,
>>> I want to write a driver with trace events.
>>> In the first step i compile the example  trace-events-sample.c with the
>>> makefile:
>>>
>>> ifneq ($(KERNELRELEASE),)
>>>      obj-m  := modul_trace-events-sample.o
>>>      modul_trace-events-sample-y := trace-events-sample.o
>>>      ccflags-y := -I$(src)
>>> else
>>>      KDIR ?= /lib/modules/`uname -r`/build
>>> default:
>>>      $(MAKE) -C $(KDIR) M=$$PWD
>>> endif
>>>
>>> now i get the modul_trace-events-sample.ko File.
>>> now:
>>> insmod modul_trace-events-sample.ko
>>> lttng create
>>> lttng enable-event -k -a
>>> lttng start
>>> ...wait...
>>> lttng stop
>>> lttng destroy
>>>
>>> now i look the result in the eclise viewer, but i found event
>>> "trace_foo_bar" not in the session!
>>> what am I doing wrong?
>>>
>>> I use ubuntu 13.04 in a vmware
>>>
>>> Thanks
>>>
>>> _______________________________________________
>>>
>>> Hi,
>>>
>>> now i found a answer:
>>> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
>>> now i download the lttng-module and compiled it.
>>>
>>> $ git clone git://git.lttng.org/lttng-modules.git
>>> $ cd lttng-tools
>>> $ make
>>> $ sudo make modules_install
>>> here I get error
>>> INSTALL
>>> /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>> Can't read private key
>>> ...
>>> what does that mean?
>>> what should I do?
>>>
>>> please help me!
>>>
>>> another question:
>>> when i create a trace events in module_a,
>>> can i use it in module_b?
>>> if yes, what should I do?
>>>
>>> thanks Klaus
>>>
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev@lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev@lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>
>>
>>
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]         ` <CA+jJMxt89qdM98hu536heBwk90AQEPwONvpa7s-vqKGQ036euQ@mail.gmail.com>
@ 2013-11-22 10:54           ` Klaus Dannecker
       [not found]           ` <528F37DE.7050204@gmx.de>
  1 sibling, 0 replies; 17+ messages in thread
From: Klaus Dannecker @ 2013-11-22 10:54 UTC (permalink / raw)
  To: Jérémie Galarneau; +Cc: lttng-dev


Am 21.11.2013 18:41, schrieb Jérémie Galarneau:
> On Thu, Nov 21, 2013 at 11:42 AM, Klaus Dannecker
> <klaus.dannecker@gmx.de> wrote:
>> Am 21.11.2013 16:49, schrieb Jérémie Galarneau:
>>
>>> On Thu, Nov 21, 2013 at 4:48 AM, Klaus Dannecker <klaus.dannecker@gmx.de>
>>> wrote:
>>>> Hi,
>>>>
>>>> Nobody can help me?
>>>>
>>>> now i have ubuntu 13.10 installed  in a vmware.
>>>> but i have the same error!
>>>>
>>>> s$ sudo make modules_install
>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>     INSTALL
>>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>
>>>> Can't read private key
>>> Ubuntu now ships with module signing enabled by default.
>>> Does the installation fail, or is it just a warning?
>> i don't know
>>
>>>> ....
>>>> lsmod | grep lttng
>>>> -> no module found
>>>>
>>> The modules will not be automatically loaded after being built and
>>> installed. You have to launch lttng-sessiond (as root) for that. What
>>> is the output of the following commands?
>>>
>>> make
>>> sudo make modules_install
>>> sudo depmod -a
>>> sudo lttng-sessiond &
>>> lsmod | grep lttng
>> klaus@ubuntu:~/lttng_src/lttng-modules$ make
>> make -C /lib/modules/3.11.0-12-generic/build
>> M=/home/klaus/lttng_src/lttng-modules modules
>>
>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:30: File
>> /usr/src/linux-headers-3.11.0-12-generic/virt/kvm/iodev.h not found. Probe
>> "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:81: Files
>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext3/*.h not found. Probe "ext3"
>> is disabled. Use full kernel source tree to enable it.
>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:142: Files
>> /usr/src/linux-headers-3.11.0-12-generic/fs/btrfs/*.h not found. Probe
>> "btrfs" is disabled. Use full kernel source tree to enable it.
>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:158: Files
>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext4/*.h not found. Probe "ext4"
>> is disabled. Use full kernel source tree to enable it.
>>    Building modules, stage 2.
>>    MODPOST 44 modules
>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>
>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo make modules_install
>>
>> make -C /lib/modules/3.11.0-12-generic/build
>> M=/home/klaus/lttng_src/lttng-modules modules_install
>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>    INSTALL /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>> Can't read private key
>>    INSTALL
>> /home/klaus/lttng_src/lttng-modules/lttng-ring-buffer-client-discard.ko
>>
>> Can't read private key
>> ...
>>    DEPMOD  3.11.0-12-generic
>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>
>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo depmod -a
>> klaus@ubuntu:~/lttng_src/lttng-modules$
>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo lttng-sessiond &
>> [1] 23486
>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>
>> [1]+  Stopped                 sudo lttng-sessiond
>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>
> Hard to say why lttng-sessiond received SIGSTOP...
>
> Could you try running the session daemon in verbose mode in another terminal?
> sudo lttng-sessiond -vvv
klaus@ubuntu:~$ sudo lttng-sessiond -vvv
[sudo] password for klaus:
DEBUG3 [23710/23710]: Creating LTTng run directory: /var/run/lttng (in 
create_lttng_rundir() at main.c:4267)
DEBUG2 [23710/23710]: Kernel consumer err path: 
/var/run/lttng/kconsumerd/error (in main() at main.c:4696)
DEBUG2 [23710/23710]: Kernel consumer cmd path: 
/var/run/lttng/kconsumerd/command (in main() at main.c:4698)
DEBUG1 [23710/23710]: Client socket path 
/var/run/lttng/client-lttng-sessiond (in main() at main.c:4751)
DEBUG1 [23710/23710]: Application socket path 
/var/run/lttng/lttng-ust-sock-5 (in main() at main.c:4752)
DEBUG1 [23710/23710]: Application wait path /lttng-ust-wait-5 (in main() 
at main.c:4753)
DEBUG1 [23710/23710]: LTTng run directory path: /var/run/lttng (in 
main() at main.c:4754)
DEBUG2 [23710/23710]: UST consumer 32 bits err path: 
/var/run/lttng/ustconsumerd32/error (in main() at main.c:4763)
DEBUG2 [23710/23710]: UST consumer 32 bits cmd path: 
/var/run/lttng/ustconsumerd32/command (in main() at main.c:4765)
DEBUG2 [23710/23710]: UST consumer 64 bits err path: 
/var/run/lttng/ustconsumerd64/error (in main() at main.c:4774)
DEBUG2 [23710/23710]: UST consumer 64 bits cmd path: 
/var/run/lttng/ustconsumerd64/command (in main() at main.c:4776)
DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c080 of type 1 
(in lttng_ht_new() at hashtable.c:127)
DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c270 of type 1 
(in lttng_ht_new() at hashtable.c:127)
DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c498 of type 1 
(in lttng_ht_new() at hashtable.c:127)
DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c6c0 of type 1 
(in lttng_ht_new() at hashtable.c:127)
DEBUG2 [23710/23710]: Creating consumer directory: 
/var/run/lttng/kconsumerd (in set_consumer_sockets() at main.c:4309)
DEBUG1 [23710/23710]: Modprobe successfully lttng-tracer (in 
modprobe_lttng_control() at modprobe.c:192)
DEBUG2 [23710/23710]: Kernel tracer version validated (major version 2) 
(in kernel_validate_version() at kernel.c:700)
DEBUG1 [23710/23710]: Modprobe successfully lttng-ftrace (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-kprobes (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-kretprobes (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-lib-ring-buffer (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully 
lttng-ring-buffer-client-discard (in modprobe_lttng_data() at 
modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully 
lttng-ring-buffer-client-overwrite (in modprobe_lttng_data() at 
modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully 
lttng-ring-buffer-metadata-client (in modprobe_lttng_data() at 
modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully 
lttng-ring-buffer-client-mmap-discard (in modprobe_lttng_data() at 
modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully 
lttng-ring-buffer-client-mmap-overwrite (in modprobe_lttng_data() at 
modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully 
lttng-ring-buffer-metadata-mmap-client (in modprobe_lttng_data() at 
modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-types (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-asoc (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-block (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-btrfs (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-compaction (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext3 (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext4 (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-gpio (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-irq (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd2 (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kmem (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86 (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86-mmu (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-lock (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-module (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-napi (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-net (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-power (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-printk (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-random (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rcu (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regmap (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regulator (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rpm (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sched (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-scsi (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-signal (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-skb (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sock (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-statedump (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sunrpc (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-timer (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-udp (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-vmscan (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-workqueue (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-writeback (in 
modprobe_lttng_data() at modprobe.c:228)
DEBUG1 [23710/23710]: Kernel tracer fd 6 (in init_kernel_tracer() at 
main.c:2364)
DEBUG2 [23710/23710]: Creating consumer directory: 
/var/run/lttng/ustconsumerd64 (in set_consumer_sockets() at main.c:4309)
DEBUG2 [23710/23710]: Creating consumer directory: 
/var/run/lttng/ustconsumerd32 (in set_consumer_sockets() at main.c:4309)
DEBUG3 [23710/23710]: Session daemon client socket 9 and application 
socket 10 created (in init_daemon_socket() at main.c:4175)
DEBUG1 [23710/23710]: All permissions are set (in set_permissions() at 
main.c:4255)
DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e160 of type 2 
(in lttng_ht_new() at hashtable.c:127)
DEBUG3 [23710/23710]: Global buffer per UID registry initialized (in 
buffer_reg_init_uid_registry() at buffer-registry.c:99)
DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e388 of type 2 
(in lttng_ht_new() at hashtable.c:127)
DEBUG3 [23710/23710]: Global buffer per PID registry initialized (in 
buffer_reg_init_pid_registry() at buffer-registry.c:220)
DEBUG1 [23710/23710]: epoll set max size is 327338 (in 
compat_epoll_set_max_size() at compat-epoll.c:280)
DEBUG1 [23710/23710]: Command subsystem initialized (in cmd_init() at 
cmd.c:3056)
DEBUG1 [23710/23710]: Pid 23710 written in file 
/var/run/lttng/lttng-sessiond.pid (in utils_create_pid_file() at 
utils.c:437)
DEBUG1 [23710/23710]: Pid 5345 written in file /var/run/lttng/jul.port 
(in utils_create_pid_file() at utils.c:437)
DEBUG1 [23710/23710]: TCP inet operation timeout set to 216 sec (in 
lttcomm_inet_init() at inet.c:529)
DEBUG1 [23710/23710]: Health check time delta in seconds set to 236 (in 
health_init() at health.c:73)
DEBUG1 [23710/23820]: [thread] Manage health check started (in 
thread_manage_health() at main.c:3511)
DEBUG1 [23710/23824]: [thread] Manage application started (in 
thread_manage_apps() at main.c:1256)
DEBUG1 [23710/23823]: [thread] Manage application registration started 
(in thread_registration_apps() at main.c:1766)
DEBUG1 [23710/23822]: [thread] Dispatch UST command started (in 
thread_dispatch_ust_registration() at main.c:1543)
DEBUG1 [23710/23821]: [thread] Manage client started (in 
thread_manage_clients() at main.c:3695)
DEBUG1 [23710/23821]: Accepting client command ... (in 
thread_manage_clients() at main.c:3747)
DEBUG1 [23710/23819]: [ht-thread] startup. (in thread_ht_cleanup() at 
ht-cleanup.c:35)
DEBUG3 [23710/23819]: [ht-thread] Polling on 2 fds. (in 
thread_ht_cleanup() at ht-cleanup.c:59)
DEBUG1 [23710/23825]: [ust-thread] Manage application notify command (in 
ust_thread_manage_notify() at ust-thread.c:38)
DEBUG1 [23710/23826]: [jul-thread] Manage JUL application registration. 
(in jul_thread_manage_registration() at jul-thread.c:250)
DEBUG3 [23710/23826]: URI string: tcp://localhost (in uri_parse() at 
uri.c:291)
DEBUG1 [23710/23824]: Apps thread polling on 2 fds (in 
thread_manage_apps() at main.c:1286)
DEBUG1 [23710/23822]: Futex n to 1 prepare done (in futex_nto1_prepare() 
at futex.c:75)
DEBUG1 [23710/23823]: Notifying applications of session daemon state: 1 
(in notify_ust_apps() at main.c:593)
DEBUG3 [23710/23825]: [ust-thread] Manage notify polling on 2 fds (in 
ust_thread_manage_notify() at ust-thread.c:63)
DEBUG1 [23710/23820]: Health check ready (in thread_manage_health() at 
main.c:3574)
DEBUG1 [23710/23827]: [thread] Thread manage kernel started (in 
thread_manage_kernel() at main.c:794)
DEBUG1 [23710/23827]: Updating kernel poll set (in update_kernel_poll() 
at main.c:654)
DEBUG1 [23710/23827]: Thread kernel polling on 2 fds (in 
thread_manage_kernel() at main.c:839)
DEBUG1 [23710/23822]: Woken up but nothing in the UST command queue (in 
thread_dispatch_ust_registration() at main.c:1566)
DEBUG2 [23710/23826]: IP address resolved to 127.0.0.1 (in 
set_ip_address() at uri.c:132)
DEBUG3 [23710/23826]: URI dtype: 1, proto: 1, host: localhost, subdir: , 
ctrl: 0, data: 0 (in uri_parse() at uri.c:505)
PERROR [23710/23826]: bind inet: Address already in use (in 
lttcomm_bind_inet_sock() at inet.c:109)
DEBUG1 [23710/23826]: [jul-thread] is cleaning up and stopping. (in 
jul_thread_manage_registration() at jul-thread.c:356)
DEBUG3 [23710/23826]: [jul-thread] Cleaning JUL apps ht (in 
clean_jul_apps_ht() at jul-thread.c:100)
DEBUG1 [23710/23823]: Got the wait shm fd 26 (in get_wait_shm() at 
shm.c:115)
DEBUG1 [23710/23823]: Futex wait update active 1 (in futex_wait_update() 
at futex.c:63)
DEBUG1 [23710/23823]: Accepting application registration (in 
thread_registration_apps() at main.c:1803)

another terminal:
klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
lttng_probe_writeback    22927  0
lttng_probe_workqueue    13726  0
lttng_probe_vmscan     17138  0
....

but:
klaus@ubuntu:~/lttng_src/lttng-modules$ lttng list -k
Error: Unable to list kernel events: Tracing the kernel requires a root 
lttng-sessiond daemon, as well as "tracing" group membership or root 
user ID for the lttng client.
Error: Command error
klaus@ubuntu:~/lttng_src/lttng-modules$

then stop the command sudo lttng-sessiond -vvv with "STRG+C"
^CDEBUG1 [23710/23710]: SIGINT caught (in sighandler() at main.c:4374)
DEBUG1 [23710/23710]: Terminating all threads (in stop_threads() at 
main.c:370)
DEBUG1 [23710/23710]: Futex n to 1 wake done (in futex_nto1_wake() at 
futex.c:104)
DEBUG1 [23710/23821]: Clean command context structure (in 
clean_command_ctx() at main.c:573)
...
klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
klaus@ubuntu:~/lttng_src/lttng-modules$

Regards,
Klaus



> This should load the modules or at least log an error if it fails to do so.
>
>> Thanks for your help!
>>
>> Regards,
>> Klaus
>>
>>> Regards,
>>> Jérémie
>>>
>>>> Thanks!
>>>>
>>>> Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>>>>
>>>>
>>>> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>>>>
>>>> Hi,
>>>> I want to write a driver with trace events.
>>>> In the first step i compile the example  trace-events-sample.c with the
>>>> makefile:
>>>>
>>>> ifneq ($(KERNELRELEASE),)
>>>>       obj-m  := modul_trace-events-sample.o
>>>>       modul_trace-events-sample-y := trace-events-sample.o
>>>>       ccflags-y := -I$(src)
>>>> else
>>>>       KDIR ?= /lib/modules/`uname -r`/build
>>>> default:
>>>>       $(MAKE) -C $(KDIR) M=$$PWD
>>>> endif
>>>>
>>>> now i get the modul_trace-events-sample.ko File.
>>>> now:
>>>> insmod modul_trace-events-sample.ko
>>>> lttng create
>>>> lttng enable-event -k -a
>>>> lttng start
>>>> ...wait...
>>>> lttng stop
>>>> lttng destroy
>>>>
>>>> now i look the result in the eclise viewer, but i found event
>>>> "trace_foo_bar" not in the session!
>>>> what am I doing wrong?
>>>>
>>>> I use ubuntu 13.04 in a vmware
>>>>
>>>> Thanks
>>>>
>>>> _______________________________________________
>>>>
>>>> Hi,
>>>>
>>>> now i found a answer:
>>>> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
>>>> now i download the lttng-module and compiled it.
>>>>
>>>> $ git clone git://git.lttng.org/lttng-modules.git
>>>> $ cd lttng-tools
>>>> $ make
>>>> $ sudo make modules_install
>>>> here I get error
>>>> INSTALL
>>>> /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>> Can't read private key
>>>> ...
>>>> what does that mean?
>>>> what should I do?
>>>>
>>>> please help me!
>>>>
>>>> another question:
>>>> when i create a trace events in module_a,
>>>> can i use it in module_b?
>>>> if yes, what should I do?
>>>>
>>>> thanks Klaus
>>>>
>>>>
>>>> _______________________________________________
>>>> lttng-dev mailing list
>>>> lttng-dev@lists.lttng.org
>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> lttng-dev mailing list
>>>> lttng-dev@lists.lttng.org
>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>
>>>
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]           ` <528F37DE.7050204@gmx.de>
@ 2013-11-22 16:12             ` Jérémie Galarneau
       [not found]             ` <CA+jJMxtD7TZ6MEf+URHe=SkOhCVT3aD56BhuQdp48EmJvnsyJg@mail.gmail.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Jérémie Galarneau @ 2013-11-22 16:12 UTC (permalink / raw)
  To: Klaus Dannecker; +Cc: lttng-dev

On Fri, Nov 22, 2013 at 5:54 AM, Klaus Dannecker <klaus.dannecker@gmx.de> wrote:
>
> Am 21.11.2013 18:41, schrieb Jérémie Galarneau:
>
>> On Thu, Nov 21, 2013 at 11:42 AM, Klaus Dannecker
>> <klaus.dannecker@gmx.de> wrote:
>>>
>>> Am 21.11.2013 16:49, schrieb Jérémie Galarneau:
>>>
>>>> On Thu, Nov 21, 2013 at 4:48 AM, Klaus Dannecker
>>>> <klaus.dannecker@gmx.de>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Nobody can help me?
>>>>>
>>>>> now i have ubuntu 13.10 installed  in a vmware.
>>>>> but i have the same error!
>>>>>
>>>>> s$ sudo make modules_install
>>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>>     INSTALL
>>>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>>
>>>>> Can't read private key
>>>>
>>>> Ubuntu now ships with module signing enabled by default.
>>>> Does the installation fail, or is it just a warning?
>>>
>>> i don't know
>>>
>>>>> ....
>>>>> lsmod | grep lttng
>>>>> -> no module found
>>>>>
>>>> The modules will not be automatically loaded after being built and
>>>> installed. You have to launch lttng-sessiond (as root) for that. What
>>>> is the output of the following commands?
>>>>
>>>> make
>>>> sudo make modules_install
>>>> sudo depmod -a
>>>> sudo lttng-sessiond &
>>>> lsmod | grep lttng
>>>
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ make
>>> make -C /lib/modules/3.11.0-12-generic/build
>>> M=/home/klaus/lttng_src/lttng-modules modules
>>>
>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:30: File
>>> /usr/src/linux-headers-3.11.0-12-generic/virt/kvm/iodev.h not found.
>>> Probe
>>> "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:81: Files
>>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext3/*.h not found. Probe
>>> "ext3"
>>> is disabled. Use full kernel source tree to enable it.
>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:142: Files
>>> /usr/src/linux-headers-3.11.0-12-generic/fs/btrfs/*.h not found. Probe
>>> "btrfs" is disabled. Use full kernel source tree to enable it.
>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:158: Files
>>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext4/*.h not found. Probe
>>> "ext4"
>>> is disabled. Use full kernel source tree to enable it.
>>>    Building modules, stage 2.
>>>    MODPOST 44 modules
>>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo make modules_install
>>>
>>> make -C /lib/modules/3.11.0-12-generic/build
>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>    INSTALL
>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>> Can't read private key
>>>    INSTALL
>>> /home/klaus/lttng_src/lttng-modules/lttng-ring-buffer-client-discard.ko
>>>
>>> Can't read private key
>>> ...
>>>    DEPMOD  3.11.0-12-generic
>>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo depmod -a
>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo lttng-sessiond &
>>> [1] 23486
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>>
>>> [1]+  Stopped                 sudo lttng-sessiond
>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>
>> Hard to say why lttng-sessiond received SIGSTOP...
>>
>> Could you try running the session daemon in verbose mode in another
>> terminal?
>> sudo lttng-sessiond -vvv
>
> klaus@ubuntu:~$ sudo lttng-sessiond -vvv
> [sudo] password for klaus:
> DEBUG3 [23710/23710]: Creating LTTng run directory: /var/run/lttng (in
> create_lttng_rundir() at main.c:4267)
> DEBUG2 [23710/23710]: Kernel consumer err path:
> /var/run/lttng/kconsumerd/error (in main() at main.c:4696)
> DEBUG2 [23710/23710]: Kernel consumer cmd path:
> /var/run/lttng/kconsumerd/command (in main() at main.c:4698)
> DEBUG1 [23710/23710]: Client socket path
> /var/run/lttng/client-lttng-sessiond (in main() at main.c:4751)
> DEBUG1 [23710/23710]: Application socket path
> /var/run/lttng/lttng-ust-sock-5 (in main() at main.c:4752)
> DEBUG1 [23710/23710]: Application wait path /lttng-ust-wait-5 (in main() at
> main.c:4753)
> DEBUG1 [23710/23710]: LTTng run directory path: /var/run/lttng (in main() at
> main.c:4754)
> DEBUG2 [23710/23710]: UST consumer 32 bits err path:
> /var/run/lttng/ustconsumerd32/error (in main() at main.c:4763)
> DEBUG2 [23710/23710]: UST consumer 32 bits cmd path:
> /var/run/lttng/ustconsumerd32/command (in main() at main.c:4765)
> DEBUG2 [23710/23710]: UST consumer 64 bits err path:
> /var/run/lttng/ustconsumerd64/error (in main() at main.c:4774)
> DEBUG2 [23710/23710]: UST consumer 64 bits cmd path:
> /var/run/lttng/ustconsumerd64/command (in main() at main.c:4776)
> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c080 of type 1 (in
> lttng_ht_new() at hashtable.c:127)
> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c270 of type 1 (in
> lttng_ht_new() at hashtable.c:127)
> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c498 of type 1 (in
> lttng_ht_new() at hashtable.c:127)
> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c6c0 of type 1 (in
> lttng_ht_new() at hashtable.c:127)
> DEBUG2 [23710/23710]: Creating consumer directory: /var/run/lttng/kconsumerd
> (in set_consumer_sockets() at main.c:4309)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-tracer (in
> modprobe_lttng_control() at modprobe.c:192)
> DEBUG2 [23710/23710]: Kernel tracer version validated (major version 2) (in
> kernel_validate_version() at kernel.c:700)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-ftrace (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-kprobes (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-kretprobes (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-lib-ring-buffer (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-ring-buffer-client-discard
> (in modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully
> lttng-ring-buffer-client-overwrite (in modprobe_lttng_data() at
> modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully
> lttng-ring-buffer-metadata-client (in modprobe_lttng_data() at
> modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully
> lttng-ring-buffer-client-mmap-discard (in modprobe_lttng_data() at
> modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully
> lttng-ring-buffer-client-mmap-overwrite (in modprobe_lttng_data() at
> modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully
> lttng-ring-buffer-metadata-mmap-client (in modprobe_lttng_data() at
> modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-types (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-asoc (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-block (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-btrfs (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-compaction (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext3 (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext4 (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-gpio (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-irq (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd2 (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kmem (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86 (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86-mmu (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-lock (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-module (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-napi (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-net (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-power (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-printk (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-random (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rcu (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regmap (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regulator (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rpm (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sched (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-scsi (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-signal (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-skb (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sock (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-statedump (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sunrpc (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-timer (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-udp (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-vmscan (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-workqueue (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-writeback (in
> modprobe_lttng_data() at modprobe.c:228)
> DEBUG1 [23710/23710]: Kernel tracer fd 6 (in init_kernel_tracer() at
> main.c:2364)
> DEBUG2 [23710/23710]: Creating consumer directory:
> /var/run/lttng/ustconsumerd64 (in set_consumer_sockets() at main.c:4309)
> DEBUG2 [23710/23710]: Creating consumer directory:
> /var/run/lttng/ustconsumerd32 (in set_consumer_sockets() at main.c:4309)
> DEBUG3 [23710/23710]: Session daemon client socket 9 and application socket
> 10 created (in init_daemon_socket() at main.c:4175)
> DEBUG1 [23710/23710]: All permissions are set (in set_permissions() at
> main.c:4255)
> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e160 of type 2 (in
> lttng_ht_new() at hashtable.c:127)
> DEBUG3 [23710/23710]: Global buffer per UID registry initialized (in
> buffer_reg_init_uid_registry() at buffer-registry.c:99)
> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e388 of type 2 (in
> lttng_ht_new() at hashtable.c:127)
> DEBUG3 [23710/23710]: Global buffer per PID registry initialized (in
> buffer_reg_init_pid_registry() at buffer-registry.c:220)
> DEBUG1 [23710/23710]: epoll set max size is 327338 (in
> compat_epoll_set_max_size() at compat-epoll.c:280)
> DEBUG1 [23710/23710]: Command subsystem initialized (in cmd_init() at
> cmd.c:3056)
> DEBUG1 [23710/23710]: Pid 23710 written in file
> /var/run/lttng/lttng-sessiond.pid (in utils_create_pid_file() at
> utils.c:437)
> DEBUG1 [23710/23710]: Pid 5345 written in file /var/run/lttng/jul.port (in
> utils_create_pid_file() at utils.c:437)
> DEBUG1 [23710/23710]: TCP inet operation timeout set to 216 sec (in
> lttcomm_inet_init() at inet.c:529)
> DEBUG1 [23710/23710]: Health check time delta in seconds set to 236 (in
> health_init() at health.c:73)
> DEBUG1 [23710/23820]: [thread] Manage health check started (in
> thread_manage_health() at main.c:3511)
> DEBUG1 [23710/23824]: [thread] Manage application started (in
> thread_manage_apps() at main.c:1256)
> DEBUG1 [23710/23823]: [thread] Manage application registration started (in
> thread_registration_apps() at main.c:1766)
> DEBUG1 [23710/23822]: [thread] Dispatch UST command started (in
> thread_dispatch_ust_registration() at main.c:1543)
> DEBUG1 [23710/23821]: [thread] Manage client started (in
> thread_manage_clients() at main.c:3695)
> DEBUG1 [23710/23821]: Accepting client command ... (in
> thread_manage_clients() at main.c:3747)
> DEBUG1 [23710/23819]: [ht-thread] startup. (in thread_ht_cleanup() at
> ht-cleanup.c:35)
> DEBUG3 [23710/23819]: [ht-thread] Polling on 2 fds. (in thread_ht_cleanup()
> at ht-cleanup.c:59)
> DEBUG1 [23710/23825]: [ust-thread] Manage application notify command (in
> ust_thread_manage_notify() at ust-thread.c:38)
> DEBUG1 [23710/23826]: [jul-thread] Manage JUL application registration. (in
> jul_thread_manage_registration() at jul-thread.c:250)
> DEBUG3 [23710/23826]: URI string: tcp://localhost (in uri_parse() at
> uri.c:291)
> DEBUG1 [23710/23824]: Apps thread polling on 2 fds (in thread_manage_apps()
> at main.c:1286)
> DEBUG1 [23710/23822]: Futex n to 1 prepare done (in futex_nto1_prepare() at
> futex.c:75)
> DEBUG1 [23710/23823]: Notifying applications of session daemon state: 1 (in
> notify_ust_apps() at main.c:593)
> DEBUG3 [23710/23825]: [ust-thread] Manage notify polling on 2 fds (in
> ust_thread_manage_notify() at ust-thread.c:63)
> DEBUG1 [23710/23820]: Health check ready (in thread_manage_health() at
> main.c:3574)
> DEBUG1 [23710/23827]: [thread] Thread manage kernel started (in
> thread_manage_kernel() at main.c:794)
> DEBUG1 [23710/23827]: Updating kernel poll set (in update_kernel_poll() at
> main.c:654)
> DEBUG1 [23710/23827]: Thread kernel polling on 2 fds (in
> thread_manage_kernel() at main.c:839)
> DEBUG1 [23710/23822]: Woken up but nothing in the UST command queue (in
> thread_dispatch_ust_registration() at main.c:1566)
> DEBUG2 [23710/23826]: IP address resolved to 127.0.0.1 (in set_ip_address()
> at uri.c:132)
> DEBUG3 [23710/23826]: URI dtype: 1, proto: 1, host: localhost, subdir: ,
> ctrl: 0, data: 0 (in uri_parse() at uri.c:505)
> PERROR [23710/23826]: bind inet: Address already in use (in
> lttcomm_bind_inet_sock() at inet.c:109)
> DEBUG1 [23710/23826]: [jul-thread] is cleaning up and stopping. (in
> jul_thread_manage_registration() at jul-thread.c:356)
> DEBUG3 [23710/23826]: [jul-thread] Cleaning JUL apps ht (in
> clean_jul_apps_ht() at jul-thread.c:100)
> DEBUG1 [23710/23823]: Got the wait shm fd 26 (in get_wait_shm() at
> shm.c:115)
> DEBUG1 [23710/23823]: Futex wait update active 1 (in futex_wait_update() at
> futex.c:63)
> DEBUG1 [23710/23823]: Accepting application registration (in
> thread_registration_apps() at main.c:1803)
>
> another terminal:
>
> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
> lttng_probe_writeback    22927  0
> lttng_probe_workqueue    13726  0
> lttng_probe_vmscan     17138  0
> ....
>
> but:
> klaus@ubuntu:~/lttng_src/lttng-modules$ lttng list -k
> Error: Unable to list kernel events: Tracing the kernel requires a root
> lttng-sessiond daemon, as well as "tracing" group membership or root user ID
> for the lttng client.
> Error: Command error
> klaus@ubuntu:~/lttng_src/lttng-modules$
>
> then stop the command sudo lttng-sessiond -vvv with "STRG+C"
> ^CDEBUG1 [23710/23710]: SIGINT caught (in sighandler() at main.c:4374)
> DEBUG1 [23710/23710]: Terminating all threads (in stop_threads() at
> main.c:370)
> DEBUG1 [23710/23710]: Futex n to 1 wake done (in futex_nto1_wake() at
> futex.c:104)
> DEBUG1 [23710/23821]: Clean command context structure (in
> clean_command_ctx() at main.c:573)
> ...
>
> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
> klaus@ubuntu:~/lttng_src/lttng-modules$
>

Everything looks fine to me.

The modules are loaded and unloaded automatically by the session
daemon when it is launched and stopped, respectively.

If you want to trace the kernel or list the kernel events, you will
have to launch a root session daemon (sudo lttng-sessiond -d) and then
create a tracing session either as root or as a member of the
"tracing" group.

Regards,
Jérémie

> Regards,
> Klaus
>
>
>
>
>> This should load the modules or at least log an error if it fails to do
>> so.
>>
>>> Thanks for your help!
>>>
>>> Regards,
>>> Klaus
>>>
>>>> Regards,
>>>> Jérémie
>>>>
>>>>> Thanks!
>>>>>
>>>>> Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>>>>>
>>>>>
>>>>> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>>>>>
>>>>> Hi,
>>>>> I want to write a driver with trace events.
>>>>> In the first step i compile the example  trace-events-sample.c with the
>>>>> makefile:
>>>>>
>>>>> ifneq ($(KERNELRELEASE),)
>>>>>       obj-m  := modul_trace-events-sample.o
>>>>>       modul_trace-events-sample-y := trace-events-sample.o
>>>>>       ccflags-y := -I$(src)
>>>>> else
>>>>>       KDIR ?= /lib/modules/`uname -r`/build
>>>>> default:
>>>>>       $(MAKE) -C $(KDIR) M=$$PWD
>>>>> endif
>>>>>
>>>>> now i get the modul_trace-events-sample.ko File.
>>>>> now:
>>>>> insmod modul_trace-events-sample.ko
>>>>> lttng create
>>>>> lttng enable-event -k -a
>>>>> lttng start
>>>>> ...wait...
>>>>> lttng stop
>>>>> lttng destroy
>>>>>
>>>>> now i look the result in the eclise viewer, but i found event
>>>>> "trace_foo_bar" not in the session!
>>>>> what am I doing wrong?
>>>>>
>>>>> I use ubuntu 13.04 in a vmware
>>>>>
>>>>> Thanks
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> Hi,
>>>>>
>>>>> now i found a answer:
>>>>> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
>>>>> now i download the lttng-module and compiled it.
>>>>>
>>>>> $ git clone git://git.lttng.org/lttng-modules.git
>>>>> $ cd lttng-tools
>>>>> $ make
>>>>> $ sudo make modules_install
>>>>> here I get error
>>>>> INSTALL
>>>>> /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>> Can't read private key
>>>>> ...
>>>>> what does that mean?
>>>>> what should I do?
>>>>>
>>>>> please help me!
>>>>>
>>>>> another question:
>>>>> when i create a trace events in module_a,
>>>>> can i use it in module_b?
>>>>> if yes, what should I do?
>>>>>
>>>>> thanks Klaus
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> lttng-dev mailing list
>>>>> lttng-dev@lists.lttng.org
>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> lttng-dev mailing list
>>>>> lttng-dev@lists.lttng.org
>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>
>>>>
>>
>>
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]             ` <CA+jJMxtD7TZ6MEf+URHe=SkOhCVT3aD56BhuQdp48EmJvnsyJg@mail.gmail.com>
@ 2013-11-22 17:33               ` Klaus Dannecker
       [not found]               ` <528F9561.3030802@gmx.de>
  1 sibling, 0 replies; 17+ messages in thread
From: Klaus Dannecker @ 2013-11-22 17:33 UTC (permalink / raw)
  To: Jérémie Galarneau; +Cc: lttng-dev

Hi.

Thank's Jérémie!

my account type is Administrator.
sudo lttng list -k works good!
how can I define a "tracing"group , so I no longer need the sudo command?

another problem:
i have add mycustomevents in the lttng_module like
http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
but after
$ make
$ sudo make modules_install
$ sudo depmod -a
  and
$ sudo lttng list -k
my lttng-probe-mycustomevents.ko is now in 
/lib/modules/3.11.0-12-generic/extra/probes
but i can't find my new event in the list!

Regards,
Klaus


Am 22.11.2013 17:12, schrieb Jérémie Galarneau:
> On Fri, Nov 22, 2013 at 5:54 AM, Klaus Dannecker <klaus.dannecker@gmx.de> wrote:
>> Am 21.11.2013 18:41, schrieb Jérémie Galarneau:
>>
>>> On Thu, Nov 21, 2013 at 11:42 AM, Klaus Dannecker
>>> <klaus.dannecker@gmx.de> wrote:
>>>> Am 21.11.2013 16:49, schrieb Jérémie Galarneau:
>>>>
>>>>> On Thu, Nov 21, 2013 at 4:48 AM, Klaus Dannecker
>>>>> <klaus.dannecker@gmx.de>
>>>>> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Nobody can help me?
>>>>>>
>>>>>> now i have ubuntu 13.10 installed  in a vmware.
>>>>>> but i have the same error!
>>>>>>
>>>>>> s$ sudo make modules_install
>>>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>>>      INSTALL
>>>>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>>>
>>>>>> Can't read private key
>>>>> Ubuntu now ships with module signing enabled by default.
>>>>> Does the installation fail, or is it just a warning?
>>>> i don't know
>>>>
>>>>>> ....
>>>>>> lsmod | grep lttng
>>>>>> -> no module found
>>>>>>
>>>>> The modules will not be automatically loaded after being built and
>>>>> installed. You have to launch lttng-sessiond (as root) for that. What
>>>>> is the output of the following commands?
>>>>>
>>>>> make
>>>>> sudo make modules_install
>>>>> sudo depmod -a
>>>>> sudo lttng-sessiond &
>>>>> lsmod | grep lttng
>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ make
>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>> M=/home/klaus/lttng_src/lttng-modules modules
>>>>
>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:30: File
>>>> /usr/src/linux-headers-3.11.0-12-generic/virt/kvm/iodev.h not found.
>>>> Probe
>>>> "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:81: Files
>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext3/*.h not found. Probe
>>>> "ext3"
>>>> is disabled. Use full kernel source tree to enable it.
>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:142: Files
>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/btrfs/*.h not found. Probe
>>>> "btrfs" is disabled. Use full kernel source tree to enable it.
>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:158: Files
>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext4/*.h not found. Probe
>>>> "ext4"
>>>> is disabled. Use full kernel source tree to enable it.
>>>>     Building modules, stage 2.
>>>>     MODPOST 44 modules
>>>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>
>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo make modules_install
>>>>
>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>     INSTALL
>>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>> Can't read private key
>>>>     INSTALL
>>>> /home/klaus/lttng_src/lttng-modules/lttng-ring-buffer-client-discard.ko
>>>>
>>>> Can't read private key
>>>> ...
>>>>     DEPMOD  3.11.0-12-generic
>>>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>>
>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo depmod -a
>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo lttng-sessiond &
>>>> [1] 23486
>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>>>
>>>> [1]+  Stopped                 sudo lttng-sessiond
>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>>
>>> Hard to say why lttng-sessiond received SIGSTOP...
>>>
>>> Could you try running the session daemon in verbose mode in another
>>> terminal?
>>> sudo lttng-sessiond -vvv
>> klaus@ubuntu:~$ sudo lttng-sessiond -vvv
>> [sudo] password for klaus:
>> DEBUG3 [23710/23710]: Creating LTTng run directory: /var/run/lttng (in
>> create_lttng_rundir() at main.c:4267)
>> DEBUG2 [23710/23710]: Kernel consumer err path:
>> /var/run/lttng/kconsumerd/error (in main() at main.c:4696)
>> DEBUG2 [23710/23710]: Kernel consumer cmd path:
>> /var/run/lttng/kconsumerd/command (in main() at main.c:4698)
>> DEBUG1 [23710/23710]: Client socket path
>> /var/run/lttng/client-lttng-sessiond (in main() at main.c:4751)
>> DEBUG1 [23710/23710]: Application socket path
>> /var/run/lttng/lttng-ust-sock-5 (in main() at main.c:4752)
>> DEBUG1 [23710/23710]: Application wait path /lttng-ust-wait-5 (in main() at
>> main.c:4753)
>> DEBUG1 [23710/23710]: LTTng run directory path: /var/run/lttng (in main() at
>> main.c:4754)
>> DEBUG2 [23710/23710]: UST consumer 32 bits err path:
>> /var/run/lttng/ustconsumerd32/error (in main() at main.c:4763)
>> DEBUG2 [23710/23710]: UST consumer 32 bits cmd path:
>> /var/run/lttng/ustconsumerd32/command (in main() at main.c:4765)
>> DEBUG2 [23710/23710]: UST consumer 64 bits err path:
>> /var/run/lttng/ustconsumerd64/error (in main() at main.c:4774)
>> DEBUG2 [23710/23710]: UST consumer 64 bits cmd path:
>> /var/run/lttng/ustconsumerd64/command (in main() at main.c:4776)
>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c080 of type 1 (in
>> lttng_ht_new() at hashtable.c:127)
>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c270 of type 1 (in
>> lttng_ht_new() at hashtable.c:127)
>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c498 of type 1 (in
>> lttng_ht_new() at hashtable.c:127)
>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c6c0 of type 1 (in
>> lttng_ht_new() at hashtable.c:127)
>> DEBUG2 [23710/23710]: Creating consumer directory: /var/run/lttng/kconsumerd
>> (in set_consumer_sockets() at main.c:4309)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-tracer (in
>> modprobe_lttng_control() at modprobe.c:192)
>> DEBUG2 [23710/23710]: Kernel tracer version validated (major version 2) (in
>> kernel_validate_version() at kernel.c:700)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-ftrace (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-kprobes (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-kretprobes (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-lib-ring-buffer (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-ring-buffer-client-discard
>> (in modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully
>> lttng-ring-buffer-client-overwrite (in modprobe_lttng_data() at
>> modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully
>> lttng-ring-buffer-metadata-client (in modprobe_lttng_data() at
>> modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully
>> lttng-ring-buffer-client-mmap-discard (in modprobe_lttng_data() at
>> modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully
>> lttng-ring-buffer-client-mmap-overwrite (in modprobe_lttng_data() at
>> modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully
>> lttng-ring-buffer-metadata-mmap-client (in modprobe_lttng_data() at
>> modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-types (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-asoc (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-block (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-btrfs (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-compaction (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext3 (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext4 (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-gpio (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-irq (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd2 (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kmem (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86 (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86-mmu (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-lock (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-module (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-napi (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-net (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-power (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-printk (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-random (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rcu (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regmap (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regulator (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rpm (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sched (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-scsi (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-signal (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-skb (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sock (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-statedump (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sunrpc (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-timer (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-udp (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-vmscan (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-workqueue (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-writeback (in
>> modprobe_lttng_data() at modprobe.c:228)
>> DEBUG1 [23710/23710]: Kernel tracer fd 6 (in init_kernel_tracer() at
>> main.c:2364)
>> DEBUG2 [23710/23710]: Creating consumer directory:
>> /var/run/lttng/ustconsumerd64 (in set_consumer_sockets() at main.c:4309)
>> DEBUG2 [23710/23710]: Creating consumer directory:
>> /var/run/lttng/ustconsumerd32 (in set_consumer_sockets() at main.c:4309)
>> DEBUG3 [23710/23710]: Session daemon client socket 9 and application socket
>> 10 created (in init_daemon_socket() at main.c:4175)
>> DEBUG1 [23710/23710]: All permissions are set (in set_permissions() at
>> main.c:4255)
>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e160 of type 2 (in
>> lttng_ht_new() at hashtable.c:127)
>> DEBUG3 [23710/23710]: Global buffer per UID registry initialized (in
>> buffer_reg_init_uid_registry() at buffer-registry.c:99)
>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e388 of type 2 (in
>> lttng_ht_new() at hashtable.c:127)
>> DEBUG3 [23710/23710]: Global buffer per PID registry initialized (in
>> buffer_reg_init_pid_registry() at buffer-registry.c:220)
>> DEBUG1 [23710/23710]: epoll set max size is 327338 (in
>> compat_epoll_set_max_size() at compat-epoll.c:280)
>> DEBUG1 [23710/23710]: Command subsystem initialized (in cmd_init() at
>> cmd.c:3056)
>> DEBUG1 [23710/23710]: Pid 23710 written in file
>> /var/run/lttng/lttng-sessiond.pid (in utils_create_pid_file() at
>> utils.c:437)
>> DEBUG1 [23710/23710]: Pid 5345 written in file /var/run/lttng/jul.port (in
>> utils_create_pid_file() at utils.c:437)
>> DEBUG1 [23710/23710]: TCP inet operation timeout set to 216 sec (in
>> lttcomm_inet_init() at inet.c:529)
>> DEBUG1 [23710/23710]: Health check time delta in seconds set to 236 (in
>> health_init() at health.c:73)
>> DEBUG1 [23710/23820]: [thread] Manage health check started (in
>> thread_manage_health() at main.c:3511)
>> DEBUG1 [23710/23824]: [thread] Manage application started (in
>> thread_manage_apps() at main.c:1256)
>> DEBUG1 [23710/23823]: [thread] Manage application registration started (in
>> thread_registration_apps() at main.c:1766)
>> DEBUG1 [23710/23822]: [thread] Dispatch UST command started (in
>> thread_dispatch_ust_registration() at main.c:1543)
>> DEBUG1 [23710/23821]: [thread] Manage client started (in
>> thread_manage_clients() at main.c:3695)
>> DEBUG1 [23710/23821]: Accepting client command ... (in
>> thread_manage_clients() at main.c:3747)
>> DEBUG1 [23710/23819]: [ht-thread] startup. (in thread_ht_cleanup() at
>> ht-cleanup.c:35)
>> DEBUG3 [23710/23819]: [ht-thread] Polling on 2 fds. (in thread_ht_cleanup()
>> at ht-cleanup.c:59)
>> DEBUG1 [23710/23825]: [ust-thread] Manage application notify command (in
>> ust_thread_manage_notify() at ust-thread.c:38)
>> DEBUG1 [23710/23826]: [jul-thread] Manage JUL application registration. (in
>> jul_thread_manage_registration() at jul-thread.c:250)
>> DEBUG3 [23710/23826]: URI string: tcp://localhost (in uri_parse() at
>> uri.c:291)
>> DEBUG1 [23710/23824]: Apps thread polling on 2 fds (in thread_manage_apps()
>> at main.c:1286)
>> DEBUG1 [23710/23822]: Futex n to 1 prepare done (in futex_nto1_prepare() at
>> futex.c:75)
>> DEBUG1 [23710/23823]: Notifying applications of session daemon state: 1 (in
>> notify_ust_apps() at main.c:593)
>> DEBUG3 [23710/23825]: [ust-thread] Manage notify polling on 2 fds (in
>> ust_thread_manage_notify() at ust-thread.c:63)
>> DEBUG1 [23710/23820]: Health check ready (in thread_manage_health() at
>> main.c:3574)
>> DEBUG1 [23710/23827]: [thread] Thread manage kernel started (in
>> thread_manage_kernel() at main.c:794)
>> DEBUG1 [23710/23827]: Updating kernel poll set (in update_kernel_poll() at
>> main.c:654)
>> DEBUG1 [23710/23827]: Thread kernel polling on 2 fds (in
>> thread_manage_kernel() at main.c:839)
>> DEBUG1 [23710/23822]: Woken up but nothing in the UST command queue (in
>> thread_dispatch_ust_registration() at main.c:1566)
>> DEBUG2 [23710/23826]: IP address resolved to 127.0.0.1 (in set_ip_address()
>> at uri.c:132)
>> DEBUG3 [23710/23826]: URI dtype: 1, proto: 1, host: localhost, subdir: ,
>> ctrl: 0, data: 0 (in uri_parse() at uri.c:505)
>> PERROR [23710/23826]: bind inet: Address already in use (in
>> lttcomm_bind_inet_sock() at inet.c:109)
>> DEBUG1 [23710/23826]: [jul-thread] is cleaning up and stopping. (in
>> jul_thread_manage_registration() at jul-thread.c:356)
>> DEBUG3 [23710/23826]: [jul-thread] Cleaning JUL apps ht (in
>> clean_jul_apps_ht() at jul-thread.c:100)
>> DEBUG1 [23710/23823]: Got the wait shm fd 26 (in get_wait_shm() at
>> shm.c:115)
>> DEBUG1 [23710/23823]: Futex wait update active 1 (in futex_wait_update() at
>> futex.c:63)
>> DEBUG1 [23710/23823]: Accepting application registration (in
>> thread_registration_apps() at main.c:1803)
>>
>> another terminal:
>>
>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>> lttng_probe_writeback    22927  0
>> lttng_probe_workqueue    13726  0
>> lttng_probe_vmscan     17138  0
>> ....
>>
>> but:
>> klaus@ubuntu:~/lttng_src/lttng-modules$ lttng list -k
>> Error: Unable to list kernel events: Tracing the kernel requires a root
>> lttng-sessiond daemon, as well as "tracing" group membership or root user ID
>> for the lttng client.
>> Error: Command error
>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>
>> then stop the command sudo lttng-sessiond -vvv with "STRG+C"
>> ^CDEBUG1 [23710/23710]: SIGINT caught (in sighandler() at main.c:4374)
>> DEBUG1 [23710/23710]: Terminating all threads (in stop_threads() at
>> main.c:370)
>> DEBUG1 [23710/23710]: Futex n to 1 wake done (in futex_nto1_wake() at
>> futex.c:104)
>> DEBUG1 [23710/23821]: Clean command context structure (in
>> clean_command_ctx() at main.c:573)
>> ...
>>
>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>
> Everything looks fine to me.
>
> The modules are loaded and unloaded automatically by the session
> daemon when it is launched and stopped, respectively.
>
> If you want to trace the kernel or list the kernel events, you will
> have to launch a root session daemon (sudo lttng-sessiond -d) and then
> create a tracing session either as root or as a member of the
> "tracing" group.
>
> Regards,
> Jérémie
>
>> Regards,
>> Klaus
>>
>>
>>
>>
>>> This should load the modules or at least log an error if it fails to do
>>> so.
>>>
>>>> Thanks for your help!
>>>>
>>>> Regards,
>>>> Klaus
>>>>
>>>>> Regards,
>>>>> Jérémie
>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>>>>>>
>>>>>>
>>>>>> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>>>>>>
>>>>>> Hi,
>>>>>> I want to write a driver with trace events.
>>>>>> In the first step i compile the example  trace-events-sample.c with the
>>>>>> makefile:
>>>>>>
>>>>>> ifneq ($(KERNELRELEASE),)
>>>>>>        obj-m  := modul_trace-events-sample.o
>>>>>>        modul_trace-events-sample-y := trace-events-sample.o
>>>>>>        ccflags-y := -I$(src)
>>>>>> else
>>>>>>        KDIR ?= /lib/modules/`uname -r`/build
>>>>>> default:
>>>>>>        $(MAKE) -C $(KDIR) M=$$PWD
>>>>>> endif
>>>>>>
>>>>>> now i get the modul_trace-events-sample.ko File.
>>>>>> now:
>>>>>> insmod modul_trace-events-sample.ko
>>>>>> lttng create
>>>>>> lttng enable-event -k -a
>>>>>> lttng start
>>>>>> ...wait...
>>>>>> lttng stop
>>>>>> lttng destroy
>>>>>>
>>>>>> now i look the result in the eclise viewer, but i found event
>>>>>> "trace_foo_bar" not in the session!
>>>>>> what am I doing wrong?
>>>>>>
>>>>>> I use ubuntu 13.04 in a vmware
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> _______________________________________________
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> now i found a answer:
>>>>>> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
>>>>>> now i download the lttng-module and compiled it.
>>>>>>
>>>>>> $ git clone git://git.lttng.org/lttng-modules.git
>>>>>> $ cd lttng-tools
>>>>>> $ make
>>>>>> $ sudo make modules_install
>>>>>> here I get error
>>>>>> INSTALL
>>>>>> /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>>> Can't read private key
>>>>>> ...
>>>>>> what does that mean?
>>>>>> what should I do?
>>>>>>
>>>>>> please help me!
>>>>>>
>>>>>> another question:
>>>>>> when i create a trace events in module_a,
>>>>>> can i use it in module_b?
>>>>>> if yes, what should I do?
>>>>>>
>>>>>> thanks Klaus
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> lttng-dev mailing list
>>>>>> lttng-dev@lists.lttng.org
>>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> lttng-dev mailing list
>>>>>> lttng-dev@lists.lttng.org
>>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>>
>>>
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]               ` <528F9561.3030802@gmx.de>
@ 2013-11-22 18:41                 ` Jérémie Galarneau
  2013-11-22 19:06                 ` Jérémie Galarneau
  2013-11-22 19:07                 ` Francis Giraldeau
  2 siblings, 0 replies; 17+ messages in thread
From: Jérémie Galarneau @ 2013-11-22 18:41 UTC (permalink / raw)
  To: Klaus Dannecker; +Cc: lttng-dev

On Fri, Nov 22, 2013 at 12:33 PM, Klaus Dannecker
<klaus.dannecker@gmx.de> wrote:
> Hi.
>
> Thank's Jérémie!
>
> my account type is Administrator.
> sudo lttng list -k works good!
> how can I define a "tracing"group , so I no longer need the sudo command?
>

The users you add to the "tracing" group will not need root privileges
to trace the kernel. You still need root to launch the session daemon
though.

> another problem:
> i have add mycustomevents in the lttng_module like
> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
> but after
>
> $ make
> $ sudo make modules_install
> $ sudo depmod -a
>  and
> $ sudo lttng list -k
> my lttng-probe-mycustomevents.ko is now in
> /lib/modules/3.11.0-12-generic/extra/probes
> but i can't find my new event in the list!
>

I have never tried to instrument a kernel module myself, but are you
sure your module is loaded?

Jérémie

> Regards,
> Klaus
>
>
> Am 22.11.2013 17:12, schrieb Jérémie Galarneau:
>
>> On Fri, Nov 22, 2013 at 5:54 AM, Klaus Dannecker <klaus.dannecker@gmx.de>
>> wrote:
>>>
>>> Am 21.11.2013 18:41, schrieb Jérémie Galarneau:
>>>
>>>> On Thu, Nov 21, 2013 at 11:42 AM, Klaus Dannecker
>>>> <klaus.dannecker@gmx.de> wrote:
>>>>>
>>>>> Am 21.11.2013 16:49, schrieb Jérémie Galarneau:
>>>>>
>>>>>> On Thu, Nov 21, 2013 at 4:48 AM, Klaus Dannecker
>>>>>> <klaus.dannecker@gmx.de>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Nobody can help me?
>>>>>>>
>>>>>>> now i have ubuntu 13.10 installed  in a vmware.
>>>>>>> but i have the same error!
>>>>>>>
>>>>>>> s$ sudo make modules_install
>>>>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>>>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>>>>>> make[1]: Entering directory
>>>>>>> `/usr/src/linux-headers-3.11.0-12-generic'
>>>>>>>      INSTALL
>>>>>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>>>>
>>>>>>> Can't read private key
>>>>>>
>>>>>> Ubuntu now ships with module signing enabled by default.
>>>>>> Does the installation fail, or is it just a warning?
>>>>>
>>>>> i don't know
>>>>>
>>>>>>> ....
>>>>>>> lsmod | grep lttng
>>>>>>> -> no module found
>>>>>>>
>>>>>> The modules will not be automatically loaded after being built and
>>>>>> installed. You have to launch lttng-sessiond (as root) for that. What
>>>>>> is the output of the following commands?
>>>>>>
>>>>>> make
>>>>>> sudo make modules_install
>>>>>> sudo depmod -a
>>>>>> sudo lttng-sessiond &
>>>>>> lsmod | grep lttng
>>>>>
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ make
>>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>>> M=/home/klaus/lttng_src/lttng-modules modules
>>>>>
>>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:30: File
>>>>> /usr/src/linux-headers-3.11.0-12-generic/virt/kvm/iodev.h not found.
>>>>> Probe
>>>>> "kvm" x86-specific is disabled. Use full kernel source tree to enable
>>>>> it.
>>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:81: Files
>>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext3/*.h not found. Probe
>>>>> "ext3"
>>>>> is disabled. Use full kernel source tree to enable it.
>>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:142: Files
>>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/btrfs/*.h not found. Probe
>>>>> "btrfs" is disabled. Use full kernel source tree to enable it.
>>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:158: Files
>>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext4/*.h not found. Probe
>>>>> "ext4"
>>>>> is disabled. Use full kernel source tree to enable it.
>>>>>     Building modules, stage 2.
>>>>>     MODPOST 44 modules
>>>>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>>
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo make modules_install
>>>>>
>>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>>     INSTALL
>>>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>> Can't read private key
>>>>>     INSTALL
>>>>> /home/klaus/lttng_src/lttng-modules/lttng-ring-buffer-client-discard.ko
>>>>>
>>>>> Can't read private key
>>>>> ...
>>>>>     DEPMOD  3.11.0-12-generic
>>>>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>>>
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo depmod -a
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo lttng-sessiond &
>>>>> [1] 23486
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>>>>
>>>>> [1]+  Stopped                 sudo lttng-sessiond
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>>>
>>>> Hard to say why lttng-sessiond received SIGSTOP...
>>>>
>>>> Could you try running the session daemon in verbose mode in another
>>>> terminal?
>>>> sudo lttng-sessiond -vvv
>>>
>>> klaus@ubuntu:~$ sudo lttng-sessiond -vvv
>>> [sudo] password for klaus:
>>> DEBUG3 [23710/23710]: Creating LTTng run directory: /var/run/lttng (in
>>> create_lttng_rundir() at main.c:4267)
>>> DEBUG2 [23710/23710]: Kernel consumer err path:
>>> /var/run/lttng/kconsumerd/error (in main() at main.c:4696)
>>> DEBUG2 [23710/23710]: Kernel consumer cmd path:
>>> /var/run/lttng/kconsumerd/command (in main() at main.c:4698)
>>> DEBUG1 [23710/23710]: Client socket path
>>> /var/run/lttng/client-lttng-sessiond (in main() at main.c:4751)
>>> DEBUG1 [23710/23710]: Application socket path
>>> /var/run/lttng/lttng-ust-sock-5 (in main() at main.c:4752)
>>> DEBUG1 [23710/23710]: Application wait path /lttng-ust-wait-5 (in main()
>>> at
>>> main.c:4753)
>>> DEBUG1 [23710/23710]: LTTng run directory path: /var/run/lttng (in main()
>>> at
>>> main.c:4754)
>>> DEBUG2 [23710/23710]: UST consumer 32 bits err path:
>>> /var/run/lttng/ustconsumerd32/error (in main() at main.c:4763)
>>> DEBUG2 [23710/23710]: UST consumer 32 bits cmd path:
>>> /var/run/lttng/ustconsumerd32/command (in main() at main.c:4765)
>>> DEBUG2 [23710/23710]: UST consumer 64 bits err path:
>>> /var/run/lttng/ustconsumerd64/error (in main() at main.c:4774)
>>> DEBUG2 [23710/23710]: UST consumer 64 bits cmd path:
>>> /var/run/lttng/ustconsumerd64/command (in main() at main.c:4776)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c080 of type 1 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c270 of type 1 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c498 of type 1 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c6c0 of type 1 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG2 [23710/23710]: Creating consumer directory:
>>> /var/run/lttng/kconsumerd
>>> (in set_consumer_sockets() at main.c:4309)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-tracer (in
>>> modprobe_lttng_control() at modprobe.c:192)
>>> DEBUG2 [23710/23710]: Kernel tracer version validated (major version 2)
>>> (in
>>> kernel_validate_version() at kernel.c:700)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-ftrace (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-kprobes (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-kretprobes (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-lib-ring-buffer (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-client-discard
>>> (in modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-client-overwrite (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-metadata-client (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-client-mmap-discard (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-client-mmap-overwrite (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-metadata-mmap-client (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-types (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-asoc (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-block (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-btrfs (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-compaction (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext3 (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext4 (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-gpio (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-irq (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd2 (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kmem (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86 (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86-mmu (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-lock (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-module (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-napi (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-net (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-power (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-printk (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-random (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rcu (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regmap (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regulator (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rpm (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sched (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-scsi (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-signal (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-skb (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sock (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-statedump (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sunrpc (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-timer (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-udp (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-vmscan (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-workqueue (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-writeback (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Kernel tracer fd 6 (in init_kernel_tracer() at
>>> main.c:2364)
>>> DEBUG2 [23710/23710]: Creating consumer directory:
>>> /var/run/lttng/ustconsumerd64 (in set_consumer_sockets() at main.c:4309)
>>> DEBUG2 [23710/23710]: Creating consumer directory:
>>> /var/run/lttng/ustconsumerd32 (in set_consumer_sockets() at main.c:4309)
>>> DEBUG3 [23710/23710]: Session daemon client socket 9 and application
>>> socket
>>> 10 created (in init_daemon_socket() at main.c:4175)
>>> DEBUG1 [23710/23710]: All permissions are set (in set_permissions() at
>>> main.c:4255)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e160 of type 2 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Global buffer per UID registry initialized (in
>>> buffer_reg_init_uid_registry() at buffer-registry.c:99)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e388 of type 2 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Global buffer per PID registry initialized (in
>>> buffer_reg_init_pid_registry() at buffer-registry.c:220)
>>> DEBUG1 [23710/23710]: epoll set max size is 327338 (in
>>> compat_epoll_set_max_size() at compat-epoll.c:280)
>>> DEBUG1 [23710/23710]: Command subsystem initialized (in cmd_init() at
>>> cmd.c:3056)
>>> DEBUG1 [23710/23710]: Pid 23710 written in file
>>> /var/run/lttng/lttng-sessiond.pid (in utils_create_pid_file() at
>>> utils.c:437)
>>> DEBUG1 [23710/23710]: Pid 5345 written in file /var/run/lttng/jul.port
>>> (in
>>> utils_create_pid_file() at utils.c:437)
>>> DEBUG1 [23710/23710]: TCP inet operation timeout set to 216 sec (in
>>> lttcomm_inet_init() at inet.c:529)
>>> DEBUG1 [23710/23710]: Health check time delta in seconds set to 236 (in
>>> health_init() at health.c:73)
>>> DEBUG1 [23710/23820]: [thread] Manage health check started (in
>>> thread_manage_health() at main.c:3511)
>>> DEBUG1 [23710/23824]: [thread] Manage application started (in
>>> thread_manage_apps() at main.c:1256)
>>> DEBUG1 [23710/23823]: [thread] Manage application registration started
>>> (in
>>> thread_registration_apps() at main.c:1766)
>>> DEBUG1 [23710/23822]: [thread] Dispatch UST command started (in
>>> thread_dispatch_ust_registration() at main.c:1543)
>>> DEBUG1 [23710/23821]: [thread] Manage client started (in
>>> thread_manage_clients() at main.c:3695)
>>> DEBUG1 [23710/23821]: Accepting client command ... (in
>>> thread_manage_clients() at main.c:3747)
>>> DEBUG1 [23710/23819]: [ht-thread] startup. (in thread_ht_cleanup() at
>>> ht-cleanup.c:35)
>>> DEBUG3 [23710/23819]: [ht-thread] Polling on 2 fds. (in
>>> thread_ht_cleanup()
>>> at ht-cleanup.c:59)
>>> DEBUG1 [23710/23825]: [ust-thread] Manage application notify command (in
>>> ust_thread_manage_notify() at ust-thread.c:38)
>>> DEBUG1 [23710/23826]: [jul-thread] Manage JUL application registration.
>>> (in
>>> jul_thread_manage_registration() at jul-thread.c:250)
>>> DEBUG3 [23710/23826]: URI string: tcp://localhost (in uri_parse() at
>>> uri.c:291)
>>> DEBUG1 [23710/23824]: Apps thread polling on 2 fds (in
>>> thread_manage_apps()
>>> at main.c:1286)
>>> DEBUG1 [23710/23822]: Futex n to 1 prepare done (in futex_nto1_prepare()
>>> at
>>> futex.c:75)
>>> DEBUG1 [23710/23823]: Notifying applications of session daemon state: 1
>>> (in
>>> notify_ust_apps() at main.c:593)
>>> DEBUG3 [23710/23825]: [ust-thread] Manage notify polling on 2 fds (in
>>> ust_thread_manage_notify() at ust-thread.c:63)
>>> DEBUG1 [23710/23820]: Health check ready (in thread_manage_health() at
>>> main.c:3574)
>>> DEBUG1 [23710/23827]: [thread] Thread manage kernel started (in
>>> thread_manage_kernel() at main.c:794)
>>> DEBUG1 [23710/23827]: Updating kernel poll set (in update_kernel_poll()
>>> at
>>> main.c:654)
>>> DEBUG1 [23710/23827]: Thread kernel polling on 2 fds (in
>>> thread_manage_kernel() at main.c:839)
>>> DEBUG1 [23710/23822]: Woken up but nothing in the UST command queue (in
>>> thread_dispatch_ust_registration() at main.c:1566)
>>> DEBUG2 [23710/23826]: IP address resolved to 127.0.0.1 (in
>>> set_ip_address()
>>> at uri.c:132)
>>> DEBUG3 [23710/23826]: URI dtype: 1, proto: 1, host: localhost, subdir: ,
>>> ctrl: 0, data: 0 (in uri_parse() at uri.c:505)
>>> PERROR [23710/23826]: bind inet: Address already in use (in
>>> lttcomm_bind_inet_sock() at inet.c:109)
>>> DEBUG1 [23710/23826]: [jul-thread] is cleaning up and stopping. (in
>>> jul_thread_manage_registration() at jul-thread.c:356)
>>> DEBUG3 [23710/23826]: [jul-thread] Cleaning JUL apps ht (in
>>> clean_jul_apps_ht() at jul-thread.c:100)
>>> DEBUG1 [23710/23823]: Got the wait shm fd 26 (in get_wait_shm() at
>>> shm.c:115)
>>> DEBUG1 [23710/23823]: Futex wait update active 1 (in futex_wait_update()
>>> at
>>> futex.c:63)
>>> DEBUG1 [23710/23823]: Accepting application registration (in
>>> thread_registration_apps() at main.c:1803)
>>>
>>> another terminal:
>>>
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>> lttng_probe_writeback    22927  0
>>> lttng_probe_workqueue    13726  0
>>> lttng_probe_vmscan     17138  0
>>> ....
>>>
>>> but:
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lttng list -k
>>> Error: Unable to list kernel events: Tracing the kernel requires a root
>>> lttng-sessiond daemon, as well as "tracing" group membership or root user
>>> ID
>>> for the lttng client.
>>> Error: Command error
>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>
>>> then stop the command sudo lttng-sessiond -vvv with "STRG+C"
>>> ^CDEBUG1 [23710/23710]: SIGINT caught (in sighandler() at main.c:4374)
>>> DEBUG1 [23710/23710]: Terminating all threads (in stop_threads() at
>>> main.c:370)
>>> DEBUG1 [23710/23710]: Futex n to 1 wake done (in futex_nto1_wake() at
>>> futex.c:104)
>>> DEBUG1 [23710/23821]: Clean command context structure (in
>>> clean_command_ctx() at main.c:573)
>>> ...
>>>
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>
>> Everything looks fine to me.
>>
>> The modules are loaded and unloaded automatically by the session
>> daemon when it is launched and stopped, respectively.
>>
>> If you want to trace the kernel or list the kernel events, you will
>> have to launch a root session daemon (sudo lttng-sessiond -d) and then
>> create a tracing session either as root or as a member of the
>> "tracing" group.
>>
>> Regards,
>> Jérémie
>>
>>> Regards,
>>> Klaus
>>>
>>>
>>>
>>>
>>>> This should load the modules or at least log an error if it fails to do
>>>> so.
>>>>
>>>>> Thanks for your help!
>>>>>
>>>>> Regards,
>>>>> Klaus
>>>>>
>>>>>> Regards,
>>>>>> Jérémie
>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>>>>>>>
>>>>>>>
>>>>>>> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>>>>>>>
>>>>>>> Hi,
>>>>>>> I want to write a driver with trace events.
>>>>>>> In the first step i compile the example  trace-events-sample.c with
>>>>>>> the
>>>>>>> makefile:
>>>>>>>
>>>>>>> ifneq ($(KERNELRELEASE),)
>>>>>>>        obj-m  := modul_trace-events-sample.o
>>>>>>>        modul_trace-events-sample-y := trace-events-sample.o
>>>>>>>        ccflags-y := -I$(src)
>>>>>>> else
>>>>>>>        KDIR ?= /lib/modules/`uname -r`/build
>>>>>>> default:
>>>>>>>        $(MAKE) -C $(KDIR) M=$$PWD
>>>>>>> endif
>>>>>>>
>>>>>>> now i get the modul_trace-events-sample.ko File.
>>>>>>> now:
>>>>>>> insmod modul_trace-events-sample.ko
>>>>>>> lttng create
>>>>>>> lttng enable-event -k -a
>>>>>>> lttng start
>>>>>>> ...wait...
>>>>>>> lttng stop
>>>>>>> lttng destroy
>>>>>>>
>>>>>>> now i look the result in the eclise viewer, but i found event
>>>>>>> "trace_foo_bar" not in the session!
>>>>>>> what am I doing wrong?
>>>>>>>
>>>>>>> I use ubuntu 13.04 in a vmware
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> now i found a answer:
>>>>>>> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
>>>>>>> now i download the lttng-module and compiled it.
>>>>>>>
>>>>>>> $ git clone git://git.lttng.org/lttng-modules.git
>>>>>>> $ cd lttng-tools
>>>>>>> $ make
>>>>>>> $ sudo make modules_install
>>>>>>> here I get error
>>>>>>> INSTALL
>>>>>>> /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>>>> Can't read private key
>>>>>>> ...
>>>>>>> what does that mean?
>>>>>>> what should I do?
>>>>>>>
>>>>>>> please help me!
>>>>>>>
>>>>>>> another question:
>>>>>>> when i create a trace events in module_a,
>>>>>>> can i use it in module_b?
>>>>>>> if yes, what should I do?
>>>>>>>
>>>>>>> thanks Klaus
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> lttng-dev mailing list
>>>>>>> lttng-dev@lists.lttng.org
>>>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> lttng-dev mailing list
>>>>>>> lttng-dev@lists.lttng.org
>>>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>>>
>>>>
>>
>>
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]               ` <528F9561.3030802@gmx.de>
  2013-11-22 18:41                 ` Jérémie Galarneau
@ 2013-11-22 19:06                 ` Jérémie Galarneau
  2013-11-22 19:07                 ` Francis Giraldeau
  2 siblings, 0 replies; 17+ messages in thread
From: Jérémie Galarneau @ 2013-11-22 19:06 UTC (permalink / raw)
  To: Klaus Dannecker; +Cc: lttng-dev

On Fri, Nov 22, 2013 at 12:33 PM, Klaus Dannecker
<klaus.dannecker@gmx.de> wrote:
> Hi.
>
> Thank's Jérémie!
>
> my account type is Administrator.
> sudo lttng list -k works good!
> how can I define a "tracing"group , so I no longer need the sudo command?
>
> another problem:
> i have add mycustomevents in the lttng_module like
> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
> but after
>
> $ make
> $ sudo make modules_install
> $ sudo depmod -a
>  and
> $ sudo lttng list -k
> my lttng-probe-mycustomevents.ko is now in
> /lib/modules/3.11.0-12-generic/extra/probes
> but i can't find my new event in the list!

This thread may help you out for this point.

http://lists.lttng.org/pipermail/lttng-dev/2013-October/021543.html

>
> Regards,
> Klaus
>
>
> Am 22.11.2013 17:12, schrieb Jérémie Galarneau:
>
>> On Fri, Nov 22, 2013 at 5:54 AM, Klaus Dannecker <klaus.dannecker@gmx.de>
>> wrote:
>>>
>>> Am 21.11.2013 18:41, schrieb Jérémie Galarneau:
>>>
>>>> On Thu, Nov 21, 2013 at 11:42 AM, Klaus Dannecker
>>>> <klaus.dannecker@gmx.de> wrote:
>>>>>
>>>>> Am 21.11.2013 16:49, schrieb Jérémie Galarneau:
>>>>>
>>>>>> On Thu, Nov 21, 2013 at 4:48 AM, Klaus Dannecker
>>>>>> <klaus.dannecker@gmx.de>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Nobody can help me?
>>>>>>>
>>>>>>> now i have ubuntu 13.10 installed  in a vmware.
>>>>>>> but i have the same error!
>>>>>>>
>>>>>>> s$ sudo make modules_install
>>>>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>>>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>>>>>> make[1]: Entering directory
>>>>>>> `/usr/src/linux-headers-3.11.0-12-generic'
>>>>>>>      INSTALL
>>>>>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>>>>
>>>>>>> Can't read private key
>>>>>>
>>>>>> Ubuntu now ships with module signing enabled by default.
>>>>>> Does the installation fail, or is it just a warning?
>>>>>
>>>>> i don't know
>>>>>
>>>>>>> ....
>>>>>>> lsmod | grep lttng
>>>>>>> -> no module found
>>>>>>>
>>>>>> The modules will not be automatically loaded after being built and
>>>>>> installed. You have to launch lttng-sessiond (as root) for that. What
>>>>>> is the output of the following commands?
>>>>>>
>>>>>> make
>>>>>> sudo make modules_install
>>>>>> sudo depmod -a
>>>>>> sudo lttng-sessiond &
>>>>>> lsmod | grep lttng
>>>>>
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ make
>>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>>> M=/home/klaus/lttng_src/lttng-modules modules
>>>>>
>>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:30: File
>>>>> /usr/src/linux-headers-3.11.0-12-generic/virt/kvm/iodev.h not found.
>>>>> Probe
>>>>> "kvm" x86-specific is disabled. Use full kernel source tree to enable
>>>>> it.
>>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:81: Files
>>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext3/*.h not found. Probe
>>>>> "ext3"
>>>>> is disabled. Use full kernel source tree to enable it.
>>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:142: Files
>>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/btrfs/*.h not found. Probe
>>>>> "btrfs" is disabled. Use full kernel source tree to enable it.
>>>>> /home/klaus/lttng_src/lttng-modules/probes/Makefile:158: Files
>>>>> /usr/src/linux-headers-3.11.0-12-generic/fs/ext4/*.h not found. Probe
>>>>> "ext4"
>>>>> is disabled. Use full kernel source tree to enable it.
>>>>>     Building modules, stage 2.
>>>>>     MODPOST 44 modules
>>>>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>>
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo make modules_install
>>>>>
>>>>> make -C /lib/modules/3.11.0-12-generic/build
>>>>> M=/home/klaus/lttng_src/lttng-modules modules_install
>>>>> make[1]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>>     INSTALL
>>>>> /home/klaus/lttng_src/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>> Can't read private key
>>>>>     INSTALL
>>>>> /home/klaus/lttng_src/lttng-modules/lttng-ring-buffer-client-discard.ko
>>>>>
>>>>> Can't read private key
>>>>> ...
>>>>>     DEPMOD  3.11.0-12-generic
>>>>> make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>>>
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo depmod -a
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ sudo lttng-sessiond &
>>>>> [1] 23486
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>>>>
>>>>> [1]+  Stopped                 sudo lttng-sessiond
>>>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>>>
>>>> Hard to say why lttng-sessiond received SIGSTOP...
>>>>
>>>> Could you try running the session daemon in verbose mode in another
>>>> terminal?
>>>> sudo lttng-sessiond -vvv
>>>
>>> klaus@ubuntu:~$ sudo lttng-sessiond -vvv
>>> [sudo] password for klaus:
>>> DEBUG3 [23710/23710]: Creating LTTng run directory: /var/run/lttng (in
>>> create_lttng_rundir() at main.c:4267)
>>> DEBUG2 [23710/23710]: Kernel consumer err path:
>>> /var/run/lttng/kconsumerd/error (in main() at main.c:4696)
>>> DEBUG2 [23710/23710]: Kernel consumer cmd path:
>>> /var/run/lttng/kconsumerd/command (in main() at main.c:4698)
>>> DEBUG1 [23710/23710]: Client socket path
>>> /var/run/lttng/client-lttng-sessiond (in main() at main.c:4751)
>>> DEBUG1 [23710/23710]: Application socket path
>>> /var/run/lttng/lttng-ust-sock-5 (in main() at main.c:4752)
>>> DEBUG1 [23710/23710]: Application wait path /lttng-ust-wait-5 (in main()
>>> at
>>> main.c:4753)
>>> DEBUG1 [23710/23710]: LTTng run directory path: /var/run/lttng (in main()
>>> at
>>> main.c:4754)
>>> DEBUG2 [23710/23710]: UST consumer 32 bits err path:
>>> /var/run/lttng/ustconsumerd32/error (in main() at main.c:4763)
>>> DEBUG2 [23710/23710]: UST consumer 32 bits cmd path:
>>> /var/run/lttng/ustconsumerd32/command (in main() at main.c:4765)
>>> DEBUG2 [23710/23710]: UST consumer 64 bits err path:
>>> /var/run/lttng/ustconsumerd64/error (in main() at main.c:4774)
>>> DEBUG2 [23710/23710]: UST consumer 64 bits cmd path:
>>> /var/run/lttng/ustconsumerd64/command (in main() at main.c:4776)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c080 of type 1 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c270 of type 1 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c498 of type 1 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982c6c0 of type 1 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG2 [23710/23710]: Creating consumer directory:
>>> /var/run/lttng/kconsumerd
>>> (in set_consumer_sockets() at main.c:4309)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-tracer (in
>>> modprobe_lttng_control() at modprobe.c:192)
>>> DEBUG2 [23710/23710]: Kernel tracer version validated (major version 2)
>>> (in
>>> kernel_validate_version() at kernel.c:700)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-ftrace (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-kprobes (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-kretprobes (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-lib-ring-buffer (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-client-discard
>>> (in modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-client-overwrite (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-metadata-client (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-client-mmap-discard (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-client-mmap-overwrite (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully
>>> lttng-ring-buffer-metadata-mmap-client (in modprobe_lttng_data() at
>>> modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-types (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-asoc (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-block (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-btrfs (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-compaction (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext3 (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-ext4 (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-gpio (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-irq (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-jbd2 (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kmem (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86 (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-kvm-x86-mmu (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-lock (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-module (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-napi (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-net (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-power (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-printk (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-random (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rcu (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regmap (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-regulator (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-rpm (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sched (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-scsi (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-signal (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-skb (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sock (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-statedump (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-sunrpc (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-timer (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-udp (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-vmscan (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-workqueue (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Modprobe successfully lttng-probe-writeback (in
>>> modprobe_lttng_data() at modprobe.c:228)
>>> DEBUG1 [23710/23710]: Kernel tracer fd 6 (in init_kernel_tracer() at
>>> main.c:2364)
>>> DEBUG2 [23710/23710]: Creating consumer directory:
>>> /var/run/lttng/ustconsumerd64 (in set_consumer_sockets() at main.c:4309)
>>> DEBUG2 [23710/23710]: Creating consumer directory:
>>> /var/run/lttng/ustconsumerd32 (in set_consumer_sockets() at main.c:4309)
>>> DEBUG3 [23710/23710]: Session daemon client socket 9 and application
>>> socket
>>> 10 created (in init_daemon_socket() at main.c:4175)
>>> DEBUG1 [23710/23710]: All permissions are set (in set_permissions() at
>>> main.c:4255)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e160 of type 2 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Global buffer per UID registry initialized (in
>>> buffer_reg_init_uid_registry() at buffer-registry.c:99)
>>> DEBUG3 [23710/23710]: Created hashtable size 4 at 0x982e388 of type 2 (in
>>> lttng_ht_new() at hashtable.c:127)
>>> DEBUG3 [23710/23710]: Global buffer per PID registry initialized (in
>>> buffer_reg_init_pid_registry() at buffer-registry.c:220)
>>> DEBUG1 [23710/23710]: epoll set max size is 327338 (in
>>> compat_epoll_set_max_size() at compat-epoll.c:280)
>>> DEBUG1 [23710/23710]: Command subsystem initialized (in cmd_init() at
>>> cmd.c:3056)
>>> DEBUG1 [23710/23710]: Pid 23710 written in file
>>> /var/run/lttng/lttng-sessiond.pid (in utils_create_pid_file() at
>>> utils.c:437)
>>> DEBUG1 [23710/23710]: Pid 5345 written in file /var/run/lttng/jul.port
>>> (in
>>> utils_create_pid_file() at utils.c:437)
>>> DEBUG1 [23710/23710]: TCP inet operation timeout set to 216 sec (in
>>> lttcomm_inet_init() at inet.c:529)
>>> DEBUG1 [23710/23710]: Health check time delta in seconds set to 236 (in
>>> health_init() at health.c:73)
>>> DEBUG1 [23710/23820]: [thread] Manage health check started (in
>>> thread_manage_health() at main.c:3511)
>>> DEBUG1 [23710/23824]: [thread] Manage application started (in
>>> thread_manage_apps() at main.c:1256)
>>> DEBUG1 [23710/23823]: [thread] Manage application registration started
>>> (in
>>> thread_registration_apps() at main.c:1766)
>>> DEBUG1 [23710/23822]: [thread] Dispatch UST command started (in
>>> thread_dispatch_ust_registration() at main.c:1543)
>>> DEBUG1 [23710/23821]: [thread] Manage client started (in
>>> thread_manage_clients() at main.c:3695)
>>> DEBUG1 [23710/23821]: Accepting client command ... (in
>>> thread_manage_clients() at main.c:3747)
>>> DEBUG1 [23710/23819]: [ht-thread] startup. (in thread_ht_cleanup() at
>>> ht-cleanup.c:35)
>>> DEBUG3 [23710/23819]: [ht-thread] Polling on 2 fds. (in
>>> thread_ht_cleanup()
>>> at ht-cleanup.c:59)
>>> DEBUG1 [23710/23825]: [ust-thread] Manage application notify command (in
>>> ust_thread_manage_notify() at ust-thread.c:38)
>>> DEBUG1 [23710/23826]: [jul-thread] Manage JUL application registration.
>>> (in
>>> jul_thread_manage_registration() at jul-thread.c:250)
>>> DEBUG3 [23710/23826]: URI string: tcp://localhost (in uri_parse() at
>>> uri.c:291)
>>> DEBUG1 [23710/23824]: Apps thread polling on 2 fds (in
>>> thread_manage_apps()
>>> at main.c:1286)
>>> DEBUG1 [23710/23822]: Futex n to 1 prepare done (in futex_nto1_prepare()
>>> at
>>> futex.c:75)
>>> DEBUG1 [23710/23823]: Notifying applications of session daemon state: 1
>>> (in
>>> notify_ust_apps() at main.c:593)
>>> DEBUG3 [23710/23825]: [ust-thread] Manage notify polling on 2 fds (in
>>> ust_thread_manage_notify() at ust-thread.c:63)
>>> DEBUG1 [23710/23820]: Health check ready (in thread_manage_health() at
>>> main.c:3574)
>>> DEBUG1 [23710/23827]: [thread] Thread manage kernel started (in
>>> thread_manage_kernel() at main.c:794)
>>> DEBUG1 [23710/23827]: Updating kernel poll set (in update_kernel_poll()
>>> at
>>> main.c:654)
>>> DEBUG1 [23710/23827]: Thread kernel polling on 2 fds (in
>>> thread_manage_kernel() at main.c:839)
>>> DEBUG1 [23710/23822]: Woken up but nothing in the UST command queue (in
>>> thread_dispatch_ust_registration() at main.c:1566)
>>> DEBUG2 [23710/23826]: IP address resolved to 127.0.0.1 (in
>>> set_ip_address()
>>> at uri.c:132)
>>> DEBUG3 [23710/23826]: URI dtype: 1, proto: 1, host: localhost, subdir: ,
>>> ctrl: 0, data: 0 (in uri_parse() at uri.c:505)
>>> PERROR [23710/23826]: bind inet: Address already in use (in
>>> lttcomm_bind_inet_sock() at inet.c:109)
>>> DEBUG1 [23710/23826]: [jul-thread] is cleaning up and stopping. (in
>>> jul_thread_manage_registration() at jul-thread.c:356)
>>> DEBUG3 [23710/23826]: [jul-thread] Cleaning JUL apps ht (in
>>> clean_jul_apps_ht() at jul-thread.c:100)
>>> DEBUG1 [23710/23823]: Got the wait shm fd 26 (in get_wait_shm() at
>>> shm.c:115)
>>> DEBUG1 [23710/23823]: Futex wait update active 1 (in futex_wait_update()
>>> at
>>> futex.c:63)
>>> DEBUG1 [23710/23823]: Accepting application registration (in
>>> thread_registration_apps() at main.c:1803)
>>>
>>> another terminal:
>>>
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>> lttng_probe_writeback    22927  0
>>> lttng_probe_workqueue    13726  0
>>> lttng_probe_vmscan     17138  0
>>> ....
>>>
>>> but:
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lttng list -k
>>> Error: Unable to list kernel events: Tracing the kernel requires a root
>>> lttng-sessiond daemon, as well as "tracing" group membership or root user
>>> ID
>>> for the lttng client.
>>> Error: Command error
>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>
>>> then stop the command sudo lttng-sessiond -vvv with "STRG+C"
>>> ^CDEBUG1 [23710/23710]: SIGINT caught (in sighandler() at main.c:4374)
>>> DEBUG1 [23710/23710]: Terminating all threads (in stop_threads() at
>>> main.c:370)
>>> DEBUG1 [23710/23710]: Futex n to 1 wake done (in futex_nto1_wake() at
>>> futex.c:104)
>>> DEBUG1 [23710/23821]: Clean command context structure (in
>>> clean_command_ctx() at main.c:573)
>>> ...
>>>
>>> klaus@ubuntu:~/lttng_src/lttng-modules$ lsmod | grep lttng
>>> klaus@ubuntu:~/lttng_src/lttng-modules$
>>>
>> Everything looks fine to me.
>>
>> The modules are loaded and unloaded automatically by the session
>> daemon when it is launched and stopped, respectively.
>>
>> If you want to trace the kernel or list the kernel events, you will
>> have to launch a root session daemon (sudo lttng-sessiond -d) and then
>> create a tracing session either as root or as a member of the
>> "tracing" group.
>>
>> Regards,
>> Jérémie
>>
>>> Regards,
>>> Klaus
>>>
>>>
>>>
>>>
>>>> This should load the modules or at least log an error if it fails to do
>>>> so.
>>>>
>>>>> Thanks for your help!
>>>>>
>>>>> Regards,
>>>>> Klaus
>>>>>
>>>>>> Regards,
>>>>>> Jérémie
>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> Am 13.11.2013 18:37, schrieb Klaus Dannecker:
>>>>>>>
>>>>>>>
>>>>>>> Am 09.11.2013 09:33, schrieb Klaus Dannecker:
>>>>>>>
>>>>>>> Hi,
>>>>>>> I want to write a driver with trace events.
>>>>>>> In the first step i compile the example  trace-events-sample.c with
>>>>>>> the
>>>>>>> makefile:
>>>>>>>
>>>>>>> ifneq ($(KERNELRELEASE),)
>>>>>>>        obj-m  := modul_trace-events-sample.o
>>>>>>>        modul_trace-events-sample-y := trace-events-sample.o
>>>>>>>        ccflags-y := -I$(src)
>>>>>>> else
>>>>>>>        KDIR ?= /lib/modules/`uname -r`/build
>>>>>>> default:
>>>>>>>        $(MAKE) -C $(KDIR) M=$$PWD
>>>>>>> endif
>>>>>>>
>>>>>>> now i get the modul_trace-events-sample.ko File.
>>>>>>> now:
>>>>>>> insmod modul_trace-events-sample.ko
>>>>>>> lttng create
>>>>>>> lttng enable-event -k -a
>>>>>>> lttng start
>>>>>>> ...wait...
>>>>>>> lttng stop
>>>>>>> lttng destroy
>>>>>>>
>>>>>>> now i look the result in the eclise viewer, but i found event
>>>>>>> "trace_foo_bar" not in the session!
>>>>>>> what am I doing wrong?
>>>>>>>
>>>>>>> I use ubuntu 13.04 in a vmware
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> now i found a answer:
>>>>>>> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
>>>>>>> now i download the lttng-module and compiled it.
>>>>>>>
>>>>>>> $ git clone git://git.lttng.org/lttng-modules.git
>>>>>>> $ cd lttng-tools
>>>>>>> $ make
>>>>>>> $ sudo make modules_install
>>>>>>> here I get error
>>>>>>> INSTALL
>>>>>>> /mnt/hgfs/shared_Folder/lttng-modules/lib/lttng-lib-ring-buffer.ko
>>>>>>> Can't read private key
>>>>>>> ...
>>>>>>> what does that mean?
>>>>>>> what should I do?
>>>>>>>
>>>>>>> please help me!
>>>>>>>
>>>>>>> another question:
>>>>>>> when i create a trace events in module_a,
>>>>>>> can i use it in module_b?
>>>>>>> if yes, what should I do?
>>>>>>>
>>>>>>> thanks Klaus
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> lttng-dev mailing list
>>>>>>> lttng-dev@lists.lttng.org
>>>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> lttng-dev mailing list
>>>>>>> lttng-dev@lists.lttng.org
>>>>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>>>>>
>>>>
>>
>>
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]               ` <528F9561.3030802@gmx.de>
  2013-11-22 18:41                 ` Jérémie Galarneau
  2013-11-22 19:06                 ` Jérémie Galarneau
@ 2013-11-22 19:07                 ` Francis Giraldeau
  2 siblings, 0 replies; 17+ messages in thread
From: Francis Giraldeau @ 2013-11-22 19:07 UTC (permalink / raw)
  To: Klaus Dannecker, lttng-dev

Le 2013-11-22 12:33, Klaus Dannecker a écrit :
> Hi.
> 
> Thank's Jérémie!
> 
> my account type is Administrator.
> sudo lttng list -k works good!
> how can I define a "tracing"group , so I no longer need the sudo command?
> 
> another problem:
> i have add mycustomevents in the lttng_module like
> http://lists.lttng.org/pipermail/lttng-dev/2013-October/021540.html
> but after
> $ make
> $ sudo make modules_install
> $ sudo depmod -a
>  and
> $ sudo lttng list -k
> my lttng-probe-mycustomevents.ko is now in
> /lib/modules/3.11.0-12-generic/extra/probes
> but i can't find my new event in the list!

On Ubuntu since kernel 3.8, modules are signed, and while unsigned
modules are loaded, if they contains tracepoints, they won't be
registered and won't be listed.

To avoid this inconvenience, a certificate x.509 must be generated and
modules signed with it, and the additional signing key must be loaded.
This process is not documented, but you can find the integration of this
process into the makefiles in lttng-modules addons.

https://github.com/giraldeau/lttng-modules/tree/addons

The module lttng-modsign is generated (look at the base makefile and
their code) and if they are loaded before your own module, tracepoints
tracepoints inside it should be registered correctly.

BTW, if you want, you can put your code directly under addons and start
your own tracepoints right away.

Cheers,

Francis

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found]   ` <CA+jJMxssu064JygayJ6KvcMb2AwbPsV5RHugtpO5ZZ9UsvcqOw@mail.gmail.com>
@ 2013-11-24 18:26     ` Klaus Dannecker
  0 siblings, 0 replies; 17+ messages in thread
From: Klaus Dannecker @ 2013-11-24 18:26 UTC (permalink / raw)
  To: Jérémie Galarneau; +Cc: lttng-dev, Thibault, Daniel


Am 24.11.2013 17:01, schrieb Jérémie Galarneau:
> On Sun, Nov 24, 2013 at 6:43 AM, Klaus Dannecker <klaus.dannecker@gmx.de> wrote:
>> Am 22.11.2013 19:54, schrieb Thibault, Daniel:
>>
>>>> how can I define a "tracing"group , so I no longer need the sudo command?
>>> $ sudo addgroup --system tracing
>>> $ sudo adduser username tracing
>>>
>>> You must log off and back on for group membership to be activated.
>>>
>>> You may also want to add lttng-sessiond as a service:
>>>
>>> $ sudo ln --symbolic /lib/init/upstart-job /etc/init.d/lttng-sessiond
>>>
>>> And create /etc/init/lttng-sessiond.conf containing:
>>>
>>> description "LTTng central tracing registry session daemon"
>>> author "Stéphane Graber <stgraber@ubuntu.com>"
>>> start on local-filesystems
>>> stop on runlevel [06]
>>> respawn
>>> exec lttng-sessiond
>>>
>>> You can then start the session daemon with 'sudo service lttng-sessiond
>>> start' (stop it with 'stop', restart with 'restart').
>> Thanks, now it works
>> but when i
>> $ lttng create
>> $ lttng enable-event -k -a
>> $ lttng start
>> so, the function does not return!
>> only 'strg c' terminated the fuktion.
>>
> Interesting. Would you mind running "lttng start" in verbose mode and
> provide the output?
> lttng -vvv start
klaus@ubuntu:~$ sudo lttng -vvv start
DEBUG2 [2854/2854]: Config file path found: /home/klaus (in 
get_session_name() at utils.c:57)
DEBUG1 [2854/2854]: Session name found: auto-20131124-091639 (in 
get_session_name() at utils.c:58)
DEBUG1 [2854/2854]: Starting tracing for session auto-20131124-091639 
(in start_tracing() at commands/start.c:81)
DEBUG1 [2854/2854]: LSM cmd type : 16 (in send_session_msg() at 
lttng-ctl.c:131)
'ctrl c'
klaus@ubuntu:~$

>> the same by
>> $ lttng stop
>> and
>> $ lttng destroy
>>
>> but
>> $ lttng create
>> $ lttng enable-event -u -a
>> $ lttng start
>> $ lttng stop
>> $ lttng destroy
>> -> works
>>
>> how can i remove all installed lttng_modules,
>> so that I can start again from the beginning?
>>
> lttng-modules does not define an "uninstall" make target. I guess
> you'll have to delete the modules manually under
> /lib/modules/$(uname -r)/extra
> /lib/modules/$(uname -r)/extra/lib
> /lib/modules/$(uname -r)/extra/probes
>
> I'm wondering if it could be a conflict with your distribution's
> lttng-modules-dkms package... Could you verify that it is not
> installed?
now i make two experiments:
first:
install ubuntu 12.04 in vmware
$ git clone git://git.lttng.org/lttng-tools.git
$ git clone git://git.lttng.org/lttng-modules.git
$ git clone git://git.lttng.org/lttng-ust.git
$ git clone git://git.lttng.org/userspace-rcu.git
compile and install all like:
https://www.ibm.com/developerworks/community/blogs/fe313521-2e95-46f2-817d-44a4f27eba32/entry/howto_tracing_with_lttng?lang=en
now i have the same problem.

second:
install ubuntu 12.04 in vmware
sudo apt-get install lttng-tools
...
Building only for 3.8.0-29-generic
Building initial module for 3.8.0-29-generic
Error! Bad return status for module build on kernel: 3.8.0-29-generic (i686)
Consult /var/lib/dkms/lttng-modules/2.0.2/build/make.log for more 
information.
Setting up lttng-tools (2.0.1-0ubuntu1) ...
/usr/sbin/addgroup
lttng-sessiond start/running, process 5515
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
klaus@ubuntu:~$

$ git clone git://git.lttng.org/lttng-modules.git
compile and install lttng_moules

now works lttng start, stop and destroy!

Klaus
>> Thanks
>> Klaus
>> sorry, i am a linux beginner
> No problem, we all were at some point :)
>
> Jérémie
>
>>
>>> Daniel U. Thibault
>>> Protection des systèmes et contremesures (PSC) | Systems Protection &
>>> Countermeasures (SPC)
>>> Cyber sécurité pour les missions essentielles (CME) | Mission Critical
>>> Cyber Security (MCCS)
>>> R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D
>>> Canada - Valcartier (DRDC Valcartier)
>>> 2459 route de la Bravoure
>>> Québec QC  G3J 1X5
>>> CANADA
>>> Vox : (418) 844-4000 x4245
>>> Fax : (418) 844-4538
>>> NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
>>> Gouvernement du Canada | Government of Canada
>>> <http://www.valcartier.drdc-rddc.gc.ca/>
>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found] ` <5291E675.8070908@gmx.de>
@ 2013-11-24 16:01   ` Jérémie Galarneau
       [not found]   ` <CA+jJMxssu064JygayJ6KvcMb2AwbPsV5RHugtpO5ZZ9UsvcqOw@mail.gmail.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Jérémie Galarneau @ 2013-11-24 16:01 UTC (permalink / raw)
  To: Klaus Dannecker; +Cc: lttng-dev, Thibault, Daniel

On Sun, Nov 24, 2013 at 6:43 AM, Klaus Dannecker <klaus.dannecker@gmx.de> wrote:
>
> Am 22.11.2013 19:54, schrieb Thibault, Daniel:
>
>>> how can I define a "tracing"group , so I no longer need the sudo command?
>>
>> $ sudo addgroup --system tracing
>> $ sudo adduser username tracing
>>
>> You must log off and back on for group membership to be activated.
>>
>> You may also want to add lttng-sessiond as a service:
>>
>> $ sudo ln --symbolic /lib/init/upstart-job /etc/init.d/lttng-sessiond
>>
>> And create /etc/init/lttng-sessiond.conf containing:
>>
>> description "LTTng central tracing registry session daemon"
>> author "Stéphane Graber <stgraber@ubuntu.com>"
>> start on local-filesystems
>> stop on runlevel [06]
>> respawn
>> exec lttng-sessiond
>>
>> You can then start the session daemon with 'sudo service lttng-sessiond
>> start' (stop it with 'stop', restart with 'restart').
>
> Thanks, now it works
> but when i
> $ lttng create
> $ lttng enable-event -k -a
> $ lttng start
> so, the function does not return!
> only 'strg c' terminated the fuktion.
>

Interesting. Would you mind running "lttng start" in verbose mode and
provide the output?
lttng -vvv start

> the same by
> $ lttng stop
> and
> $ lttng destroy
>
> but
> $ lttng create
> $ lttng enable-event -u -a
> $ lttng start
> $ lttng stop
> $ lttng destroy
> -> works
>
> how can i remove all installed lttng_modules,
> so that I can start again from the beginning?
>

lttng-modules does not define an "uninstall" make target. I guess
you'll have to delete the modules manually under
/lib/modules/$(uname -r)/extra
/lib/modules/$(uname -r)/extra/lib
/lib/modules/$(uname -r)/extra/probes

I'm wondering if it could be a conflict with your distribution's
lttng-modules-dkms package... Could you verify that it is not
installed?

> Thanks
> Klaus
> sorry, i am a linux beginner

No problem, we all were at some point :)

Jérémie

>
>
>> Daniel U. Thibault
>> Protection des systèmes et contremesures (PSC) | Systems Protection &
>> Countermeasures (SPC)
>> Cyber sécurité pour les missions essentielles (CME) | Mission Critical
>> Cyber Security (MCCS)
>> R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D
>> Canada - Valcartier (DRDC Valcartier)
>> 2459 route de la Bravoure
>> Québec QC  G3J 1X5
>> CANADA
>> Vox : (418) 844-4000 x4245
>> Fax : (418) 844-4538
>> NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
>> Gouvernement du Canada | Government of Canada
>> <http://www.valcartier.drdc-rddc.gc.ca/>
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found] <48CF5AC71E61DB46B70D0F388054EFFD267A5932@VAL-E-01.valcartier.drdc-rddc.gc.ca>
  2013-11-22 19:01 ` Jérémie Galarneau
@ 2013-11-24 11:43 ` Klaus Dannecker
       [not found] ` <5291E675.8070908@gmx.de>
  2 siblings, 0 replies; 17+ messages in thread
From: Klaus Dannecker @ 2013-11-24 11:43 UTC (permalink / raw)
  To: Thibault, Daniel, lttng-dev


Am 22.11.2013 19:54, schrieb Thibault, Daniel:
>> how can I define a "tracing"group , so I no longer need the sudo command?
> $ sudo addgroup --system tracing
> $ sudo adduser username tracing
>
> You must log off and back on for group membership to be activated.
>
> You may also want to add lttng-sessiond as a service:
>
> $ sudo ln --symbolic /lib/init/upstart-job /etc/init.d/lttng-sessiond
>
> And create /etc/init/lttng-sessiond.conf containing:
>
> description "LTTng central tracing registry session daemon"
> author "Stéphane Graber <stgraber@ubuntu.com>"
> start on local-filesystems
> stop on runlevel [06]
> respawn
> exec lttng-sessiond
>
> You can then start the session daemon with 'sudo service lttng-sessiond start' (stop it with 'stop', restart with 'restart').
Thanks, now it works
but when i
$ lttng create
$ lttng enable-event -k -a
$ lttng start
so, the function does not return!
only 'strg c' terminated the fuktion.

the same by
$ lttng stop
and
$ lttng destroy

but
$ lttng create
$ lttng enable-event -u -a
$ lttng start
$ lttng stop
$ lttng destroy
-> works

how can i remove all installed lttng_modules,
so that I can start again from the beginning?

Thanks
Klaus
sorry, i am a linux beginner

> Daniel U. Thibault
> Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
> Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
> R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
> 2459 route de la Bravoure
> Québec QC  G3J 1X5
> CANADA
> Vox : (418) 844-4000 x4245
> Fax : (418) 844-4538
> NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
> Gouvernement du Canada | Government of Canada
> <http://www.valcartier.drdc-rddc.gc.ca/>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
       [not found] <48CF5AC71E61DB46B70D0F388054EFFD267A5932@VAL-E-01.valcartier.drdc-rddc.gc.ca>
@ 2013-11-22 19:01 ` Jérémie Galarneau
  2013-11-24 11:43 ` Klaus Dannecker
       [not found] ` <5291E675.8070908@gmx.de>
  2 siblings, 0 replies; 17+ messages in thread
From: Jérémie Galarneau @ 2013-11-22 19:01 UTC (permalink / raw)
  To: Thibault, Daniel; +Cc: lttng-dev

On Fri, Nov 22, 2013 at 1:54 PM, Thibault, Daniel
<Daniel.Thibault@drdc-rddc.gc.ca> wrote:
>> how can I define a "tracing"group , so I no longer need the sudo command?
>
> $ sudo addgroup --system tracing
> $ sudo adduser username tracing
>

Thanks for providing the info Daniel, I read the original question
completely wrong!

> You must log off and back on for group membership to be activated.
>
> You may also want to add lttng-sessiond as a service:
>
> $ sudo ln --symbolic /lib/init/upstart-job /etc/init.d/lttng-sessiond
>
> And create /etc/init/lttng-sessiond.conf containing:
>
> description "LTTng central tracing registry session daemon"
> author "Stéphane Graber <stgraber@ubuntu.com>"
> start on local-filesystems
> stop on runlevel [06]
> respawn
> exec lttng-sessiond
>
> You can then start the session daemon with 'sudo service lttng-sessiond start' (stop it with 'stop', restart with 'restart').
>
> Daniel U. Thibault
> Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
> Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
> R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
> 2459 route de la Bravoure
> Québec QC  G3J 1X5
> CANADA
> Vox : (418) 844-4000 x4245
> Fax : (418) 844-4538
> NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
> Gouvernement du Canada | Government of Canada
> <http://www.valcartier.drdc-rddc.gc.ca/>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: make a trace_event in a modul (driver)
@ 2013-11-22 18:54 Thibault, Daniel
  0 siblings, 0 replies; 17+ messages in thread
From: Thibault, Daniel @ 2013-11-22 18:54 UTC (permalink / raw)
  To: lttng-dev

> how can I define a "tracing"group , so I no longer need the sudo command?

$ sudo addgroup --system tracing
$ sudo adduser username tracing

You must log off and back on for group membership to be activated.

You may also want to add lttng-sessiond as a service:

$ sudo ln --symbolic /lib/init/upstart-job /etc/init.d/lttng-sessiond

And create /etc/init/lttng-sessiond.conf containing:

description "LTTng central tracing registry session daemon"
author "Stéphane Graber <stgraber@ubuntu.com>"
start on local-filesystems
stop on runlevel [06]
respawn
exec lttng-sessiond

You can then start the session daemon with 'sudo service lttng-sessiond start' (stop it with 'stop', restart with 'restart').

Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* make a trace_event in a modul (driver)
@ 2013-11-09  8:33 Klaus Dannecker
  0 siblings, 0 replies; 17+ messages in thread
From: Klaus Dannecker @ 2013-11-09  8:33 UTC (permalink / raw)
  To: lttng-dev

Hi,
I want to write a driver with trace events.
In the first step i compile the example  trace-events-sample.c with the 
makefile:

ifneq ($(KERNELRELEASE),)
     obj-m  := modul_trace-events-sample.o
     modul_trace-events-sample-y := trace-events-sample.o
     ccflags-y := -I$(src)
else
     KDIR ?= /lib/modules/`uname -r`/build
default:
     $(MAKE) -C $(KDIR) M=$$PWD
endif

now i get the modul_trace-events-sample.ko File.
now:
insmod modul_trace-events-sample.ko
lttng create
lttng enable-event -k -a
lttng start
...wait...
lttng stop
lttng destroy

now i look the result in the eclise viewer, but i found event 
"trace_foo_bar" not in the session!
what am I doing wrong?

I use ubuntu 13.04 in a vmware

Thanks

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-11-24 18:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <527DF369.4020704@gmx.de>
2013-11-13 17:37 ` make a trace_event in a modul (driver) Klaus Dannecker
     [not found] ` <5283B8BD.9020703@gmx.de>
2013-11-21  9:48   ` Klaus Dannecker
     [not found]   ` <528DD70B.8040504@gmx.de>
2013-11-21 15:49     ` Jérémie Galarneau
     [not found]     ` <CA+jJMxsybZ4mo1Mp369hhgNSCi-pfNh8VG1F5S2H5DpKL5nSsw@mail.gmail.com>
2013-11-21 16:42       ` Klaus Dannecker
     [not found]       ` <528E37D8.3060606@gmx.de>
2013-11-21 17:41         ` Jérémie Galarneau
     [not found]         ` <CA+jJMxt89qdM98hu536heBwk90AQEPwONvpa7s-vqKGQ036euQ@mail.gmail.com>
2013-11-22 10:54           ` Klaus Dannecker
     [not found]           ` <528F37DE.7050204@gmx.de>
2013-11-22 16:12             ` Jérémie Galarneau
     [not found]             ` <CA+jJMxtD7TZ6MEf+URHe=SkOhCVT3aD56BhuQdp48EmJvnsyJg@mail.gmail.com>
2013-11-22 17:33               ` Klaus Dannecker
     [not found]               ` <528F9561.3030802@gmx.de>
2013-11-22 18:41                 ` Jérémie Galarneau
2013-11-22 19:06                 ` Jérémie Galarneau
2013-11-22 19:07                 ` Francis Giraldeau
     [not found] <48CF5AC71E61DB46B70D0F388054EFFD267A5932@VAL-E-01.valcartier.drdc-rddc.gc.ca>
2013-11-22 19:01 ` Jérémie Galarneau
2013-11-24 11:43 ` Klaus Dannecker
     [not found] ` <5291E675.8070908@gmx.de>
2013-11-24 16:01   ` Jérémie Galarneau
     [not found]   ` <CA+jJMxssu064JygayJ6KvcMb2AwbPsV5RHugtpO5ZZ9UsvcqOw@mail.gmail.com>
2013-11-24 18:26     ` Klaus Dannecker
2013-11-22 18:54 Thibault, Daniel
  -- strict thread matches above, loose matches on Subject: below --
2013-11-09  8:33 Klaus Dannecker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.