The LoadRunner Windows monitors (Windows Resource monitor, Microsoft IIS monitor) collect metrics using NetBIOS (port 139).

The easiest way to create an authenticated NetBIOS session between your LoadRunner Controller and the servers you want to monitor, is to map a drive on each server from the Controller.

Rather than manually mapping drives, you can save some time by creating a batch file to do it for you.

Here is an example batch file that will map drives for you:

REM - This batch file maps a drive on each of the servers in the pre-Prod
REM - environment so that the servers can be easily monitored with LoadRunner.
SET username=jds\jdsadmin
SET password=Welcome1
cd \
REM - Map web servers
NET USE E: \\testw3web01.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE F: \\testw3web02.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE G: \\testw3web03.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE H: \\testw3web04.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE I: \\testw3web05.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE J: \\testw3web06.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
REM - Map various app servers
NET USE K: \\testw3app01.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE L: \\testw3app02.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE M: \\testw3app03.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE N: \\testw3app04.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE O: \\testw3app05.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE P: \\testw3app06.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE Q: \\testw3app07.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE R: \\testw3app08.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE S: \\testw3app09.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE T: \\testw3app10.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
REM - Map MQ servers
NET USE U: \\testw3mq01.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE V: \\testw3mq02.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
REM - Map feeds server (web service consumed by external customers)
NET USE W: \\testw8fed01.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE X: \\testw8fed02.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
REM - Map database servers
NET USE Y: \\testw3db01.jds.local\d$ /USER:%username% %password% /PERSISTENT:no
NET USE Z: \\testw3db02.jds.local\c$ /USER:%username% %password% /PERSISTENT:no
@echo Check that there are no error messages...

Tech tips from JDS


First, thanks Stu this is really handy. I have found that LoadRunner is able to do the whole NetBIOS thing much quicker with the drives mapped, then without having the shares mapped.

A company where I am currently working has decided to disable $ shares. So in order to map drives, which I do, I had to Terminal Surf onto each machine to create a share: Perf, which I could then map using the newly created name.

The only relevance to this article is that, if you are unable to use default share names, go create your own share on Load Generators and other machines you would like to remotely use PERFMON on. The apply the share name to the above batch file.

This batch file would be nice to place in your startup directory: C:\Documents and Settings\\Start Menu\Programs\Startup. This way all of your drives are mapped every time you log onto the machine. If it is global to the machine instead of the idea place it in the: C:\Documents and Settings\All Users\Start Menu\Programs\Startup directory.

Finally some companies are implementing internal security to prevent virus spread by blocking LoadRunners ability to do Windows Monitoring:

Monitor name :Windows Resources. Cannot connect to machine .
Reason: Access is denied.

In order to get around this, I had to go to the head of desktop security, then I had my ID added to a remote access group. After that I could start monitoring my Load Generators again.

Thanks Stu,


Stuart Moncrieff

It should be noted that if you log onto the LoadRunner Controller with an account that has all the right permissions on the servers to be monitored, then it is not necessary to map any drives to create an authenticated NetBIOS connection to the server.

LoadRunner will set up the connection for you automatically.