Linux.com

cheesysam

cheesysam

  • Linux.com Member
  • Posts: 4
  • Member Since: 22 May 09
  • Last Logged In: 02 Feb 10

Latest Posts

Posted by
Topic
Post Preview
Posted
  • cheesysam
    RE: Will Printk() output to the standard terminal?
    Just gonna answer my own question in-case anyone else is looking for it. printk() at the default level, outputs to the /var/log/messages file [code]printk("I am at default level");[/code] The printk level can be defined however to the following levels. KERN_EMERG KERN_ALERT KERN_CRIT KERN_ERR KERN_WARNING KERN_NOTICE KERN_INFO KERN_DEBUG [code]printk(KERN_CRIT "I am a critical level printk");[/code] If it's critical or above, it will print in the terminal as well as /var/log/messages
    Link to this post 12 Sep 09

    Just gonna answer my own question in-case anyone else is looking for it.

    printk() at the default level, outputs to the /var/log/messages file

    printk("I am at default level");

    The printk level can be defined however to the following levels.
    KERN_EMERG
    KERN_ALERT
    KERN_CRIT
    KERN_ERR
    KERN_WARNING
    KERN_NOTICE
    KERN_INFO
    KERN_DEBUG

    printk(KERN_CRIT "I am a critical level printk");

    If it's critical or above, it will print in the terminal as well as /var/log/messages

  • cheesysam
    Will Printk() output to the standard terminal?
    I've put some printk()'s in some of the filesystem files of the linux source tree to try and trace what's going on. When I run dmesg, I can see a few of my traces, however they aren't showing as I would have expected when I then call the functions again via the terminal. How can I call some of the system calls and see a modified output?
    Link to this post 07 Sep 09

    I've put some printk()'s in some of the filesystem files of the linux source tree to try and trace what's going on.
    When I run dmesg, I can see a few of my traces, however they aren't showing as I would have expected when I then call the functions again via the terminal.

    How can I call some of the system calls and see a modified output?

  • cheesysam
    RE: Beginning Kernel Hacking
    Hi everyone, I'm overwhelmed by the great responses, thanks! Rubberman - Thanks for your motivation to keep me with VirtualBox. I'm using OS X 10.5 as a host at the moment which is as stable OS as I know. Presumably if that becomes a problem I can just backup the machine image and use it in Virtualbox on a different host? Thanks for the links also. I'll get reading. N.D, Josh, Tim - Gentoo seems like a common suggestion so I'll get that and get it installed. Hi Bradford - Unfortunately I think hiding the file hierarchy will contradict the aims of the project but thanks for the suggestion. I will take a look at the projects you mentioned though :) Ajay - Thanks for the little walkthrough. I have managed to get as far as compiling the kernel in a ubuntu distro but nothing seemed to be different after the edit/recompile/install/reboot process. I will try again with your advice once I get this system set up and stable! My original post came across like i just want to throw in random bits of code and see what happens, not the case! Hopefully it will be a bit more planned than that. As for where I'm focusing attention, I plan to look into doing some VFS modification for the benefit of simplification for the user when browsing directories and such-like. Purely experimental for the project I mentioned. When I get something working as intended I can post back here ;) In the meantime, thanks for the advice. I've got plenty to be getting on with but I'm sure I'll be back here for some more help at some point!
    Link to this post 17 Aug 09

    Hi everyone, I'm overwhelmed by the great responses, thanks!

    Rubberman - Thanks for your motivation to keep me with VirtualBox. I'm using OS X 10.5 as a host at the moment which is as stable OS as I know. Presumably if that becomes a problem I can just backup the machine image and use it in Virtualbox on a different host?
    Thanks for the links also. I'll get reading.

    N.D, Josh, Tim - Gentoo seems like a common suggestion so I'll get that and get it installed.

    Hi Bradford - Unfortunately I think hiding the file hierarchy will contradict the aims of the project but thanks for the suggestion. I will take a look at the projects you mentioned though :)

    Ajay - Thanks for the little walkthrough. I have managed to get as far as compiling the kernel in a ubuntu distro but nothing seemed to be different after the edit/recompile/install/reboot process. I will try again with your advice once I get this system set up and stable!

    My original post came across like i just want to throw in random bits of code and see what happens, not the case! Hopefully it will be a bit more planned than that.

    As for where I'm focusing attention, I plan to look into doing some VFS modification for the benefit of simplification for the user when browsing directories and such-like. Purely experimental for the project I mentioned. When I get something working as intended I can post back here ;)

    In the meantime, thanks for the advice. I've got plenty to be getting on with but I'm sure I'll be back here for some more help at some point!

  • cheesysam
    Beginning Kernel Hacking
    I'm going to be doing some kernel hacking as part of a final year compsci project. What is the best way of starting this, for instance is there some sort of sandbox mode for running the kernel. My current attempts have been with Arch and slackware linux running in a VM but has proven to be a nightmare. Where do I start with this?
    Link to this post 06 Jul 09

    I'm going to be doing some kernel hacking as part of a final year compsci project.

    What is the best way of starting this, for instance is there some sort of sandbox mode for running the kernel. My current attempts have been with Arch and slackware linux running in a VM but has proven to be a nightmare.

    Where do I start with this?

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board