Pervasive PSQL Message Logging
Pervasive PSQL provides various logging repositories for messages to assist you with troubleshooting. The logging falls into two broad categories:
The following table summarizes the repositories.
Licensing Messages
Several of the logging repositories emphasize licensing messages. The reason is that the Pervasive PSQL licensing components periodically verify that the key for the database engine is still valid. If a key is determined to be invalid, the key changes state from “active” to “failed validation.” The database engine functions normally for a certain number of days so that you have ample time to correct the validation failure(s).
If you do not correct the failures before the number of days ends, the key changes state again to “disabled.” The key is no longer valid and the database engine cannot access data files.
Because you need to attend to a failed validation in a timely manner, the state change of the key is brought to your attention as soon as possible. For example, a message is logged to all of the message repositories. The most evident of these is Pervasive Notification Viewer. (License Administrator also displays the state of keys, which you can re-check at any time by initiating a validation action. See License Administration in Pervasive PSQL User's Guide.)
Change in State of Key
The following table explains the type of message returned based on the change in state of the key.
The number of days provided to correct the failed validation have expired. The conditions causing the failed validation were not corrected before the expiration. The key is no longer valid and the database engine cannot access data files.
Note that no messages are logged for keys with a state of “expired” (which applies only to temporary keys), or “inactive” (which applies to keys still registered on the machine from previous versions of Pervasive PSQL).
Logging Frequency
The following table lists the frequency with which licensing messages are logged for particular actions.
See To Display Remaining Authorizations in Pervasive PSQL User's Guide, PvValidateLicenses() in Distributed Tuning Interface Guide, and ValidateLicenses in Distributed Tuning Objects Guide.
1Message logging follows a one-way hierarchy: any licensing message logged to Pervasive Notification Viewer is also logged to the Operating System Event Log and to the Pervasive PSQL Event Log. Similarly, any licensing message logged to the Operating System Event Log is also logged to the Pervasive PSQL Event Log.
Pervasive Notification Viewer
The Pervasive Notification Viewer (hereafter, just “Notification Viewer”) is an application utility for displaying messages logged by the licensing components. The purpose of the utility is to inform you of noteworthy licensing messages (see Table 23) in a noticeable but unobtrusive manner.
By default, Notification Viewer is installed with Pervasive PSQL Server, 32-bit and 64-bit, on Windows and Linux, and with Pervasive PSQL Workgroup. Also by default on Windows platforms, Notification Viewer restarts when you restart Windows.
On Windows platforms, the executable is named notifyviewer.exe. The utility provides a single running instance for a user. An attempt to start Notification Viewer when it is already running brings the GUI to the front of the application displays.
On Linux distributions, the utility is a shell script named notifyviewer. Each time the shell script executes it starts another instance of Notification Viewer. If you restart Linux, you must restart Notification Viewer. The shell script is not automatically executed when Linux is restarted.
Command Line Options
You can specify how you want the utility to start with the following command line options.
Notification Viewer provides two interfaces: system tray icons and a graphical user interface (GUI).
System Tray Icons Interface
By default on Windows, Notification Viewer starts with the GUI hidden and displays its system tray icon. (On Linux, Notification Viewer starts as a GUI and displays its system tray icon if the Linux distribution supports a system tray.) After starting, the utility begins monitoring licensing messages.
If Notification Viewer detects unread messages, the tray icon visibly changes to indicate unread messages. See Tray Icons.
Notification Viewer also displays two types of tooltips. The mouse-over tooltip displays the number of important unread messages (if any), the total number of unread messages, or the name of the utility if all messages have been read. A balloon tooltip displays when Notification Viewer detects messages that need to be brought to your attention. On Windows, the balloon tooltip remains visible until you dismiss it directly or perform a keyboard or mouse operation. On Linux, you must click on the balloon tooltip to dismiss it.
Popup Menu
The popup menu for the tray icon contains two menu items: “Open” which opens the GUI, and “Exit” which will terminate the utility. You right-click on the tray icon to display the popup menu.
Tray Icons
The following table explains the meaning of the tray icons.
Graphical User Interface
You can open Notification Viewer GUI by double-clicking the tray icon or by right-clicking on the tray icon then clicking “Open.” By default on Linux, Notification Viewer starts as a GUI and displays its system tray icon. (If you want to change the startup behavior on Linux, pass the -tray option to the notifyviewer shell script. If the Linux distribution does not support a system tray, Notification Viewer displays the GUI but no system tray icon. In that case, start Notification Viewer by running the shell script.)
When the GUI is visible, unread messages are immediately added to the GUI. (In addition, the tray icon tooltip is shown and the icon changes to indicate unread messages.)
Pervasive PSQL tracks which records in the notification file are read or unread for each user. That is, each user displaying the GUI sees all of the messages, but whether a particular message is read or unread varies by user.
If a system tray is not supported by an operating system, the “close” command for Notification Viewer terminates the utility. If a system tray is supported, then “close” hides the GUI and the tray icon becomes the only visual representation that the utility is still running.
Toolbar and Panels
The Notification Viewer GUI provides a toolbar and two main panels as shown in Figure 31.
Figure 31 Notification Viewer GUI
 
To “read” a message: click on (select) the message. Once selected, the typeface for the message changes to a regular typeface.
Operating System Event Log
The Pervasive PSQL license administration components write messages to the operating system event log on Windows platforms. All Pervasive PSQL components write messages to the operating system event log on Linux distributions.
Windows Platforms Event Logs
Windows operating systems provide a method to log events categorized as “Application,” “Security,” or “System.” Pervasive PSQL logs licensing messages only to the Windows Application Event Log. The messages are a subset of the licensing messages written to PVSW.LOG.
Any licensing message categorized as an “error” or “warning” is logged. This includes messages that result from a change in the state of a key as well as other warning and error messages (see Table 23). In addition, certain information messages are logged, such as those listed in Table 22.
Viewing Event Logs
Windows operating systems provide a graphical user interface utility called Event Viewer to view and manipulate event logs. The utility can be accessed through the Windows Control Panel or by executing the command eventvwr.msc from a command interface. Note that the Event Viewer interface for Windows XP and Windows Server 2003 differs from the one for Windows Vista and later.
Regardless which Event Viewer is used, Pervasive PSQL displays the following for an event.
In addition, on Windows Vista and later, the Keyword column displays “Classic” and the Log column displays “Application.” Event Viewer allows you to display additional columns, but Pervasive PSQL provides no data for them.
Linux Distributions Event Logs
On Linux distributions, all Pervasive PSQL components write messages to the standard Linux logging system, syslog. By default, syslog writes to the /var/log/messages directory. Optionally, for SQL Connection Manager only, you can also log messages to the event.log file.
Event.log File and Bti.ini
Bti.ini is a Pervasive PSQL configuration file used on Linux distributions. By default, the file is located in the /usr/local/psql/etc directory.
The file lets you configure settings for the SQL Connection Manager (the “SQLManager” section in the INI file). One of the settings, LogEvent, determines the type of event messages logged to the event.log file. By default, event.log is located in the /usr/local/psql/bin directory.
Sets the type of protocol used by the SQL Connection Manager. This must be set to TCP.
LogEvent=msg_type
Specifies one of the following values for msg_type to indicate the type of messages logged to event.log (the default is 1):
Pervasive PSQL Event Log
On Windows platforms, all Pervasive PSQL components write status, error, warning, and information messages to the Pervasive PSQL event log. (On Linux distributions, Pervasive PSQL does not use an exclusive event log. Instead, all Pervasive PSQL components write messages to the standard Linux logging system, syslog. See Linux Distributions Event Logs.)
The Pervasive PSQL event log is called PVSW.LOG and, by default, is located in the application_data_directory\PSQL\logs directory. All Pervasive PSQL components on Windows platforms write to this log file. If two or more Pervasive-based applications are running on the same machine, they share PVSW.LOG.
PVSW.LOG Fields
PVSW.LOG consists of text messages in a format described in Table 24.
Automatic date-stamp in mm/dd/yyyy format.
Automatic time-stamp in hh:mm:ss format. Also indicates AM or PM.
An entry may be followed by binary data in standard hexadecimal format. There is no limit to the length of the binary data.
PVSW.LOG Example Entry
The following shows an example of the type of data contained in PVSW.LOG.