Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 1996 10:50:05 -0600 (CST)
From:      Joe Greco <jgreco@brasil.moneng.mei.com>
To:        mtaylor@cybernet.com (Mark Taylor)
Cc:        hackers@FreeBSD.org
Subject:   Re: Hang your machine with ScrollLock
Message-ID:  <199611251650.KAA15011@brasil.moneng.mei.com>
In-Reply-To: <XFMail.961125105744.mtaylor@cybernet.com> from "Mark Taylor" at Nov 25, 96 10:43:25 am

next in thread | previous in thread | raw e-mail | index | archive | help
> Here's a good one I did the other day (by accident):
> 
> I have a cron job that runs every two minutes to display the
> uptime on the console (to make sure that it keeps scrolling)
> on the company's name server (uptime > /dev/console).
> 
> I put the console in scroll-lock mode by accident.  About
> 0.5 hours later, name resolving was dead. I went to the
> name server machine and saw about 20 or so of these 'uptime'
> processes running, waiting to output to the console.  So many
> of these were running (along with CRON processes and sh processes)
> that the system could not create more processes (as the syslog
> told me).
> 
> As soon as I hit the scroll-lock key, everything was fine-
> all of the uptime processes completed, and name serving
> went on as usual.
> 
> 
> Just something to think about.  I don't have any bright ideas
> about a workaround.  Maybe auto-disabling ScrollLock mode when
> there are 'too may' processes waiting on vty output?
> 
> I know, I know, I should not do stupid things like this.  :)

I second this.  I would be quite content if there was a way to maybe
set this with vidcontrol.

I noticed kbdcontrol has a "-h" option, if this sets the number of
scrollback lines saved, maybe if set to 0 it disables scroll-lock.

I tried playing with it on a 2.0.5R box to see what it did and got a
panic: multiple frees.  Sigh.

Mildly related-

Stupid /etc/ttys scripts follow:

-------%<-------  I use this one on various server machines.
% cat /usr/local/bin/topcons
#! /bin/sh -

PATH=/bin:/usr/bin:/usr/local/bin; export PATH

device=/dev/${1}
cons=`echo ${1} | sed 's:ttyv::'`
cons=`expr ${cons} + 1`

if [ ! -c ${device} ]; then
	echo "${device} is not character special device!" 1>&2
	exit 1
fi

TERM=cons25; export TERM

sleep 5 < ${device}&
stty sane tty crt < ${device}
reset < ${device} > ${device}
clear < ${device} > ${device}
switchcons ${cons} < ${device}
top -q < ${device} > ${device}
clear < ${device} > ${device}
exit 0
-------%<-------  I use this one on various terminal servers.
% cat /usr/local/bin/whoson
#! /bin/sh -

PATH=/usr/bin:/bin:/usr/sbin; export PATH
TERM=cons25; export TERM
(
while true; do
        clear
        finger -h
        echo ""
        echo "-------------------------------------------------------------------------------"
        echo ""
        last -10
        sleep 15
done
) < /dev/ttyv3 2>&1 > /dev/ttyv3
-------%<-------

Both are clearly not very polished.

... JG



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611251650.KAA15011>