boot messages

Jay Nugent jjn
Mon May 17 11:39:37 PDT 2004


Greetings,

On Thu, 31 Oct 2002, Jerry McBride wrote:

> On Thu, 31 Oct 2002 15:48:47 -0700 Andrew Mathews
> <andrew_mathews at linux-works.org> wrote:
> 
> > Tony Alfrey wrote:
> > > Hi.
> > > 
> > > I want to put little messages in the various boot scripts (like in 
> > > /etc/rc.d/rc.modules) so that I can track the boot process.  I would 
> > > like these messages to appear someplace where I can review them, such 
> > > as in dmesg.  So far, I have simply put
> > > echo "blah blah"
> > > into scripts and the messages appear on the screen during boot-up but 
> > > not in either dmesg (or /var/log/messages) which is where I would like 
> > > them.
> > > Does someone know how to do this?  I would really appreciate a hint on 
> > > this one.
> > > Thanks much in advance!
> > > 
> > > 
> > > 
> > 
> > Try:
> > echo "blah blah" >> /var/log/boot.log or
> > echo "blah blah" >> /var/log/messages
> >
> 
> You can send it to an unused console via echo "blah" > /dev/tty3

   To log a message into /var/log/messages you can use 'logger'.

   Like this:

echo "Resetting time from time.nist.gov..."
/usr/bin/logger -i -t rc.local "Resetting time from time.nist.gov..."
/usr/bin/rdate -s time.nist.gov   


   It uses the syslogd utility, lets you say what the script or process is
that caused the logging, and specify a "text" string to place in the log.
See the manpage for the specifics.

   Enjoy!
      --- Jay
             
"Those that sacrifice essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."  -- Ben Franklin (1759) 
+------------------------------------------------------------------------+
| Jay Nugent   jjn at nuge.com    (734)971-1076    (734)971-4529/Fax        |
| Nugent Telecommunications  [www.nuge.com]     (734)649-0850/Cell       |
|   Internet Consulting/Linux SysAdmin/Engineering & Design/ISP Reseller |
| ISP Monitoring [www.ispmonitor.net] ISP & Modem Performance Monitoring |
| Web-Pegasus    [www.webpegasus.com] Web Hosting/DNS Hosting/Shell Accts|
| LinuxNIC, Inc. [www.linuxnic.net]   Registrar of the .linux TLD        |
+------------------------------------------------------------------------+
  8:01pm  up 55 days, 16:21,  5 users,  load average: 0.03, 0.09, 0.43



More information about the Linux-users mailing list