Console Help Commands in NetWare 5.1: Load, Loadstage, Magazine, Media, and Memory
Articles and Tips: article
01 Mar 2001
Mark McKell
Editor
DeveloperNet University
mmckell@novell.com
This section is one in a series that intends to describe each of the NetWare 5.1 console commands (both normal and hidden) in alphabetical order and to tell when, why, and how to use them properly. To see a list of the commands that you can perform at the server console, type HELP <Enter> at the server console prompt. To use the commands described here, simply type the command at the server console prompt followed by the <Enter> key.
Load
Before we dive into LOAD, a brief introduction to NLMs may be helpful. An NLM is a NetWare Loadable Module and the LOAD command is what executes an NLM from the server console. When loaded, an NLM program is dynamically linked to the operating system, allowing the NetWare server to allocate a portion of its memory to it. The amount of memory an NLM program uses depends on the task. Once the NLM performs its task and is unloaded, it returns control of the memory back to the operating system. NetWare has five types of NLM programs:
Disk drivers (.CDM and .HAM extensions) control communication between the operating system and host adapters.
LAN drivers (.LAN extension) control communication between the operating system and the network boards. You can load and unload LAN drivers while the server is running and while users are logged in.
PSM modules (.PSM extension) provide support for multiple processors in server class computers.
Management utilities and server applications modules (.NLM extension) allow you to monitor and change configuration options. For example, you can use MONITOR to view server statistics. Once you finish your tasks, you can unload the utility and free memory for other server functions.
Name space support (.NAM extension) allows non-DOS naming conventions to be stored in the directory and file naming system.
Some NLM programs, such as utilities, can be loaded, used, and then unloaded. Other NLM programs, such as LAN driver and disk driver NLMs, must be loaded every time the server is started.
Note: If you want certain NLMs to load each time you start the server, you can have them load automatically from NCF files (such as startup.ncf and autoexec.ncf).
Most NLM programs included with NetWare are copied to the SYS:SYSTEM directory during installation. As you acquire additional NLM programs, decide where you want to copy them. The operating system must be able to find the NLM programs when a LOAD command is issued. NLMs can be copied to the SYS:SYSTEM directory, to any network directory on a NetWare server, or to a local drive of the NetWare server.
Note: You can use the SEARCH ADD <Number> <New Path> command to tell the NetWare operating system to look into other directories for NLM programs. Type SEARCH /? <Enter> at the console prompt to see all of the parameters of the SEARCH command.
There are several parameters or options that are available with the LOAD command syntax:
LOAD [protected | restart | address_space_name] [ path ] loadable_module [ parameter... ]
Memory Protection Parameter
|
Function
|
protected module_name |
Load one module into a new protected address space. By default the space is named ADDRESS_SPACEn, where n is a number. If you want to load more than one module into the same address space, use the address space parameter instead of the protected parameter. |
restart module_name |
Load one module into a new protected space with restart functionality. By default the space is named ADDRESS_SPACEn, where n is a number. Restart functionality means that if the protected space abends, the system closes the space, cleans up its resources, restarts the space, and reloads modules into it. |
address space = address_space_name module_name |
Load one module into a new protected address space with a user-defined name. Use this command when you want to define your own name for the space and when you want to load more than one module into the same address space. You can specify only one module at a time to load into the address space, but you can repeat the command for each module you want to load into the space. |
Option
|
Function
|
path |
Specify the path to the loadable module, if you moved it from the default directory of SYS:SYSTEM or C:\NWSERVER. |
loadable_module_name |
Specify the name of the loadable module. |
parameters |
Include parameters for the module you are loading. Parameters that can be used with most modules are explained in the table above. Individual modules may have specific parameters of their own; see the documentation for that particular NLM. |
So, to load a module called DATABASE.NLM in a protected address space, you would type:
[LOAD] PROTECTED DATABASE.NLM
To load a module in a protected address space and flag the address space as restartable, you would enter:
[LOAD] RESTART GRPWISE
Note: The PROTECTED option is not necessary if either RESTART or ADDRESS SPACE are specified on the command line.
If the NLM is stored in the sys:system directory or if you have a server search path to the directory where the NLM resides, enter just the NLM name (instead of the complete path).
Since NetWare 5.0, you can load an NLM by entering just the name of the NLM at the console prompt, unless there is an .NCF file of the same name as the NLM. In this case, you must use the LOAD command. Using the LOAD command tells the server to load the NLM instead of executing the other file of the same name.
Note: LAN and disk drivers or the MONITOR utility are not candidates for protected address space because they must run in the kernel. For example, MONITOR makes system calls that the call gate doesn't allow between protected space and the kernel.
Because NetWare 5.x supports NLM programs running in user mode (ring 3), server-based network applications, such as GroupWise, Lotus Notes, and Oracle, can have their own execution environment. You can also load shared libraries such as CLIB in more than one space (point one copy to two places). Multiple instances share code but have different data. Because each instance of the module must be loaded at the same logical address in each address space, that place is reserved across application spaces when you load the shared library in the first address space.
Loadstage
When you start NetWare, the NWKCFG.NLM contains information the Kernel uses for managing and executing the load order template. The template consists of a number of stages, with stages 0-5 defined as Kernel stages. Each stage consists of a template entry for each NLM to be loaded and the order to be loaded in, including path information on where to load the NLM from.
The Loadstage command is typically used for device driver development. In such instances, developers will load SERVER.EXE without running the AUTOEXEC.NCF and STARTUP.NCF files (for example, SERVER /NA /NS <Enter>), thereby only loading the NLMs that are listed in Stage 0. This allows just enough of the server operating system to be loaded so developers can debug their device drivers, such as LAN drivers (the LSL and other LAN drivers are typically loaded in Stage 1).
Then if the device driver works, the developer can then type LOADSTAGE 1 <Enter> and load up the rest of the device drivers to see how the device driver being developed plays with the other NLMs on the block. The developer can then load the next stage to see how the device driver is working, and on until all stages are loaded.
The syntax for the LOADSTAGE command is as follows:
LOADSTAGE x
where the x designates want stage you wish to load. To load all of the stages that have not been loaded, type
LOADSTAGE ALL
To see which NLMs and device drivers are loaded at each stage, use the List Stage command. At the server console prompt, type the following:
LIST STAGE <Enter>
Magazine Commands
The MAGAZINE command is a response command that you can use following a prompt from the server; the command won't do anything unless you are first prompted to respond by the server. You would use this command at the server console in response to the screen prompts "Insert Magazine" or "Remove Magazine," referring to media magazines or hardware devices that hold several pieces of media.
For example, say you have a hardware device, like a stand-alone data storage/tape drive unit or magazine connected to your server and you remove the magazine. Assuming everything is properly configured, you should receive a prompt from the server asking you to confirm the state of the magazine by using the MAGAZINE command and one of its parameters, as appropriate.
The syntax is as follows:
MAGAZINE [ parameter]
Parameter
|
Function
|
Inserted |
Confirms that the media magazine was inserted in response to the "Insert Magazine" prompt or console alert. |
Not Inserted |
Confirms that the media magazine was not inserted in response to the "Insert Magazine" prompt or console alert. |
Not Removed |
Confirms that the media magazine was not removed in response to the "Remove Magazine" prompt or console alert. |
Removed |
Confirms that the media magazine was removed in response to the "Remove Magazine" prompt or console alert. |
Media Commands
The MEDIA command is another response command that is only necessary following a prompt from the server, to respond to the screen prompts "Insert Media" or "Remove Media", referring to a specific piece of media.
The syntax is as follows:
MEDIA [ parameter]
Parameter
|
Function
|
Inserted |
Confirms that the specified media was inserted in response to the "Insert Media" prompt or console alert. |
Not Inserted |
Confirm that the specified media was not inserted in response to the "Insert Media" prompt or console alert. |
Not Removed |
Confirm that the specified media was not removed in response to the "Remove Media" prompt or console alert. |
Removed |
Confirm that the specified media was removed in response to the "Remove Media" prompt or console alert. |
Memory
The MEMORY command allows you to display the total amount of installed memory that the operating system can address. The syntax is:
MEMORY
Note: On PCI bus computers, NetWare 5.x can address up to 4 GB of memory.
Console Command
|
Function
|
Example
|
LOAD |
Allows you to link NLMs to the operating system, including disk drivers, LAN drivers, NLM programs, platform support modules, and name space modules. |
[LOAD] PROTECTED DATABASE.NLM |
LOADSTAGE |
Allows programmers to load portions of the NetWare operating system in order to test their device driver implementations. |
LOADSTAGE 1 |
MAGAZINE |
Allows you to respond to a specific server prompt regarding the status of server media magazines or devices. |
MAGAZINE INSERTED |
MEDIA |
Allows you to respond to a specific server prompt regarding the status of server media. |
MEDIA REMOVED |
MEMORY |
Allows you to display the total amount of installed memory that the operating system can address. |
MEMORY |
* Originally published in Novell AppNotes
Disclaimer
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.