Re: printk does not seem to work when called from schedule()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<quote sender="Hareesh Nagarajan">
> The purpose of my additions is to find out the number of cycles spent by
> a processor while executing schedule() inside the kernel within every
> second. I start doing this in the 2nd minute and end it at the 5th
> minute, at which point I write out the entire contents of the bucket
> using printk (Level. KERN_EMERG).
> [The bucket is an array having 1440 elements]
> 
> Now my problem is that the message(s) sent to printk does not seem to
> appear in /var/log/messages after the 5th minute.

First, are you very sure that the if statement will be true, and that
your printk will be executed? 

Second, I believe KERN_EMERG prints to your terminal. Perhaps your
syslogd logs those that are of KERN_DEBUG.

Looks interesting. I look forward to what you are working on. Keep me
updated.

> What could be the problem? Is there something incorrect in the way I
> have gone about things?
> 
> I have syslog running as my logger:
> hareesh      1310     1  0 19:59 ?        00:00:00 /usr/sbin/syslogd -m
> 0

-- 
Eugene TEO -  <eugeneteo%null!cc!uic!edu> <http://www.anomalistic.org/>
1024D/14A0DDE5 print D851 4574 E357 469C D308  A01E 7321 A38A 14A0 DDE5
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux