resource utilisation of one function of kernel code

Posted on 2004-11-05
Last Modified: 2013-12-15

I want to measure resource consumed by "any one function" of linux kernel. Most of the tools/utilities  I see have per process orientation .Is there a tool/ utility in linux red hat kernel 2.4 to do so ?

I do not minnd little bit kernel hacking to achieve the above.

Are there any commercially available products which can do this ?

Question by:perfect_tranquility
    LVL 40

    Accepted Solution

    I don't believe there are any tools out there that will do this. Partly because it is usually only of interest to kernel developers and partly because it would require each of the "kernel functions" to have additional code to support such a tool, which would markedly slow down the kernel.

    If you really want to do this you'll need a good knowedge of the kernel and will have to modify each "function" to collect and report resource usage info. You'll have to be careful when implementing the instumentation to ensure that the act of measuring resource usage doesn't change the resource usage for a given "function".
    LVL 38

    Expert Comment


       You might directly check the on

    LVL 3

    Expert Comment

    Just give a try to kernprof :

    Maybe compiling the kernel with -pg and using a tool like gprof could work as well.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
    Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now