Kernel module , user process communication - Linux

This is a discussion on Kernel module , user process communication - Linux ; Hi I need to add get statisticsperidically ( each 10 secondes) from a kernel driver. What is the best method to retrieve such statistics? char device , netlink , or other methods Regards...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Kernel module , user process communication

  1. Kernel module , user process communication

    Hi

    I need to add get statisticsperidically ( each 10 secondes) from a
    kernel driver.

    What is the best method to retrieve such statistics?
    char device , netlink , or other methods

    Regards

  2. Re: Kernel module , user process communication

    On Feb 6, 9:14 pm, mbm wrote:
    > Hi
    >
    > I need to add get statisticsperidically ( each 10 secondes) from a
    > kernel driver.
    >
    > What is the best method to retrieve such statistics?
    > char device , netlink , or other methods
    >
    > Regards


    There are a number of ways( assuming that you can change the kernel
    driver).
    - Easiest is to use an IOCTL interface to the kernel driver and poll
    that interface periodically.
    - You can create a node on the /proc tree and then use that from your
    user space apps to get the statistics. But kernel developers
    discourage using of the /proc tree.
    - The recommended way is to use the /sys tree and from my
    understanding it is a bit complex than using /proc

  3. Re: Kernel module , user process communication

    On 6 fév, 23:43, Janaka wrote:
    > On Feb 6, 9:14 pm, mbm wrote:
    >
    > > Hi

    >
    > > I need to add get statisticsperidically ( each 10 secondes) from a
    > > kernel driver.

    >
    > > What is the best method to retrieve such statistics?
    > > char device , netlink , or other methods

    >
    > > Regards

    >
    > There are a number of ways( assuming that you can change the kernel
    > driver).
    > - Easiest is to use an IOCTL interface to the kernel driver and poll
    > that interface periodically.
    > - You can create a node on the /proc tree and then use that from your
    > user space apps to get the statistics. *But kernel developers
    > discourage using of the /proc tree.
    > - The recommended way is to use the /sys tree and from my
    > understanding it is a bit complex than using /proc


    I do not need a polling mecanism, What I need is that kernel module
    notify the user application about statistics periodically
    I think that netlink is suitable for this purpose
    Is there another way to notify user application ?

+ Reply to Thread