lkml.org 
[lkml]   [1999]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] console alertness - notifying of console activities
An interesting patch.
I expect that the next one will include options for setting
the pitch and duration of the beep issued by the kernel when
there is a beep on a different console.

But really, if you want to know when messages appear on a log console,
then something like

#!/bin/sh
# call: chvt_on_event N
N=$1
VT=/dev/vcs$N
OLD=/tmp/.chvtoe$$
NEW=/tmp/.chvtoe$$x
cat $VT > $OLD
while true; do
sleep 1
cat $VT > $NEW
if ! cmp -s $OLD $NEW ; then
mv $NEW $OLD
chvt $N
fi
done

would do.
Add parameter checking and removal of temp files on exit.
Replace the chvt $N by an echo ^G if you only want a beep.
A C version would be a single page of code.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.029 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site