LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-19-2005, 05:09 PM   #1
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Rep: Reputation: 15
kernal mesages access


how can i know that inside kernal what messages are passing

how can get time in micro seconds

give some detail about jefies and how to access them
 
Old 11-21-2005, 03:20 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Re: kernal mesages access

Quote:
Originally posted by shukla_chanchal
how can i know that inside kernal what messages are passing

cat /var/log/kernel.log?

Quote:
how can get time in micro seconds

give some detail about jefies and how to access them
Look at this:
http://www.xml.com/ldd/chapter/book/ch06.html

The module jit can be found here:
http://www.cs.uiuc.edu/class/fa05/cs...project3/jit.c
 
Old 11-21-2005, 06:13 PM   #3
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
getting errors in running the code of jeffies

sorry but your code has given errors
can u tell me why i think it is not compatialble
i amusing suse linux os and its laptop


Chanchal:/home/chanchal # cat /var/log/kernel.log
cat: /var/log/kernel.log: No such file or directory
Chanchal:/home/chanchal # cat ../var/log/kernel.log
cat: ../var/log/kernel.log: No such file or directory
Chanchal:/home/chanchal # cat ../../var/log/kernel.log
cat: ../../var/log/kernel.log: No such file or directory
Chanchal:/home/chanchal # cat /var/log/kernel.log
cat: /var/log/kernel.log: No such file or directory
Chanchal:/home/chanchal # ls /var/log/kernel.log
/bin/ls: /var/log/kernel.log: No such file or directory
Chanchal:/home/chanchal # vi
Chanchal:/home/chanchal # gcc jit.c
In file included from /usr/include/linux/list.h:7,
from /usr/include/linux/wait.h:23,
from /usr/include/asm/semaphore.h:41,
from /usr/include/linux/sched.h:18,
from /usr/include/linux/module.h:9,
from jit.c:61:
/usr/include/linux/prefetch.h: In function `prefetch_range':
/usr/include/linux/prefetch.h:64: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared (first use in this function)
/usr/include/linux/prefetch.h:64: error: (Each undeclared identifier is reported only once
/usr/include/linux/prefetch.h:64: error: for each function it appears in.)
In file included from /usr/include/linux/module.h:22,
from jit.c:61:
/usr/include/asm/module.h:56:2: #error unknown processor family
jit.c:79:20: sysdep.h: No such file or directory
jit.c: In function `jit_read_current':
jit.c:411: error: incompatible types in assignment
jit.c: In function `jit_init':
jit.c:511: error: `EXPORT_NO_SYMBOLS' undeclared (first use in this function)
Chanchal:/home/chanchal #
 
Old 11-21-2005, 07:35 PM   #4
ahedler
Member
 
Registered: Oct 2005
Location: A safe distance from Detroit
Distribution: SuSE 10.0, Knoppix
Posts: 99

Rep: Reputation: 17
Ok, try looking in /var/log/messages or else look in the /var/log directory for something that looks like it may be useful to you.

If you can't tell from the contents, then you may not know what you are asking for.
 
Old 11-21-2005, 08:32 PM   #5
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
i think these messages are stored somewhere
if this is true how can i delete them .......so that i can get some memory
 
Old 11-21-2005, 09:21 PM   #6
ahedler
Member
 
Registered: Oct 2005
Location: A safe distance from Detroit
Distribution: SuSE 10.0, Knoppix
Posts: 99

Rep: Reputation: 17
Most of the important system messages will be found in the /var/log directory. You can customize where some of the messages go with /etc/syslog.conf (?) or /etc/syslog-ng/syslog-ng.conf, depending on what distribution you use and which logging method you choose to use.

These log files can get rather large in some cases, if the machine is very active, or if you turn on verbose logging, but it is easy to manage these log files automatically with the logrotate program. You can specify in the configuration file(s) how often to rotate the logs, how large they should be allowed to get, and what to do with them when they are rotated. You can save a specific number of old logs, have them date stamped, compress them, move them to another directory or filesystem, or mail them somewhere, among other things. By putting a logrotate job in the root crontab, this will happen automatically without need for maintenance on your part. You just decide how big to let them get, or how long to keep them, how often to rotate them, and what to do with them. Easy as pie.

By the way, since they are text files, if you need to keep them around for a long time, you can have the archived logs compressed so they take up a very small fraction of the space.

Hope this is helpful.

-Alan
 
Old 11-22-2005, 10:15 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Re: getting errors in running the code of jeffies

Sorry, I don't think the jit I posted is compatible with kernels 2.6 . You need to port the code and at least grab sysdep.h from alessandro rubini.

You have to find jit.c for 2.6 kernel (included in 3rd edition of the book)

Maybe it is on O'reilly ftp server, I can't check here.
 
