Wednesday, December 4, 2013

How to monitor Unix resources from controller

There is no need for any Load Runner installation to be on a Unix/Linux Machine to be monitored.

However, the machine must have the default RSTAT daemon installed and running. The controller establishes a UDP socket connection with the UNIX machine. It first communicates with port 111 on the Unix machine and this port is then mapped to the dynamic port on which the rstatd is working. The controller then queries rstatd and all communication takes place through this established UDP socket connection.

Starting the rstatd process in Unix
To monitor UNIX resources, you must configure the rstatd daemon. Note that the rstatd daemon might already be configured, because when a machine receives an rstatd request, the inetd on that machine activates the rstatd automatically.

To verify whether the rstatd daemon is already configured:
The rup command reports various machine statistics, including rstatd configuration. Run the following command to view the machine statistics:
>rup host
A remote host will only respond if it is running the rstatd daemon. If you do not receive a response, or if you receive an error message, the rstatd daemon is not configured.

To configure the rstatd daemon:

 Run the command: su root
  • Go to /etc/inetd.conf and look for the rstatd row (it begins with the word rstatd). If it is commented out (with a #), remove the comment directive, and save the file. From the command line, run:
  • > kill -1 inet_pid 
  • where inet_pid is the pid of the inetd process. This instructs the inetd to rescan the /etc/inetd.conf file and register all daemons which are uncommented, including the rstatd daemon. 
  •  Run rup again.
If the command still does not indicate that the rstatd daemon is configured, contact your system administrator.

Which port is rstatd daemon running on:
You can run a UNIX utility called rpcinfo and identify the rstatd's port number. By running
> rpcinfo -p
you will receive a list of all RPC servers registered in the host's portmapper, along with the port number.

Error: "failed to create agent channel " during Citrix recording with Citrix

During Citrix Recording or Replay with Citrix Client 10, the we may encounters the following 

error: "failed to create agent channel".

The solution for this problem is just as follows

Open a notepad and copy paste the following entries to it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Third Party\CustomVC]

"VirtualChannels"=""

[HKEY_CURRENT_USER\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Third Party\CustomVC]

"VirtualChannels"=""

save the notepad on desktop as a .reg file (like "citrix.reg")
Then close the notepad and go to desktop and double-click the file you saved.
It will add the entry to your registry. After that re-login to your windows session and record the application again.

How to Allow a Particular Port Communication over Firewall

 The firewall is always enable in professional environment due to security issue. Sometime during testing, we need some ports which should be allowed to communicate over enabled firewall.

Steps to enable the firewall :

Step 1: Navigate to Control Panel->All Control Panel Items>Windows Firewall

Step 2: Click on Advance settings link





Step 3: Click on “Inbound Rules”





Step 4: Click on “New Rule”


Step 5: Select “Port” and click on “Next”






Step 6: Enter the port number in “Specific local ports” and click on next





Step 7: Select “Allow the connection” and click on next




Step 8: In this section you can choose in which network you want allow this port for communication purpose.





Step 9: You can give name of port (it can be anything like general name)





Step 10: You can see the added port as below. You can disable, delete or modify the rule anytime.



You can also configure outbound/outgoing communication of port using same process but you need to select “Outbound Rule” instead of “Inbound Rule”.and also you can also block the port or allow communication only when connection is secure. Same way you can also allow/block any application over enabled firewall.

How to backup emails in Outlook and How to Create .PST file from Outlook

Email are now a days playing a crucial role in every software industry. But sometime due to some mishap with your system or automatic deletion by company can make you lose your important mails. It is always to good have practice to create backup of your emails.
There is way by which we can create backup of emails of outlook. That way is creating .PST file of our outlook.

There are two types of files of outlook:

1. .OST: .OST stands for Offline Storage Table. OST files store the offline work and as soon as the server is connected and MS Outlook turns online. But it get stored in default location.Due to OST files, you can work offline as well and server is automatically synced

2. .PST: .PST stands for Personal Storage Table. You can create it and save your information. It is always recommended that we should keep PST file in different location

Outlook Data Files (.pst and .ost) created by using Microsoft Outlook 2010 are saved on your computer in the "My Documents\Outlook Files" or "Documents\Outlook Files folder".

How to create an Outlook Data File (.pst):


1.On the Home tab, in the New group, click New Items, point to More Items, and then click Outlook Data File.




2.In the Create or Open Outlook Data File dialog box, in the File name box, type the name as you want it to appear in the Outlook Navigation Pane, and then click OK.

