Results 1 to 2 of 2

Thread: Difference between timestamp in dmesg and jiffies inside code

  1. #1
    Join Date
    Jan 2013
    Beans
    25

    Difference between timestamp in dmesg and jiffies inside code

    Dear All,

    What the difference between timestamp which is displayed in dmesg console and the jiffies inside the the kernel module code?

    I want to know the time when the function/variable is called by the system. As far as I know, I can know the time by seeing the timestamp in dmesg console
    but I want to know the time inside the kernel module code. Is it true by using jiffies? Any other methods to know the time when the function/variable is called inside kernel module code?

    and which is the accurate one?


    Thank you for your answers

  2. #2
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,102
    Distro
    Ubuntu Development Release

    Re: Difference between timestamp in dmesg and jiffies inside code

    Your question is pretty advanced, and certainly not an "Absolute Beginners Section" type question.
    The dmseg stuff is time stamped in seconds, while jiffies counts basic time ticks in the kernel.
    The jiffies rate varies but have a look at your config file to know for sure for your system. 250 Hertz is fairly common, or 4 milliseconds per tick. Example of where to look:
    Code:
    doug@s15:~/sguide-1304/lp1159144/serverguide/C$ grep HZ /boot/config-3.2.0-39-generic
    CONFIG_RCU_FAST_NO_HZ=y
    CONFIG_NO_HZ=y
    # CONFIG_HZ_100 is not set
    CONFIG_HZ_250=y
    # CONFIG_HZ_300 is not set
    # CONFIG_HZ_1000 is not set
    CONFIG_HZ=250
    CONFIG_MACHZ_WDT=m
    It sounds as though you have the source code and maybe building your own kernel. Maybe you could use "printk" to add debug entries to kern.log (maybe it writes to dmesg also, I don't know) to help.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •