SUMMARY: How to monitor console messages?

From: David Mostardi (
Date: Wed Oct 20 1993 - 05:45:23 CDT

I'm sitting here on my Sun (4.1.3), and every 20 minutes,
like clockwork, the console receives a message:

    Oct 18 15:47:38 slag -- MARK --

This is probably a harmless local mod by my predecessors,
but I have been unable to detect the sender of this message.
The generalized form of my question is:

    Is there a way to monitor the Console in order
    to ascertain which process is sending Message X there?


Yea verily, the Answers didst flood my mailbox.

1. Who makes the "MARK" message every 20 minutes? Syslogd.
   In my syslog.conf there is a configuration entry ""
   which sends the "MARK" message to the indicated file
   every 20 minutes. To cancel, I can edit out ""
   and send "kill -HUP" to syslogd.

2. How to generally monitor the Console? Suggestions,
   yet untried by myself, include:

   a. (Jim Redpath) Find the pid of the console from the ps command
      and do a "trace -p pid", i.e.:

      244 p6 IW 0:23 cmdtool -Wp 0 0 -Ws 590 77 -WP 3 833 ...
      245 p6 IW 0:00 -bin/csh (csh)
      249 p7 IW 6:28 cmdtool -Wp 26 23 -Ws 961 791 -WP 10 ...
      250 p7 IW 0:00 -bin/csh (csh)
      ags% trace -p 244

   b. (Brian Decker) For general system monitoring purposes,
      I recommend Swatch. Swatch is a set or Perl scripts that
      can be set up, via config files, to monitor files such as
      /var/adm/messages, /var/log/syslog, for "interesting"
      events, and then to take some action. The actions that can be taken
      are essentially at your discretion,since swatch will start any program
      or script that you have permission to execute. Swatch can found
      on in the /pub/sources directory.

   c. (Eric Burger) You might try lsof on the console when you expect
      to get the message, so you can see who's got the console device open.

Chalk up another one for the Sun Managers list.
Best email list I've ever belonged to!

Thanks to my respondents:
Pauline van Winsen - Uniq Professional Services <> (Tim Evans)
"Derrick J. Brashear" <> (Einar Indridason)
Jim Redpath SRI Ft Bragg <> (Dave Brillhart)
"Rick Weldon, Sys. Adm 55060" <>
Timothy G. Smith - Special Projects <tgsmith@Sun.COM> (Brian Decker) (Jay Anderson) (Ed Strong) (Bill Townsley) (Pete Biggs)
Andrew Benson <> (Shumon Huque)
Steinar Haug <> (Brian Farrell 4-6531) (Dotty Pon) (Ken Stoddart) (Nick Nickerson)
"Fuat C. Baran" <> (Birger A. Wathne)
kmah@DCS-Systems.COM (Kevin Mah) (Eric Burger) (Jon A. Tankersley)
david@srv.PacBell.COM (David St. Pierre) (Houman Safai )
Ray Schnitzler <>
David Mostardi Email:
Network & Systems Manager Phone: (510) 540-6400
Capital Market Technology, Inc. FAX: (510) 540-5505
1995 University Ave. #390, Berkeley CA 94704

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:25 CDT