3.By default, data files are not password-protected. To add a password to your data file, under Password, type that password that you want to use in the Password and Verify Password text boxes.

Now you can open this .PST file anywhere with outlook.

Configuration/Troubleshooting the setup of Controller and Load Generator Machines

General Firewall setup:

The MI Listener can be decided by selection through Admin Site in Performance Center. This selection does not need to be changed generally.



Note
: If Controller and MI Listener are on different machines, then port 50500 needs to be opened between Controller and MI Listener machines.

Steps to setup monitor/running Vuser over firewall
General Setup steps:

Shut down LoadRunner programs (controller, agent…) before the setup. For this, you may need to kill processes magentservice.exe and wlrun.exe through Task Manager -> Processes (as shown below).




Set up on Over the Firewall Agent (Load Generator machine):

a. Go to agent machine (Load Generator machine).

b. Click Start –> Programs -> Mercury Performance Center -> Advanced Settings -> Agent Configuration



c. Check the options Enable Firewall Agent and Enable Terminal Services.




d. Click Settings button.





i. Set MI Listener Name to IP of MI listener machine.

ii. Set Local Machine Key to a symbolic identifier. For example, uap058_ofw.

e. To start the Performance Center agent as service, go to Command prompt and go to F:Program FilesMercuryPerformance Centerlaunch_servicebin folder in Load Generator machine (the drive may be different depending on, in which drive the Mercury Performance Center was installed. Now, run following commands in Command prompt.

To stop LoadRunner agent as service:

magentservice.exe – remove

To start LoadRunner agent as service:

magentservice.exe – install

To stop LoadRunner agent as process:

magentproc.exe – remove

To start LoadRunner agent as process:

magentproc.exe – install
Note:

(1) Make sure that Performance Center Agent is running by "Local System Account" (select the radio button as shown below after going to Start -> Settings -> Control Panel -> Administrative Tools -> Services -> Right Click on “Performance Center Agent” -> Click on “Log On” and then stop/start the service again from there).



(2) Make sure that the Performance Center Agent runs as Service only, so that once you logout of the Load generator machine, the LoadRunner Agent should still continue running. Also, it should be set to run as “Automatic”, so that when Load Generator machine goes down, then the Performance Center Agent should run automatically, once the machine is up. This can be verified by checking “Performance Center Agent Service” in Start -> Settings -> Control Panel -> Administrative Tools -> Services. It also shows whether the Agent Service is started/running. An alternative way to see the Service is through right click on My Computer -> Manage -> Services and Applications -> Services.

(3) The Performance Center Agent service must be running in Controller machine
too. Go to Controller machine and perform above step (e) to make sure that the
agent is running.

(4) When the Performance Center Agent Service starts as process on Controller
machine, an icon of Performance Center Agent will show up in Tray bar. To see
the Agent Run log, you can right click this icon and click “View Agent log”.

2. Setup on Controller machine:


a. Go to controller machine and launch the controller for a script.

b. Add a new Load Generator (Click Generators -> Add). Provide name as the local machine key name provided in the Agent Configuration in the Load Generator machine (for example: uap058_ofw).



c. Highlight the agent and click on Details and go to the Firewall tab. You will see the following ‘Load Generator Information’ window:



f.For Running Vuser Over Firewall:
  •  Check the check box for ‘Enable firewall’
  • Check the button for ‘Enable running Vuser over Firewall’
  • On the field for MI Listener, enter the IP address of the Controller that was configured in the Load Generator machine (step 1.(d) above).

g. Start LoadRunner agent on both ends (controller and load generator), using the commands in Step 1.(e) above.

h. Highlight the Agent and Click “Connect”.

Known problems and limitation:
You need to open up port 443 (bi-directional) for allowing incoming and outgoing communication on MI Listener machine.
You need to open up port 50500 between Controller and MI Listener, if the Controller and MI Listener machines are different.

Troubleshooting tips for connection issues between the MI Listener and the Agent machine

  • Make sure that you do not have any Web Servers, like IIS or Oracle HTTP servers running on both the machines. These servers uses/block port 443 and will cause a problem on launching LoadRunner agent.
  •  To verify that port 443 is open to allow communication between these machines, go to the agent (Load Generator) machine, launch DOS prompt and type in the command ‘telnet 443’ . For example,

telnet 128.11.147.150 443

If port 443 is open then you should see a connected telnet session window. If you do not see this, check with your Network admin/Firewall group to ensure that port 443 is open or not.

· The “Performance Center Agent Service” must be running either by ‘System User account’ or by a user who has administrative privileges on this machine (Username and password details need to be provided). These details can be found by right click on the service in Start -> Settings -> Control Panel -> Administrative Tools -> Services -> Performance Center Agent Service.

Additional tips:

· If you see the “Page can not be displayed” error in Performance Center web page(s), then login to Performance Center Web Server box and make sure that “Apache Tomcat” service is started (as shown below).



Question – The default user id named ‘admin’ was configured to login to Performance center Load test. It is not working now.

A.1 – The first step is to make sure that the user name and password is written correctly. The password is case-sensitive.

The default administrator account is Admin, Admin for the user and password.

A.2 – The second step perform in case that the first is not working, is the following:

• Open Documents And SettingsAll UsersApplication DataMicrosoftCryptoRSAMachineKeys and delete the entry that begins with f9416f003254e610da1f9bad8e4c383_.

• Restart IIS. Choose Start > Programs > Administrative Tools > Services. Select IIS Admin Service and click Restart Service.

What is IIS server and how to install IIS Server in your computer

What is IIS server and how it is useful for us?

IIS stands for Internet Information Services. It can also commonly known as Internet Information Server.Sometime creating test bed we need to install IIS. IIS is Microsoft server is software provided with MS operating system which handles all the HTTP/Https requests. It is a part of windows component.IIS server is used for displaying web pages on your system at local level which can open on other systems as well

There are various parts of IIS. In which following are compulsory to install :

  1. Common Files: The main files and services included with IIS
  2. Documentation: Files of the Default Web Site, files containing IIS error messages and the basic HTML documentation
  3. Internet Information Services Snap-In: An application for managing IIS from the Microsoft Management Console
  4. World Wide Web Server: Represents HTTP services in compiled form.
  5. Below are optional components of IIS server:
  6. File Transfer Protocol (FTP) Server: It is included in the system provides support for an FTP account.
  7. NNTP Service: Service to host newsgroups
  8. SMTP Service: This is email server service
  9. FrontPage 2000 Server Extensions: A communication protocol which provides authoring and administering service
  10. Internet Service Manager :This is used to configure and monitor IIS using WWW pages
  11. Visual InterDev RAD Remote Deployment Support: It is a sub-component that assists in the development of web applications.
Please note that last three components may make your system little vulnerable to security. Kindly avoid installing them until it is required for your application.

Step to install IIS Server:

Method of installing is always same but till Microsoft XP, we require XP cd while installing IIS server. But in higher version we don’t require operating system CDs.

Step 1: Navigate to Control Panel->Programs->Programs and Features.




Step 2: Click on “Turn Windows Features on or off” link

Step 3: Select “Internet Information Service” check box and click on “OK” button.





Step 4: A message will appear




After message box disappear, IIS server has installed successfully on server.

Step 5: Go to “Run “and type “inetmgr” . It will open IIS server.

What is Service Virtualization in loadrunner controller?

HP Service Virtualization is the power tool for development and testing teams to remove delay-causing roadblocks. This visually intuitive software provides development and testing teams building composite applications with a flexible solution to remove constraints by virtualizing services within existing environments both onsite and in the cloud. By enabling parallel development and early functional testing, Service Virtualization eliminates wait times for teams delivering at Agile speed. And, HP Service Virtualization reduces costs, by eliminating the requirement for access to constrained business-critical infrastructure or pay-per-use cloud components for testing.

Key benefits:
  • Remove wait times for constrained services and speed delivery
  • Reduce budgets required to run and manage complex test environments
  • Eliminate expenses from dev/test access to third-party services
  • Reduce downtime risk by engaging quality early
  • Minimize security risk with broader test coverage

How to create LAN connection between two computers

Actually its a general question,we may face this in real time situations.The solution is simple and easy

LAN: Local Area Network as everybody almost aware of it. Let define it , LAN is group of two computers or many computers which share common communication way using a shared device.

We can use remote desktop, communication over LAN and many more by 
connecting multiple PCs together.

Needs to a create LAN between computres:
  • At least two computers
  • Ethernet Cable (Crossover one)
  • Internet connection

On all MS OS (above XP)

Step 1: Navigate to Control Panel-> Network and Sharing Center

Step 2: Select “Local Area Connection”

Step 3: Click on “Local Area Connection” and select “Properties”

Step 4: Select Internet Protocol Version 4 (TCP/IP) and click on Properties





Step 5: Enter Values in IP Address ( It can be anything value , just check using ipconfig command and use it if you want)






Step 6: Enter “255.255.255.0” value in “Subnet mask”

Step 7: Leave other values blank

Step 8: Click on “Ok”

Step 9: Go to Another computer which you want to add in LAN

Step 10: Repeat same steps but IP address should next series of first computer and click “Ok”

Step 11: Restart both computers

Step 12: Navigate to Local Area Network properties again and click on “Sharing” tab (if you want share internet connection)



Step 13: Select the enable internet connection sharing. (It will allow users to share files and folders over network)

NOTE:In XP, go to "Network connections" and other steps are similar as above

Error: Failed to get window size, wrong format. Unable to detect client version. Warning: Extension CitrixClientImpl.dll reports error -1 on call to function ExtPerThreadInitialize Error: Vuser failed to initialize extension CitrixClientImpl.dll in load runner

By using the Citrix protocol we can perform  the load testing in load runner
BestPractice for Citrix applications:

1. You can use "HTTP" and "Citirix" protocol together in load runner.
2. Try to keep windows in full screen mode.


Some time while replaying the recorded script can give some error too.like 

"Error: Failed to get window size, wrong format.
Unable to detect client version.
Warning: Extension CitrixClientImpl.dll reports error -1 on call to function ExtPerThreadInitialize
Error: Vuser failed to initialize extension CitrixClientImpl.dll"


Solution:

1.
Save the script after recording.
2. Go to Script directory and look for "default.cfg” file
3. Open the file into edit mode
4. Add below mentioned code in file and save it
[CITRIX]
DesktopColors=32
Colors=True Color (24 bit)
Enctyption=128 Bit
Window=1024 x 768
Latency=Use Server Default
Compression=1
Cache=0
Queue=0
Sound=Use Server Default
BitmapSyncLevel=Exact
[CommandArguments]
[ModemSpeed]
CustomModemSpeed=
EnableModemSpeed=0
EnableCustomModemSpeed=0
ModemSpeed=14400
[TIMEOUT]
Connect=180
Waiting=60
Typing=150
[FILTERS]
IncludeFiltersInList=
FilterType=0
[AED]
TempAedFile=NO_APP_AT_AED
5. Replay your script.

Hope this helpful..

Citrix Error : Error 2320 in load runner

 "Error 2320"

Citrix is now common practice to make available all application using web interface. Some time while accessing your application which published using Citrix gives an error known as “Error 2320”





Steps to resolve the issue:

1
. Open Registry using “regedit” command on Run window.

2. Make a practice to have backup of registry whenever you are going to modify the registry value since your action can corrupt the windows.so its a best Practise always.

3. If your OS in 32 bit then
i) Go to the HK Local Machine registry key
ii) Access this path “HKLM\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Control”
iii) Remove “ClientHostedApp” key from this.

