\[Editor's Note: Share your NT discoveries, comments, problems, solutions, and experiences with products and reach out to other Windows NT Magazine readers (including Microsoft). Email your contributions (400 words or less) to email@example.com. Please include your phone number. We will edit submissions for style, grammar, and length. If we print your letter, you'll get $100.\]
FINDING AND PREVENTING PROCESSOR BOTTLENECKS
If you're running Internet Information Server (IIS), your system's speed and efficiency depend on the server's processor. IIS code is multithreaded for efficient scaling on single-processor and multiple-processor computers and is largely self-tuning. However, you might run into bottleneck problems on the active server, and even on servers with multiple processors.
A processor bottleneck occurs when one or more processes occupy nearly all the time on a computer's processors. You can have a bottleneck on a multiple-processor computer even when only one processor is exhausted if the system doesn't distribute work in the queue to the other processors. In a bottleneck, the ready threads of processes must wait in a queue for processor time. All other activity stops until the queue clears. You can't fix a bottleneck by adding or improving other computer components (e.g., memory, disks, network connections).
To determine whether you're experiencing a processor bottleneck, refer to the following Performance Monitor counters:
- Process: % Processor Time—Processor use attributable to each processor.
- Processor: % Processor Time—Processor use on each processor. This counter reveals unequal distribution of processor load.
- Processor: % Privileged Time—Proportion of the processor's time spent in privileged mode. In Windows NT, only privileged mode code has direct access to hardware and to all memory in the system. The NT Executive runs in privileged mode. Application threads can switch to privileged mode to run OS services.
- Processor: % User Time—Proportion of the processor's time spent in user mode. User mode is the processor mode in which applications, such as IIS services, run.
- System: % Total Processor Time—The sum of processor use on each processor, divided by the number of processors.
- System: Processor Queue Length—Number of threads waiting for processor time. If this value exceeds 2 for a sustained period of time, the processor might have a bottleneck.
HANDLING FILE PROPERTIES
I still use File Manager (winfile.exe) to manage the files on my system. I prefer File Manager over the command-line interface. You can find this 32-bit application in the winnt\system32 directory.
File Manager lets you easily handle and modify several file attributes at once. Use the Shift or Ctrl key and the mouse pointer or up and down arrows to select files or directories. (Shift lets you select multiple files that are grouped together; Ctrl works only with the mouse pointer and lets you select multiple files that aren't listed consecutively.) After you select the files to modify, select the File Manager option you want from the toolbar. If the option you want isn't available on the toolbar, you can add it. To customize File Manager, select Options, Customize Toolbar. Then, select the options you want from the available buttons, and click Add. You can add many useful options, such as file compression and decompression.
AUTOMATIC SOFTWARE INSTALLATION USING WinBatch
Our company is slowly migrating to Windows NT. The variety of PCs we encounter prevents us from using disk cloning to install NT Workstation; instead, we must use installation scripts. We must also install many applications, which is time-consuming and prone to operator error.
WinBatch, from Wilson WindowWare, lets you automatically install software applications. We store most software sources in subdirectories on a shared network drive. WinBatch uses a subroutine that finds the last spare drive letter on a PC and connects to the network drive. The main part of the program installs the application, and a subroutine disconnects the drive and exits.
WinBatch uses key presses rather than mouse clicks for installation. You need at least one key press for every active window that is waiting for input. The installation program must receive these key presses as needed and in the correct order. WinBatch has several functions for sending key sequences to a program's active window. The SendKeysChild function sends the key sequence to the window that you specify. The while statement loops and waits (for 1 second) for the appropriate active window, to avoid sending key sequences prematurely or to the wrong window.
Recording the sequence of keystrokes required and their appropriate active windows is time-consuming. Testing the program also takes time, because the applications might not uninstall correctly if the installation fails. However, WinBatch's benefits are considerable. To download WinBatch, go to Wilson WindowWare's Web site at http://www.windowware.com.
Sometimes you need to copy a group of files onto several 3.5" disks. However, dividing files into groups is time-consuming. A solution is to use the xcopy command. When the disk runs out of space, xcopy gives you the prompt Insufficient disk space on current disk. Insert another disk and type <Return> to continue.... You can then insert a new disk, and press Enter to continue the copy process.
INSTALLING CD-ROM DRIVES
When I install a CD-ROM drive on a machine, I set the drive letter to Z. If you use D, the default drive letter, the CD-ROM's drive letter changes when you add or remove any other types of drives (e.g., hard disks), which adversely affects your software. You can prevent problems if you initially change the CD-ROM drive letter to Z and install your software.
REGISTRY EDITOR FIND AND REPLACE
I recently had to rearrange my disks in such a way that drive D became drive E. One of my applications then quit working because the Registry entries were still pointing to drive D. I couldn't find an easy way to automatically fix my Registry references.
Regedit has a good Find tool, but no Find and Replace. A simple solution I discovered was to export a Registry subtree to a file and use the Find and Replace feature in a text editor (Notepad) to edit the subtree. I was careful not to change the format. Then, I saved the Registry subtree and imported it back to the Registry.
—Edson N. Yamada
I'm a longtime Windows user. I'd like to point out some Windows problems that Microsoft has failed to solve in the past 10 years.
- Interoperability problems between products (even Microsoft products), such as version problems caused by file dumping in shared or system folders, installation and deinstallation conflicts, and conflicting programs.
- Lack of documentation about installing products.
- No easy installation path.
- Product updates that cause other products to crash or malfunction.
The introduction of Microsoft Office puts you closer to solving these problems. However, Office leaves many server problems unsolved, such as the following:
- Every product has a separate installation procedure, with different screens.
- Some products (e.g., Proxy Server, Internet Information Server—IIS) are self-installing, and you must read a lot of documentation and do a lot of investigation on your own before you can use the products.
- Some of the self-installing products prevent your previous applications from working.
- Some products are difficult to uninstall, and their drivers, services, and Registry entries use unnecessary server memory and disk space.
- If you need installation help from Microsoft's technical support, you have to pay for it.
- You must edit the Registry to solve many problems. Editing the Registry is risky, and you are safer using a Registry editor program that gives you a dialog box or a wizard with user-friendly options.
- Microsoft scatters functionality across several screens. For example, when you create a user and change or disable the user's permissions, you must use five programs and sometimes search several dialog boxes.
- You must restart your server every time you install a desktop product. I can understand the need to reboot if you install a new network service, but not if you install only a simple program.
Microsoft can solve many of these problems in Windows 2000 Server (Win2K Server—formerly Windows NT Server 5.0) and its related products. Microsoft needs to include the following functionality:
- One installation and operation interface for all programs; one directory location (i.e., Program Files) for every program; one data directory location (i.e., Shared Data Files) for every program; one installation and deinstallation procedure to add and remove programs easily.
- A full installation manual (more comprehensive than the resource kits) that discusses real-world concerns for every program; installation wizards for check-and-run installations.
- Documentation about which products conflict with one another; documentation about resolving these interoperability conflicts.
- Complete uninstallation options.
- Support after the sale, so that you have help installing your application and getting it to run with your other Microsoft products.
—Roger van Unen
USING NTFS AND DFS TO AUTOMATE PROCESSES
In a large Windows NT environment, creating home directories, assigning permissions, sharing home directories, and mapping drives consumes extensive time and effort. You can use NTFS and Distributed File System (Dfs) to automate these processes.
First, create a folder named Users on your NTFS partition. This folder will include all users' home directories. Second, share that folder and give all domain users full control share permission on the Users folder. Third, open the Network applet in Control Panel, select the Services tab, and add the Dfs service. Select the Users folder as the root Dfs volume. Dfs enables mapping to subfolders under the root volume folder without sharing these folders. Fourth, create a user template with the following configuration in the user environment profile: Connect H to \\Server\users\%username%. Fifth, use this template to add new users.
When you add new users, the template creates a home directory for the users and gives them full NTFS permissions on their home directories. The template also maps drive H to a user's home directory, without sharing the home directory.
If your computer has a CD-ROM drive, you might want to disable the Autorun feature. If the Autorun feature is enabled with a CD-ROM changer, each time you insert a new CD-ROM in one of the trays, Windows NT cycles through every tray in the changer.
You can't disable Autorun through a user interface (UI). To disable the feature for only one CD-ROM, hold down the Shift key while inserting a CD-ROM. To disable the feature permanently, you must edit the Registry or use a policy template file such as the one in Listing 1.
A BUG IN Dr Solomon's Anti-Virus
My company recently experienced a catastrophic crash on two Windows NT 4.0 machines with Service Pack 3 (SP3) installed. We were running Dr Solomon's Software's Anti-Virus program, and we updated it with the company's latest virus definitions.
After the update, the software incorrectly identified the Win32/Marburg virus on both machines and couldn't clean it. This virus affects portable executable (.pe) files but doesn't affect files with a v in the name. Anti-Virus tried to minimize the virus' damage to files by changing the names of all .pe files in each system, renaming them to .v* extensions. Unfortunately, the .pe list includes .dll, .exe, .com, and .sys files. When Anti-Virus renamed these files, it rendered the systems' OSs useless.
Dr Solomon's Web site doesn't provide any information about using a new definition file with a previously installed version of the software, except that the company doesn't stringently test definition files. We checked with the company's technicians, who said that using an incorrect version might lock up your system but won't trash it. However, we had to do a complete reinstallation and restore on both machines.
Two of our technicians spent approximately 40 hours searching for the problem and restoring the two systems. Dr Solomon's experts speculated that our problem was from a new strain of the Marburg virus. However, our technicians found that neither of the systems ever had a virus. Needless to say, we are now looking for new antivirus software.
—Conrad J. Koch
I'm a systems administrator with extensive UNIX experience. My employer is migrating to Windows NT, so I'm studying to be an MCSE. I have some advice for others seeking certification.
First, set aside extra time for your studies. You have a lot of information to absorb, and you'll need all the time you can get. I'm lucky that my employer gives me 5 hours per week (out of a 37-hour work week) to study. However, I can't concentrate very well at work, so I work from home 1 day per week. I also set aside some of my free time to study.
Second, you can't rely on the MCSE training manuals or interactive programs to learn all the information necessary for certification. You must initiate some practical studies of your own, perhaps on your work network or on a home-based network. As a systems administrator, I use my knowledge as I assess the 3000 network PCs at work. However, I experiment on a test network rather than on my employer's production systems. I have a dedicated test PC at work, and I have a small network at home (four PCs). I suggest you get at least one test machine if you can. You can purchase a used 486 at a reasonable cost. If you can afford two machines, I recommend that you set up a small network. All you need is two 10Mbps network cards and cables to connect two PCs. Removable hard disks are inexpensive and let you easily shift between environments. Finally, take advantage of trial software.
USER UNABLE TO CONNECT TO RESOURCES
My company has a client workstation with Windows NT 4.0, Service Pack 3 (SP3), and Novell's intraNetWare client installed. The workstation needs to connect to NetWare resources and NT domain resources.
I added the workstation to the NT domain. Then I added the user ID, which had the same name as the workstation, to the domain. (The company's security department requires that usernames match computer names. In addition, a user can't have multiple IDs.) Having a user ID and a computer ID with the same name in one domain caused problems.
I needed to change the workstation name so that I could distinguish between the user and the workstation when using the NET SEND command. After I changed the name of the workstation (i.e., the computer name), the user couldn't log on to the workstation. The computer responded to a ping, so I knew the machine name had changed on the network. However, the logon dialog box that intraNetWare presented for NT showed the old name.
I rebooted and tried to use the Last Known Good configuration, which didn't work. No one could log on to the workstation anymore, so I had to change the Registry settings from a different machine. I ran regedit and opened the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control Registry key. I performed a search for ComputerName to find the entries to change, and I changed the computer name back to the original name. After I renamed the domain user ID, I removed the computer from the domain, renamed the computer with a nonstandard name (which included the user's name), added the computer back to the domain, and renamed the user ID to its original name. The user's name for all servers was then the same, and the user was able to log on to the workstation.