Version PK-4.60
(Nov 22, 1998)
DISCLAIMER: THIS PRODUCT IS SUPPLIED "AS IS". DREAMLAN DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE. DREAMALN ASSUMES NO LIABILITY FOR DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF THIS PRODUCT. |
NDSDir is a NetWare NLM utility to display the name and sizes of all the NDS related file from the hidden SYS:_NETWARE directory. It is a handy tool to determine the total size of your NDS database files, including any backup files (created by DSREPAIR) that may be hogging your SYS: volume disk space!
As an added bonus, NDSDir allows you to copy any and all the NDS-related files from the SYS:_NETWARE directory to a "standard" directory so you can back up these files (see the Uses of NDSDir section below for more information). Although NetBasic shipped with NetWare 4.11 (but not with NetWare 5) and earlier versions of Novell's TOOLBOX.NLM allows you to gain access to the hidden directory, but they cann't manipulate all of the NDS-related files as NDSDir can.
NDSDir also provides a very cost-effective method for backing the NDS of a single-server NetWare 4 or NetWare 5 network. When used in conjunction with FSTrust, you can backup your server with any non-NetWare-aware backup solution!
No special installation steps or program need to be used. Simply copy NDSDIR.NLM and NDSDIR.LIC to a diskette. Starting with v4.51, NDSDIR.NLM may also be loaded from SYS:SYSTEM (make sure you also put the NDSDIR.LIC there).
Without a valid license, this copy of NDSDIR.NLM runs in the demo mode. It will only list the files in your SYS:_NETWARE directory.
If you encounter an error message similar to the following about fmod, ensure MATHLIB.NLM is loaded (it is not auto-loaded by the NLM):
Server-4.10-1586: Loader cannot find public symbol: fmod
NDSDIR.NLM offers an interactive menu interface as well as supports a number of optional command-line parameters (so you can use it in an NCF file):
LOAD NDSDIR -C | -LIST | -REPORT | -NOSORT | -GET | -PUT |
-V volname | -F filename.extIf you load NDSDIR.NLM without any command-line parameter, you'll be prompted for options. The command-line options are described below.
- -LIST dispalys a listing of the SYS:_NETWARE directory is displayed on the cosnole screen. You will see the date/time the file was created/modified, as well as the size (in bytes). By default, the listing is sorted in alphabetical order.
- -REPORT generates a written record of the contents of your SYS:_NETWARE directory. By default, this generates a report file called NDSDIR.LST on the root of your SYS: volume. This file contains the same information as is displayed on the screen but formatted differently. This is useful in keeping track of disk usage over time. The REPORT command will always append to the report file, if it already exits. In the report file, each file is listed one per line. For each file, the file size, date/time stamp, and the file attributes is shown. Please refer to the Uses of NDSDir section below for more discussions about the file attributes. (The NLM's on-line help indicate you can change the name of the report file using the -F option. This is no longer valid if you use command-line options with NDSDir. To change the name of the report file, you need to use the interactive mode. The on-line help will be updated in the next rev. of the NLM.)
- -GET can be used to copy any and all of the NDS files from the SYS:_NETWARE directory to the SYS:DREAMLAN directory (this path is hardcoded). If the GET command is used by itself, i.e. LOAD NDSDIR -GET, all files will be copied from the SYS:_NETWARE directory to the SYS:DREAMLAN directory. You can copy specific files by giving the filename after the GET command (wildcard is allowed). For example, to copy all *.000 files, use LOAD NDSDIR -GET -F *.000 At this time, The GET command may not copy any audit related files (e.g. NET$AUDT.*) nor the SERVCFG.000 file in NetWare 5. (See What's New)
You can place NDSDIR.NLM in your SYS:SYSTEM to facilitate a "batch-mode" GET operation. Use the -Q option (quiet_mode; see below) and use -C simultaneously to avoid prompting.
- -Q is an option that goes with -GET (v4.51 and higher). It will close the NLM status screen automatically upon finish running. This is useful when you wish to automate the GET function.
- -PUT can be used to copy any files from the SYS:DREAMLAN directory (this path is hardcoded) to the SYS:_NETWARE directory. If the PUT command is used by itself, i.e. LOAD NDSDIR -PUT, all files will be copied from the SYS:DREAMLAN directory to the SYS:_NETWARE directory. You can copy select files by giving the filename after the PUT command (wildcard is allowed). For example, to copy all *.000 files, use LOAD NDSDIR -PUT -F *.000. The PUT operation will overwrite any files in the SYS:_NETWARE directory, including any of the *.NDS files (which makes up your active NDS information). To protect files in SYS:_NETWARE directory from overwritten by accident with the PUT command, you are asked to enter an authenicate code. Your personal code is provided later in the Authenication Code section. To provide a small, simple, record of the GET/PUT/ZAP command execution, their actions are recorded into a log file called NDSDIR.LOG, off the root of your SYS: volume. You can not change the name nor the location of this log file. The file is appended to, if it already exists.
- -C puts NDSDir into continuous scroll mode on long displays. Otherwise, the NLM will pause after each screen-full of data.
None of the command-line options are case-sensitive.
Undocumented NDSDir Option
There is a -ZAP command that is not documented in the help built into the NDSDIR.NLM. The -ZAP command allows you to delete any files from the SYS:_NETWARE directory! As a precaution, NDSDIR.NLM will not allow you to delete any files from the SYS:_NETWARE directory that has the ".NDS" file extension. The command option is implemented to allow you to clean up the .OLD files created by DSREPAIR, so you can free up some disk space. There is no default filename for the ZAP option. You must provide the filename as part of the command; however, you can use wildcards. At this time, you can NOT remove any of the audit related files (e.g. NET$AUDT.* files) using NDSDIR.
For example, to remove all .OLD files from SYS:_NETWARE directory, the syntax is: LOAD NDSDIR -ZAP -F *.OLD. Use the ZAP command with extreme caution. Any files deleted from the SYS:_NETWARE directory are automatically purged, without a chance to salvage. (While working on this NLM, we considered having a SALVAGE option to accompany the ZAP command. But to our dismay, we found that any files deleted from the SYS:_NETWARE directory are purged immediately. Therefore, if you are to ZAP any files, we STRONGLY recommand that you use the GET option to make a copy of the file(s) first.)
To protect files in SYS:_NETWARE directory were deleted by accident with the ZAP command, you are asked to enter an authenicate code. Your personal code is provided later in the Authenication Code section.
You should keep this file in a safe place, and separate from the software.
There is a hidden _NETWARE directory on each of your NetWare 4 volume. This is where the volume audit files are located. NDSDir will allow you to move files between SYS:DREAMLAN and the _NETWARE directory of any volume. The only files you can not move are the audit files as mentioned above. This may change with later versions of NDSDir. To access the _NETWARE directory of a volume other than SYS:, use the -V option (or use -A in the interactive mode).
For example, LOAD NDSDIR -V DATA -LIST will list the contents of the DATA:_NETWARE directory. Because there are generally no *.NDS files in the _NETWARE directories on volumes other than SYS:, therefore, NDSDir will, at this time, allow you to delete *.NDS files from those directories. If a later version of NetWare 4 or DS.NLM uses *.NDS files located on other volumes, this feature may be removed to protect your NDS database.
An authenication code is needed when you exercise any one of the GET, PUT, and ZAP command options. This is to protect you from damaging the NDS files accidentically. The protection on the GET command is to prevent people from copying your NDS files, unknowningly.Your authenication code is ----- (not shown here). Please note the case.
n/a
Brief Explaination of NDS Files
Have you ever wondered what the files in this hidden SYS:_NETWARE directory do? Here's a brief run down on the commonly found ones in NetWare 4:
BLOCK.NDS -- contains NDS object information (?) ENTRY.NDS -- contains NDS object trustee information (?) PARTITIO.NDS -- contains NDS partition information VALLICEN.DAT -- contains backlink information (?) VALUE.NDS -- contains NDS object values *.000 -- login scripts *.$AF -- related to audit files MLS.* -- NetWare 4 licenses
Other than using NDSDIR.NLM to list the contents of the SYS:_NETWARE directory, here are some possible applications of this NLM:
NDS backup in a single server environment. If you have a single NetWare 4 or NetWare 5 server environment, NDSDir may be used as a means to backup and restore your NDS database, using the GET and PUT commands. This, however, is NOT recommended nor endorsed if you have a multi-NetWare 4 (or NetWare 5) server environment (i.e. more than 1 NetWare 4 or NetWare 5 server). This is because of the distributed, and replicated, nature of the NDS -- you cannot guarantee that the NDS files on all servers are backed up at the same time.
You should not rely on NDSDir as your production server's NDS backup. There are much more better commercial backup software for this purpose. However, if you are working in a testing environment, NDSDir can be a great tool for you to first backup your NDS, perform your test, and restore if necessary. It is much more convenient than using a backup software. This is also useful in a classroom/training environment.
It is important to keep the Transactional flag (TTS flag) on the *.NDS files. This is one of the reasons why the report file shows the file attributes. If you ever copy any of the NDS files from the SYS:DREAMLAN to a DOS device (such as a diskette) and copy them back to SYS:DREAMLAN, some or all of the file attributes may be lost. The report file can tell you what their origianl attributes are, so you can correctly set them before putting them back into SYS:_NETWARE.
We do not recommend nor endorse the use of NDSDir as an NDS backup solution in a multi-NetWare 4 (or NetWare 5)-server environment. Also see What's New re NetWare 5 NDS files.
Deleting or Swapping Server Licenses in NetWare 4. As we know, the INSTALL NLM can only remove the last licensed installed. So, if you need to remove a license that is in the middle of the chain, it is not easy. Also, if you need to replace one of the licenses with a different one, it is not easy either. However, with NDSDir you can easily delete or swap server licenses using the following procedure.
A. Assume you need to replace the 2-user license whose serial number is "12345678" with a 5-user license:
- At the server console, get a list of your licenses currently installed on the server using the VERSION console command. You will see a list similar to the following:
Maximum number of Licensed Connections: 14 Current License Chain: Serial Number Connections License Type Version ABCDEFGH 10 MAIN 4.10 12345678 2 MAIN 4.10 A1B2C3D4 2 MAIN 4.10(On your license diskette, the license file is called SERVER.MLS. However, once it is installed on the server, the file is named MLS.*. The first license is called MLS.000, the second one called MLS.001, etc.)- Copy from the new license diskette the file SERVER.MLS and call it MLS.001 in SYS:DREAMLAN (since it is the second license file that you wish to replace).
- Use the PUT command to put the new license file back out to the SYS:_NETWARE directory: LOAD NDSDIR -PUT -F MLS.001
- To make the server recognize the new license file, again at the server console, enter the VERSION console command.
B. Assume you need to delete the second 2-user license whose serial number is "12345678":
- At the server console, get a list of your licenses currently installed on the server using the VERSION console command. You will see a list similar to the following:
Maximum number of Licensed Connections: 14 Current License Chain: Serial Number Connections License Type Version ABCDEFGH 10 MAIN 4.10 12345678 2 MAIN 4.10 A1B2C3D4 2 MAIN 4.10(On your license diskette, the license file is called SERVER.MLS. However, once it is installed on the server, the file is named MLS.*. The first license is called MLS.000, the second one called MLS.001, etc.)- Use the GET option to make a copy of all the MLS file (i.e. MLS.*): LOAD NDSDIR -GET -F MLS.*. The GET command puts the files in SYS:DREAMLAN.
- Use the FLAG utility to make MLS.001 and MLS.002 read-writable (i.e. FLAG MLS.001 N). Delete MLS.001. Rename MLS.002 to MLS.001.
- Use the ZAP option to delete MLS.003 from the SYS:_NETWARE directory.
- Use the PUT command to put the "new" MLS.001 license file back out to the SYS:_NETWARE directory: LOAD NDSDIR -PUT -F MLS.001.
- To make the server recognize the new license files, again at the server console, enter the VERSION console command.
The above are just some example usage of NDSDir.
The full version of NDSDIR.NLM is available by registering on-line through the following Web sites:
The NDS tree name is required as it is used to generate a key. The registration cost is $99 US. Canadian registration is $135 CDN plus GST. All other countries, please remit in US funds.
You can also FAX a company Purchase Order to +1 (905) 887-3836. Please make sure you either include your tree name information on the FAX or send a follow up email.
Special site agreements for multiple trees and service providers are available. Although the license does not grant you the right to resell the program (for a profit; but you can charge the customer a service charge for your time). If you are a service provider, you can register copies on behave of your customers (by providing your customer's mailing information -- this is used only for tracking purposes). At the same time, we ask you to send us a separate email indicating that you are registering on behave of your customer and inciate in this email if further software upgrade (free or for a charge) be send to you or the customer directly, and an email address for that purpose.
NDSDir is written in C using WatCOM C optimizing compiler and Novell Developer Kit. No undocumented APIs are used.
Inclusion of this utility on CD-ROMs (except for backup purposes) without permission from DreamLAN Network Consulting Ltd. is expressly prohibited.