4. Re-launch Citrix and try to access your application

5. If your OS in 64 bit then
iv) Go to the HK Local Machine registry key
v) Access this path “HKLM\SOFTWARE\Wow6432Node\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Control”
vi) Remove “ClientHostedApp” key from this.

6. Re-launch Citrix and try to access your application.

Hope this will resolve the issue..

Error: "-26668: Could not update controller sync file" during a load test in load runner

When running a script under the Controller and "Snapshot on error" is selected or when running in VuGen and the Run-Time Browser is opened, replay needs to write a "sync" file for the application (Vugen/Controller). The file should be called "ctrlsink.dat" and placed in the scenario result directory. The error occurs when the opening of the sync file using fopen(filename, "w") fails.The solution is

Verify the disk space and permissions

1. Verify if there is enough disk space is available. (Check the environment variable "temp" location, better to have it other than the default user temp location like a temp folder on D-drive or C-drive)
2. Verify if the user has enough permissions to open a file in the specified directory.
3. If specified directory is on a remote machine, check if there was a network/remote machine failure

Note: If you are using LR8.0 or 8.1 make sure you have installed all your feature packs or patches.

Monitoring Weblogic using Load runner

Check in the controller available graphs for Weblogic (JMX) type. most of the times its not availabe,so customize it as follows

