switchd v0.1
---------------

This is a little daemon that monitors keyboard activity on the console and
will switch to a specified virtual console after a specified period of
inactivity.  This is useful if you run some kind of system status program
like top or procinfo on a vc and want that screen to be visible when no one
is using the console.  With this daemon, if someone logs onto the system on
the console but forgets to switch back to the status vc after logging out,
the daemon will automatically switch it back for you.

The daemon is used as follows:

switchd inactivity_delay monitor_interval target_vc

- Inactivity_delay 	is the time of inactivity (in seconds) that switchd
			will wait before switching to the target vc.

- monitor_interval	is how often (in seconds) the daemon will check for
			keyboard activity.  The smaller the number, the more
			cpu time the daemon will use, but the larger the
			number, the less resolution the daemon has.  For
			example if you set the inactivity delay to 62
			seconds but the monitor interval is 60 seconds the
			vc will not get switched until 120 seconds of
			inactivity.  Similarly, if delay is 60 seconds and
			interval is 15 seconds, if someone presses a key 1
			second after a monitor cycle, the switch will not
			occur for 74 seconds.  Bascially, switches will
			occur between (delay) and (delay + interval) seconds.

- target_vc		is the virtual console that the daemon will switch
			to.

Example:

switchd 300 15 3

This will switch to vc #3 after 5 minutes of inactivity and checks every
fifteen seconds.  These are resonable values (no noticable load on a 386sx),
and they are the settings I use.

If you have any questions, suggestions, or comments, please let me know.

Ervin Walter
<00edwalter@bsuvc.bsu.edu>

Copyright (c) 1996 by Ervin Walter <00edwalter@bsuvc.bsu.edu>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version
2 of the License, or (at your option) any later version.
      
