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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-19-2005, 05:09 PM
|
#1
|
Member
Registered: Oct 2005
Location: banglore(india)
Posts: 62
Rep:
|
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
|
|
|
11-21-2005, 06:13 PM
|
#3
|
Member
Registered: Oct 2005
Location: banglore(india)
Posts: 62
Original Poster
Rep:
|
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 #
|
|
|
11-21-2005, 07:35 PM
|
#4
|
Member
Registered: Oct 2005
Location: A safe distance from Detroit
Distribution: SuSE 10.0, Knoppix
Posts: 99
Rep:
|
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.
|
|
|
11-21-2005, 08:32 PM
|
#5
|
Member
Registered: Oct 2005
Location: banglore(india)
Posts: 62
Original Poster
Rep:
|
i think these messages are stored somewhere
if this is true how can i delete them .......so that i can get some memory
|
|
|
11-21-2005, 09:21 PM
|
#6
|
Member
Registered: Oct 2005
Location: A safe distance from Detroit
Distribution: SuSE 10.0, Knoppix
Posts: 99
Rep:
|
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
|
|
|
11-22-2005, 10:15 AM
|
#7
|
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307
Rep:
|
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.
|
|
|
11-22-2005, 04:57 PM
|
#8
|
Member
Registered: Oct 2005
Location: banglore(india)
Posts: 62
Original Poster
Rep:
|
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
|
|
|
11-23-2005, 04:54 AM
|
#9
|
LQ Newbie
Registered: Oct 2005
Distribution: Fedora Core 3
Posts: 20
Rep:
|
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.
|
|
|
11-24-2005, 02:02 PM
|
#10
|
Member
Registered: Oct 2005
Location: banglore(india)
Posts: 62
Original Poster
Rep:
|
ok thanks but i want the details of how they are produced so that i can access them form scratch
thanks
|
|
|
11-24-2005, 04:48 PM
|
#11
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
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.
|
|
|
11-24-2005, 05:00 PM
|
#12
|
Member
Registered: Oct 2005
Location: banglore(india)
Posts: 62
Original Poster
Rep:
|
/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
|
|
|
11-25-2005, 05:11 AM
|
#13
|
Member
Registered: Oct 2005
Location: banglore(india)
Posts: 62
Original Poster
Rep:
|
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
|
|
|
11-25-2005, 05:43 AM
|
#14
|
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307
Rep:
|
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
|
|
|
11-26-2005, 10:59 AM
|
#15
|
Member
Registered: Oct 2005
Location: banglore(india)
Posts: 62
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 01:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|