1. edit the file (open with a wordpad)
"HP\LoadRunner\dat\onilne_graphs\online_resource_graphs.rmd"

2. Look for [WebLogicJMX]

3. Change: EnableInUi=1
To access the monitors yoy need to do the below steps

a) Download weblogic.jar from server and put it in \classes

b) Remove jmxri.jar from \classes (keep a backup somewhere)

c) Install Java on controller and update the \dat\monitors\WebLogicMon.ini to point to installed java

JVM="C:\Program Files\Java\j2re1.4.2_18\bin\javaw.exe"

JavaVersion=1.4.2_18

Then restart your controller and add the measurements to your weblogic graph.

If you are not able to add the machine and getting a host can't be found error, then do the following steps

Make sure that the host name and IP can be resolved:

From Command Prompt (Start -> Run -> type in cmd.exe):

1
. ping with the machine name and take down the returned IP address.
Example: ping

2. ping with the IP address returned from (a) with -a option.
Example: ping -a 111.111.111.111.

If you have problem on getting the expected information, things you can try includes:

1. Update the host file.
You can try to add the name and the IP address of the WebLogic Server host machine into the hosts file
a. Go to c:\winnt\system32\drivers\etc\
b. Edit hosts in word editor
c. Add the hostname and IP address to the last line.
Example:
127.0.0.1 localhost

