RD Controls Software Release Note 117.2<P> Database History Report Application (DBHist)<P>

RD Controls Software Release Note 117.2

Database History Report Application (DBHist)

Cynthia A. Chopp

Introduction

The Database History Report Application (DBHist) is a menu driven program which lists information concerning device modifications including who changed the device, what device was changed, when it was changed, on which node, and at what time and day. It will also show what was actually changed. Though it cannot show the specifics of what was changed, such as prior and existing values, it does give a specific account of what property or attribute was touched, along with a history description of what the users changed. To access DBHist one may go into the general menu located on both WARNER and DISNEY and choose the Database History (DBHist) selection. Once selected, the users will notice their screen change from eighty characters to 132. This change in size is due to the length of data being brought back to the screen. When the users are finished running DBHist, the screen will be returned to its original eighty character length.

Mouse vs. Terminal

DBHist is a menu driven program which can be run on both terminals and workstations. For those that have a workstation with mouse, selections can be made by double clicking the left most button of the mouse, on the desired option. For those that have a terminal, menubar selections can be made by pressing DO and using the arrow keys, and then pressing Return on the desired option.

Menu Options and Defaults

As DBHist program comes up on the screen, a variety of menu choices have already been defaulted. These defaults allow the users quick access time to view what they request without making many choices. These defaulted choices are explained in the appropriate sections below. If users change these defaults and select other menu choices, their new selections will appear on the screen. This allows the users to know at all times what they are actually viewing. Please See Example A.

In the upper left corner will appear the device or devices users wish to view. The lower left corner will show the location of where output is to go. The lower center of the screen will contain the time frame at which the users wish to see data. The right lower corner contains the choice of the property or attribute they wish to see that has changed. This property or attribute selection described is not defaulted, but rather a mandatory choice. This choice starts the overall search. Please note that all options selected will be updated on the screen, giving the users an accurate account of their selections.

Prop/Attr Selection

The Prop/Attr Selection menu consists of properties the users may choose to search for in a particular device. Please See Example B. If the users choose to look for changes in the reading, setting, status, control, reading alarm, or status alarm properties, another menu containing attributes will appear. Please See Example C. This menu contains attributes related to the specific property. Once the users make this final selection, the search for the history of a device begins.

Device Choices

The Device Choices menu consists of two options to choose from. Please See Example D. The users may search all of the devices or specific device(s), for changes that may have taken place. If they choose to view the specific device option they will be asked for a device name to search for. Please See Example E. The users may then type in a device, or to allow for global string searches, the asterisk (*) and the percent (%) could be used. The users can use the asterisk (*) and the percent (%) anywhere as wildcard characters. The asterisk character will specify zero or more characters while the percent will only specify one. This will allow the users to be very specific in choosing the devices they wish to view the history of. If the users type in a selected string, DBHist will search through the entire history file looking for that particular string and if found, will output all devices containing it, that have been logged as having changes.

Time Frame

The Time Frame menu consists of seven options of time to choose from. Please See Example F. These options allow the users to be specific or general when selecting how far into the past they would like to search for a device. The time frame options include: today, within the last month, within the last three months, the entire history, a specific day, month, year, a specific month, year, a specific year. If the users choose a specific date, they will be prompted to type in a day (numbers 1 - 31), then month (dates JAN - DEC), then the year (numbers 1990, 1991, ...), depending on which they choose. Please See Examples G,H,I. If an invalid date is typed in, an error message will appear on the screen and the users will have to retype in their selections.

Output Choices

The Output Choices menu option allows the users to write the selected information to either the screen, a file, or both. Please See Example J. DBHist defaults the output to the terminal. If both options are chosen, whatever is viewed on the screen will also be output to the file. If the users terminate ( control z or F10 ) viewing their output, their output file terminates as well. If the output is sent to a file, this file will be written into the users home directory and will be named DBHist.LOG. Please note that all .LOG files will be purged by the MAD_DELETER every four days. If the users wish to keep their output files they must rename them, or they will eventually be lost. If further processing is desired, the users may execute a system sort on the output files and sort them by device name. The users may also change the file's name through a copy or rename.

Print

The PRINT menu option, allows the users to output information contained on their screen, to their specified printer. Once the users select the PRINT menu option, a list of all available printers is shown. The users may scroll through the printer options using the arrow keys until they find their choice and make their selection.

Exit

The EXIT menu option allows the users to cleanly terminate execution of the DBHist program. By choosing the EXIT option or by pressing control z or F10, the users will exit DBHist, their screen will return to eighty character width, and they will be put back to the general menu.

Output

The users have the ability to search for a device, group of similar devices, or the entire database. They may send the chosen search information to the screen, to a file, or to both. Searches for changes that took place today, within the last month, within the last three months, on a specific day, month, year, on a specific month, year, on a specific year, or on the entire logging file, may also be chosen. The main option of selection is the ability the users will have to search for changes to the entire device, a specific property, or a specific property's attribute.

When users make their final selections and DBHist begins to search for data, a heading line will appear under the menubar options, and then report data will follow. Please See Example K. Output consists of the device name, function of change, date and time, the user who made the change, the node it was changed on, and the history text of the users description of what they did. This information is very general to give the users an overview of what has been changed.

Once a screen is filled with report data, the users will be prompted to either continue, exit the search, or display device specifics. Please See Example L. If the search has completed, the users will be prompted to exit, or display device specifics. Please See Example M. For the users to return back to the main menu, control z or F10 must be pressed. For users to continue viewing the search's output, they may press the space bar to continue. If users press return with the cursor on a device row, the device's specific information will appear. Please See Example N. The search will display each property with associated bits including all attributes of the specific device chosen. If a bit is turned on (or 1) that property or attribute was changed, but if it is off (or 0) it was not touched. For the users to get back to the main screen, they would have to press control z or F10. The device specific output can be obtained from any user's choice made. The users may output this information to a printer using the menubar screen print option PRINT. If users chooses file, or screen and file, for the menubar option Output Choices, this specific information will not be output to a file, but only that information which is printed on the main screen.

Conclusion

This program was designed to report what was changed in the database. If any device was added, modified, renamed, or deleted, it will be logged by the DBSAServer and anyone will be able to view what was changed.

A logging file for each run is established months prior to the actual beam run, and will continue to run until the run has completed. At this completion this group of multiple logging files will be archived for future reference if needed. The changing of logging files will also keep the size of the file down for quicker searches. Futuristically a choice of which logging file to view may be added to the menu. This feature would enable the users to access any logging file from any run.

Another future feature of this program may include outputs of specific information being able to go to a file, instead of just to a printer. At this time, the need for such a feature does not exist but will be looked into.

Security, Privacy, Legal

rwest@fsus04.fnal.gov