[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

non-tty use of "console" client.

Greg A. Woods users@conserver.com
Tue, 15 Jan 2002 13:55:52 -0500 (EST)


I've recently been trying to solve a dilema with conserver, my terminal
server, my BEST UPS's, Cricket, and nut-ups.

Ideally I'd like conserver to be in control of the UPS consoles via the
terminal server, but in order to use both Cricket and nut-ups with them
I need some way to send periodic commands to the UPS from cron.
(nut-ups and cricket can both be taught to watch the log file)

I thought, oh, this should be easy, I'll just "echo f | console -f ups"
using a user-ID that doesn't require a password and be done with it.

Unfortunately when I tried that the conserver daemon came crashing down
claiming to have suffered an unexpected SIGPIPE.  This was not a
pleasant experience since it was my main production conserver!  :-(

I took a brief look through the code to try and understand the signal
handling mechanisms, but quickly realised that I'd need a lot more time
to understand what was going on, let alone how to fix the problem.

I suppose I could try to write a custom "console" client too, but that
also seemed like it would take some time I don't seem to have.

Ideally I'd like to also have "console" show the resulting output on
stdout, say up to the next prompt (it would send a <CR> or whatever is
specified to determine what the prompt string is), or for some specified
number of lines, or up to the end of some specified regular expression,
etc.

Has anyone else thought of this, or have any suggestions?

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>