Old 11-22-2005, 04:57 PM   #8
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
acpid mail SaX.log wtmp-20050908.gz
boot.log mail.err scpm wtmp-20050930.gz
boot.msg mail.info scrollkeeper.log wtmp-20051031.gz
boot.omsg mail.warn smpppd wtmp-20051108.gz
cups messages squid wtmp-20051114.gz
dump messages-20051001.gz suspend2disk.log wtmp-20051122.gz
evlog messages-20051109.gz tomcat5 XFree86.0.log
faillog news vbox XFree86.0.log.old
firewall ntp warn Xorg.0.log
ircd quagga warn-20051101.gz Xorg.0.log.old
kdm.log radius warn-20051115.gz YaST2
lastlog sa wtmp
localmessages samba wtmp-20050821.gz


this is what i get when i do the ls /var/log on my system
now tell me what can i do in order to know which one is useful and which one is not
whre are my messages that i want to delete regualrly which are not useful files
this is suse 6 operating system
thank
 
Old 11-23-2005, 04:54 AM   #9
raseel
LQ Newbie
 
Registered: Oct 2005
Distribution: Fedora Core 3
Posts: 20

Rep: Reputation: 0
You can see the kernel messages with "dmesg", which is a Kernel ring buffer.
It is by default 16K in size.

However,if you man dmesg, you will find that with options like -c etc. you can either clear this buffer or increase(or decrease) the size of this buffer.

What exactly do you mean by "how do i get microsecond time" ?
There are different ways to do it in Kernel space AND in user space.

In the kernel you can use the time_val struct and to get microsecond resolution time with do_gettimeofday(struct time_val *) call.

Even for jiffies, the best place is to browse the kernel source.

Basically jiffies is a global variable which is incremented on each clock-tick , i.e,. in the Linux Kernel, it is about 100 times in a second.
 
Old 11-24-2005, 02:02 PM   #10
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
ok thanks but i want the details of how they are produced so that i can access them form scratch
thanks
 
Old 11-24-2005, 04:48 PM   #11
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
They're produced by the kernel itself. It sounds like you want to know how the kernel works. I'd suggest getting Robert Love's book Linux Kernel Development (there's a 2nd edition out) to read more about this. You can download the source code to the Linux kernel to look through. You can also find kernel information in the /proc and (on some systems) the /sys filesystems.
 
Old 11-24-2005, 05:00 PM   #12
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
/proc/kmsg

ok recentally i have executed a command cat /proc/kmsg and found

and i found that something is printed regularly after some time

i know that are the kernal messages of the waiting process but may i know the meaning of them


<4>SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:12:f0:c9:9e:3f:08:00 SRC=192.168.7.57 DST=224.0.0.251 LEN=73 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=53
<4>SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:12:f0:c9:9e:3f:08:00 SRC=192.168.7.57 DST=224.0.0.251 LEN=73 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=53


so can u tell me the meaning s of the above process..........

or atleast give me some links
 
Old 11-25-2005, 05:11 AM   #13
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
t is declared in <linux/sched.h> as unsigned long volatile, and will possibly overflow after a long time of continuous system operation (but no platform features jiffy overflow in less than 16 months of uptime). Much effort has gone into ensuring that the kernel operates properly when jiffies overflows. Driver writers do not normally have to worry about jiffies overflows, but it is good to be aware of the possibility.


what is the problem if jeffies overflow occurs in 16 or more continuous operation of the machine
whats the basic problem
 
Old 11-25-2005, 05:43 AM   #14
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Example:
t1_jiffies is MAX_LONG-Hz
2 next ticks,
t2_jiffies is MAX_LONG+Hz which modulo (MAX_LONG) gives Hz.

So you can't say that t2_jiffies > t1_jiffies which is probably not what you want!!

look at the functions:
time_after
time_before
time_after_eq
time_before_eq
 
Old 11-26-2005, 10:59 AM   #15
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
jeffies ,system time,wall clock...so many doubts

hi
thanks i got my answer
thanks but can u tell me what if i want to change my jeffies operation

or
can u tell me what is the realtion between the no of jeffies and the wall clock

u know there are so many times in our clock wall time,jeffies,system time

but i know all operation is counted by jeffies

then someone says that wall clock is is no of seconds since 1970

but ...how one calculates no of seconds from 1970
its a tough work


your reply was great ...just tell me some more
thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Thunderbird debug mesages lacerto SUSE / openSUSE 2 03-10-2005 07:09 AM
Getting CLBU Vobadm mesages after every few hours from my cleacase server manojthakkar Linux - Newbie 0 12-08-2003 04:14 AM
How do you configure the kernal, overwriting the old version of the same kernal? sabaka Linux - Newbie 13 10-04-2003 10:00 AM
Help! Configuring Kernal failed, GRUB can't boot new kernal, help! sabaka Linux - Newbie 4 09-16-2003 09:12 PM
redirecting boot mesages frieza Linux - General 6 09-06-2002 12:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration