for example I am using logger to write messages to system log
is there some way write to kernel log ??
or question number 2`
I am using openwrt x64 on netbook.
as I understood netbook's display shows kernel log on a real-time basis.
is there ways to write your own messages on display in addition to kernel log and others???
The log level specifies the importance of a message. The kernel decides whether to show the message immediately (printing it to the current console) depending on its log level and the current console_loglevel (a kernel variable). If the message priority is higher (lower log level value) than the console_loglevel the message will be printed to the console.
But if you need to write to other console then this is how to do it:
actually if I need console access to openwrt mostly I use putty
I am not using keyboard and display on openwrt netbook for that purposes
..
logger I use in my scripts for info or debug
but I wanted also something print on display to
your suggested echo MESSAGE > /dev/kmsg is what I need thank you
in addition (my second question) I was curious to know how to write on netbook display(in scripts) directly
not through kernel log
blah pts/1 123.123.123.123 Tue Nov 3 16:40 - 16:58 (00:18)
blah pts/2 123.123.123.123 Tue Nov 3 15:14 - 16:38 (01:23)
blah pts/1 123.123.123.123 Tue Nov 3 14:46 - 16:40 (01:53)
blah pts/0 123.123.123.123 Tue Nov 3 14:38 - 16:59 (02:20)
blah tty1 Tue Nov 3 14:22 - down (00:02)
blah tty1 Tue Nov 3 14:14 - down (00:05)
blah tty2 Tue Nov 3 14:11 - down (00:02)
blah tty1 Tue Nov 3 14:08 - down (00:04)
So this is result from command "last" that shows all successful logins. As you can see there is user "blah" but he is connected few ways. When there is tty1 or tty2 this mean that user is physically sit on computer and login locally. First console is tty1, but seems that user is login also on second console (using Alt-F2) tty2.
But sometime you don't know on what console you're sitting and can be even on tty5 or even more. But you need something to be shown on CURRENT (!!!) console. That's why you can use tty0 and using tty0 shows things on current console.
That's why on your situation tty0 and tty1 are same.
But if user is logging-in remotely using SSH then there are consoles like pts/0, pts/1, pts/2 and so on.