Note
Because agents are stored on the server, you must have sufficient disk space available for all agents created on your server. A general rule of thumb is to allow 512 bytes per agent, which calculates out to approximately 70-100MB of space for 100,000 agents.
Configuring agent services
As server administrator, you must begin by enabling and configuring agent services. You can enable or disable agent services as well as define many default characteristics of individual agents.
Note
Before you can use agent services on your server, you must define the MTA
(mail) and NNTP (news) hosts for your server. To do this, use the Server
Manager for your Enterprise Server. Use the Server Preferences|Network
Settings link and enter values for the MTA Host and NNTP Host fields.
To set up agent services for your server, follow these steps:
/https-
yourServer/agents-db
. If you want to specify a different directory, make sure you include a full path.
Agent information in the configuration files
There are several configuration files that govern how agent services operate. In general, you don't access these files, but this section briefly introduces them just in case you do need to know something about them.
The system configuration file is mapped to the
agent_system.ini
file in the obj.conf
file. This defines your system and data directories.
This in turn points to the agent_string.ini
file that contains the text strings that are used to create the HTML agent services forms.
The information that you enter through the Agents & Search |Agent Management form (See "Configuring agent services" for more information), is reflected in the agent.conf
file.
The access control list (ACL) data is configured in the
magnus.conf
file, which points to another file, server_root/httpacl/generated.https-
yourServer.acl.
Recovering agent files
Agent information is stored in a set of database files on the server. It is possible for the data in these files to become inconsistent or corrupted. If this happens, you can use the command-line utilities (provided with the web server) to salvage and recover agent information from the corrupted files.
The next sections explain how agent information is stored and how to recover this information if file corruption occurs.
How agent information is stored
Agent information is stored in this database file: server_root/https-
yourServer/agents-db/ns-agent-base
In order to provide quicker access to information in this file, the web server also creates and uses three index files.
ns_agent_base.idx
is an index to the main agent database. It provides the other index files with quick access to the agent database. ns_agent_user.idx
provides the server with a quick way to find agents based on username. (Essentially, this file contains usernames and pointers to locations in the main database file. Given a username, the server can use this index file to "look up" that user's agents in the main database file.) ns_agent_class.idx
provides the server with a quick way to find agents based on class (or type). (This file contains classes and pointers to locations in the main database file. Given a class, the server can use this index file to "look up" agents of that class in the main database file.)agent_repair
command-line utility to fix the index files. For details, see "Recovering from inconsistencies" on page 236.
If the files are in the "Corrupted" state, you need to run the agent_salvage
command-line utility to recover the data. For details, see "Recovering from file corruption" on page 236.
Figure 12.1 illustrates these different states and the utilities that you need to use to return the files to a "Valid" state.
Possible states of the files storing agent information
Recovering from inconsistencies
In some cases, the index files develop inconsistencies and the server cannot be able use them to find entries in the main database file (ns_agent_base
). When this situation occurs, the message "Agents database has become internally inconsistent" is logged to the agent.log
file, and the server displays the following error message:
Agent store files are out of sync
Because both index files consist of data that is already stored in the main database file, you can recover the index files from the data in the main database file.
To recover the index files, run the agent_repair.exe
utility, which is located in the server_root/Netscape/SuiteSpot/plugins/agents/bin directory. Unlike with corrupted files, inconsistent files are repaired in place, with the "new" files overwriting the original files.
To run this utility:
agent_repairfilePathname
/filePrefix
filePathname
is the pathname for the agent file directory. The default is
server_root/https-
yourServer/agents-db
.
filePrefix
is the prefix that is common to the names of the database
and index files. Typically, this prefix is ns_agent
.
For example, you would execute a command similar to the following command:
agent_repair
server_root/https-yourServer/agents-db/
ns_agent
Recovering from file corruption
In some cases, the main database file (ns_agent_base
) might get corrupted. When this situation occurs, the server displays the following error message:
Agent store files are corrupted
agent.log
file. You can change this message by changing the text in the agent_strings.ini
file. If you do so, the new message appears instead of this standard one.
If this happens, you need to recover the data from the main database file. (Unlike the problem with inconsistent indexes, corruption in the main database file may result in data loss.)
To recover the data, run the agent_salvage.exe
utility, which is located in the server_root/Netscape/SuiteSpot/plugins/agents/bin
directory. This utility retrieves data from the corrupted files and creates new files for the data. Unlike with inconsistent files, corrupted files cannot be repaired in place, so new files are created in addition to the original files rather than overwriting them.
To run this utility:
agent_salvage
filePathname
/filePrefix
newFilePrefix
filePathname
is the pathname for the agent file directory. The default is server_root/https-
yourServer/agents-db
.
filePrefix
is the prefix that is common to the names of the database and index files. Typically, this prefix is ns_agent
.
newFilePrefix
is a prefix that you assign to the newly created files that contain the recovered data.Typically, this prefix is ns_agent
_recovered.
For example, suppose you run the following command:
agent_salvage
server_root/https-
yourServer
/agents-db/
ns_agent ns_agent_recovered
agent_salvage
utility retrieves data from the following corrupted files:
ns_agent_base
ns_agent_user.idx
ns_agent_class.idx
ns_agent_recovered_base
ns_agent_recovered_user.idx
ns_agent_recovered_class.idx
Agents database has been repaired
Accessing agent services
There are two ways to access the agent services user interface: you can go directly through the server or through Netscape Web Publisher.
To access agent services through the server, type in the following URL:
http://yourServer/agents
To access agent services through Web Publisher, you can either of these methods:.
The Netscape Enterprise Server Agent Services page appears. The lower left frame contains the links you need to create and view agents. The lower right frame describes agent services and will be used to display information about a specific agent once you have selected one. For further information, see the Web Publisher User's Guide, which is available through the online help system in user component such as agent services, search, and Web Publisher. To access help information, you can use the Help menu command in Web Publisher, or you can click the Help button on the Agent Services page, on the Web Publisher Services page, or on any of the search interface forms.