Zinc is an xterm-based program that displays the sum of the console information from multiple hosts, as found in the log files produced by the Conserver program. It is intended to hold roughly 100,000 or more entries in memory at a time, and allow the user to scan through those entries either as they come in or at his own pace, and to email out any entry which may require the attention of someone else.
Zinc is known to work with Solaris. It should also work with any other unix-like system that can use the ncurses library, but has not been tested on other systems.
To install Zinc, use the included Makefile by typing 'make zinc'. Zinc requires that the ncurses library be included and linked, which requires the files ncurses.h and libncurses.a be installed properly in ../include and ../lib, respectively.
To run zinc, type 'zinc' at the command line. The program will run and output from the consoles will appear in the center part of the screen as it comes in.
Should you wish to change the directory that zinc uses to look for
terminal files, you can change the LOG_DIRECTORY macro
in the code, or you can specify the directory on the command line,
i.e., zinc [-d log-directory]
Note that the log directory must contain text log files that are continuously updated by Conserver (or any other program with the functionality of Conserver).
To force zinc to reopen the console logs, send it a SIGHUP
(e.g. $ kill -1 <zinc-pid> ). This is useful when moving
the logs to a new location, or when a new host is added and needs to
be seen by zinc.
The following macros may be defined at compile-time via the source code to change the standard operation of zinc:
| MAX_ENTRIES | The maximum number of entries that can be held in memory before the numbers wrap around and begin to overwrite older entries. This value can be quite big -- 100,000 or more. |
| MAX_LINESIZE | The maximum number of characters allowed in an entry before it is broken up into two entries. It is expected that in normal operation, few lines will be >80 characters, and so the default of 1000 was chosen because it seems unlikely that it will ever cause one entry to get split into two. |
| SYSTEM_STRING_LEN | This is the size of the string used to invoke pine to send email. It must be big enough to include as many addresses as you would like to pass to pine. This should never be a problem because additional addresses could be added from within pine, and the email-address-passing mechanism of zinc was not intended to handle large and complex mail requests. However, if the program fails to correctly send mail, increasing this variable could help |
| EMAIL_RECIP_STRING | The string that is displayed when requesting that the user enter an email address. |
| JUMP_STRING | The string that is displayed when requesting that the user enter a destination for a jump. |
| MOUSE_QUEUE_SIZE | The maximum number of entries that may beselected at a time before selected entries begin to become unselected when a new entry is selected; this equals the number of entries that may be sent via email at one time. |
| LOG_DIRECTORY | This is the default directory in which to look for Conserver log files. This option may be overridden by specifying the directory on the command line. |
| HOSTNAME_LENGTH | This is the maximum length (in characters) of a host name. If host names exceed this size, the output will become misaligned. To increase the available printing space for hostnames, increase this variable. Note that the bigger it is made, the more empty space there will be in the 'host' column, so it is not a good idea to make this too big. |
| NUMBER_LENGTH | This is the maximum length (in characters) of an entry's number. If the numbers exceed this size, the output will become misaligned. To increase the available printing space for numbers, increase this variable. Note that the bigger it is made, the more empty space there will be in the 'number' column, so it is not a good idea to make this too big. |
| TAB_SIZE | How many spaces there are (at most) in a tab. |
| INPUT_DELAY | How many milliseconds to block for input between file updates. If Zinc is consuming too much processor, make this number bigger. If Zinc isn't updating its files often enough, make it smaller. Note that if Zinc received input from a file on the previous pass, it will not block for input. (It will poll for input between passes, but will not stop and wait until all files are empty. |
| TERMINFO | Where to look for terminal definition files; probably /usr/share/lib/terminfo |
| Key | What it does |
|---|---|
| Q | Quits zinc. |
| M | Mail the selected (hilighted) entries, using pine. User will be prompted for a destination address. |
| P | Move the active line up (can use up-arrow too). |
| N | Move the active line down (can use down-arrow too). |
| - | move back one page (page up). |
| space | move forward one page (page down). |
| A | Toggle automatic scrolling of the console information. This is enabled by default, so that every time a new message comes in, the screen will jump to that message. If you need to select a message to copy into an email, you will probably want to disable automatic scrolling. Remember to reenable it when you are done (press 'A' a second time) so that the screen will update automatically again. When automatic scrolling is disabled, a reminder appears in the top-left corner of the screen. |
| J | Jump to a message. This command allows you to jump the screen to any valid message, by number, via a prompt. Remember to turn off automatic scrolling (press 'A') if you don't want the screen to jump to the bottom when new console information comes in. |
In an xterm window only, the mouse can be used to select multiple entries for mailing. To select an entry, click on it. To deselect a selected entry, click on it again. Once clicked, an entry stays selected until you deselect it, even if it scrolls off the screen.
You can never deselect the entry that has been selected with the keyboard. The entry selected with the keyboard is the one that will move if you use the up and down arrows (or 'N' and 'P' keys).
If you have suggestions for improvements for this program, they can be directed to bug-sy@columbia.edu.