After the above changes, try to add the WebLogic monitor again. Please note that you may need to kill the javaw.exe process before adding the monitor. To do so
1. Bring up the Task Manager ( Cntrl-Alt-Delete -> Task manager )
2. Switch to the 'Process' tab.
3. Search for javaw.exe and end the process.

Note: Please note that Weblogic (JMX) monitoring can only be used till weblogic version 9.X. For higher version you need to install sitescope and get the data.

How to run a scenario at a specific time in load runner controller

If you want to run a scenario in controller automatically then use scenario scheduler of Controller or Windows Scheduler

1.Using Scenario Scheduler of Controller:

Open the scenario in the Controller.

Go to Design Tab - Edit Schedule - Scenario Start time 

and set the time when you want to start the scenario.You need to click on Start Scenario button so that the Controller can trigger the scenario once the start time comes up.
2.Using Windows Scheduler:

Scenario Scheduler of Controller is limited to the effect that it can only be sheduled to be run at one time. In order to re-run it the scenario has to be edited again.  you can do the following also:
  • You can have the scenario run from command line in a batch file.
  • Then you schedule this batch file to run at different times from the Windows Scheduler.

How to execute/replay a VuGen script from DOS

Executing a VuGen script from the command line:

Here is the command line that you need to execute to run a VuGen script from the command prompt:

"LoadRunner install dir" \bin\mmdrv.exe -usr "path to .usr file"
Note:In order to get all the other options that go with the command, run mmdrv.exe from the command prompt without any options.

The result collation process fails, is it possible to recover the result data in load runner analysis ?

Do the Collate option  go to Controller - Results -Collate Results.If it fails then, do the following steps

1. On the controller machine, go to Result -> Results setting to verify the result location.
2. Navigate to the result directory on the controller.
3. Locate the file named remote_results.txt and open it in any word editor
4. On remote_results.txt, you will see the location of the .eve file on remote host. For example
MyHost=c:\temp\brr1\netdir\test\myhost_1.eve
5. Go to that specific host, and copy of the .eve file to the controller machine's result directory.
6. Open the Result file ( .lrr) in Analysis .

If the scenario crashed, or ended prematuerly then set "FullData=1" in the lrr file of the result folder:

1. Open the Result file ( .lrr) in notepad
2. Search for the [Data Collection] section
3. Create/modify the value or FullData to 1
Example:
[Data Collection]
FullData=1

This will help in cases that the result files ( *.eve) contains useful data but the Controller did not manage to write to the lrr that it has the data. FullData will be zero in this case. Setting it to 1 will enable you to view what data was saved.

If the result still failed to come up, it is very likely that the _t_rep.eve file in the controller is not completely generated. In order to save what can be saved, run the scenario again, for a short interval(5 mins) saving the results in a folder different than the old results folder. The _t_rep.eve file and the .lrr file in the new result directory need to be edited. In the _t_rep.eve file there is a line (first one) which maybe something like this:

"28 11 1018300521 2 4627103 22735576 5481115"

The 11 is the event code for start scenario.

The 1018300521 is the start time and it needs to be moved backward to match the beginning of the first load test.

The same must be done for the scenario start time specified in the .lrr file. For example,

[Scenario]
Start_time=1018300521

Put here the same number.

After this replace the binary eve files(.eve or .gzl) from the new load test result with the ones collected from the LoadGenerators resulted from old scenario run. Back up the data folder in the new results directory. Copy the data folder from the old results directory in the new results directory. Now the results can be analyzed.

If the exact time of start of the first load test is not known. Select any start time that will definitely fall before the estimated start time of the original scenario. For eg; say 10000 seconds less than the one in the new load test. Make a few iteration until you find out what exactly was the first event's time.

Note:The duration of scenario in the new result will not be accurate.

It is advised not to overwrite the old result directory in these cases since it consists of the summary data and the monitoring data created even before collation.