[Post] How LoadRunner monitors Linux and Windows

Source: Internet
Author: User
How to monitor Linux and Windows using LoadRunner

 

I think this article is comprehensive and the source of the article is unclear. Thank you for sharing it!

PS: To monitor Windows servers, you must enable the five services on the server: Computer Browser, server, Remote Registry, Remote Procedure Call (RPC) locator, and Remote Procedure Call (RPC.

I. MonitoringWindowsSystem:

  1. Monitor Preparation before connectionWork

1) Go to the monitored Windows system, enable the following two services: Remote Procedure Call (RPC) and Remote Registry Service (START-) Run, enter services. msc, and enable the corresponding service ).

2) on the monitored Windows machine: Right-click my computer, choose "manage"> "shared folder"> "shared folder". The shared folder "C $" must be included here (if you do not manually add it ).

3) on the machine where LR is installed, start-> Run, enter \ IP address of the monitored MACHINE \ C $, and then enter the Administrator account and password, if you can see the C drive of the monitored machine, it means that you have obtained the Administrator permission of the machine and can use lr to connect. (LR requires an administrator account and password to connect to a Windows Server for monitoring .)

Problem: When performing step 3, enter \ IP address of the monitored MACHINE \ C $, the monitored system cannot be accessed as Administrator (if you use lr to monitor it in this way, the system will prompt "the network path cannot be found, the User Name input box is gray and the default user is guest.

Solution: This is a security policy setting problem (Administrative Tools> Local Security Policies> Security Options> network access: sharing and security modes of Local Accounts "). By default, the XP Access Method is "Guest only". If you access it, it is fixed to access guest, And the Guest account has no monitoring permission, therefore, you need to change the access mode to the "classic" mode, so that you can log in as administrator. After the modification, execute step 3 again. Enter the administrator username and password to access the C drive of the monitored machine.

OtherwiseOthersProblem), so we have to adopt other methods. On the server's hostLogsAdd a new monitoring log (administrative tool-) Performance log and alarm) in the "counter log" under "and" alarm ", and configure the log, it can also monitor the server's CPU, memory, disk, and other counters. Of course, this method is not monitored using LR.

  2. Use lr to monitor windows

In the controller, right-click the Windows Resources window and select Add measurements, add the IP address of the monitored windows, select the system, and select the metric to be monitored to start monitoring.

  Ii. MonitoringLinux

  1. Preparations

You can verify whether the rstatd daemon is configured on the server in two ways:

① Use the RUP command to report various statistical information of the computer, including the configuration information of rstatd. Run the command RUP 10.130.61.203. 10.130.61.203 is the IP address of the Linux/Unix server to be monitored. If this command returns relevant statistics. The rstatd daemon has been configured and activated. If no meaningful statistical information is returned or an error report is displayed, the rstatd daemon has not been configured or has problems.

② Use the find command

# Find/-name rpc. rstatd. This command is used to check whether the rpc. rstatd file exists in the system. If no file exists, the rstatd daemon is not installed.

Sources. This is a source code that needs to be compiled, downloaded and installed rstatd (can be downloaded at the http://sourceforge.net/projects/rstatd <WBR> address)

After the download, start the installation. The installation steps are as follows:

Tar-xzvf rpc.rstatd-4.0.1.tar.gz

Cd rpc, rstatd-4.0.1/

./Configure-configuration operation

Make-compile

Make install-start Installation

Rpc. rstatd-start the rstatd Process

2) After the installation is complete, configure the rstatd target daemon xinetd. Its main configuration file is/etc/xinetd. conf, which contains the following basic information:

#

# Xinetd. conf

#

# Copyright (c) 1998-2001 SuSE GmbH Nuernberg, Germany.

# Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany.

#

Ults

{

Log_type = file/var/log/xinetd. Log

Log_on_success = Host exit duration

Log_on_failure = Host Attempt

# Only_from = localhost

Instances = 30

CPS = 50 10

#

# The specification of an interface is interesting, if we are on a firewall.

# For example, if you only want to provide services from an internal

# Network interface, you may specify your internal interfaces IP-address.

#

# Interface = 127.0.0.1

}

Includedir/etc/xinetd. d

Here we need to modify/etc/xinetd. the three conf files rlogin, RSH, and rexec under D, change disable = yes in the three files to disable = No (disabled is used in the default {} to disable the service) or set # default: when xinetd is started, the above three services are started by default!

Note: When I configure it myself, if no disable = yes, I will change # default: Off To: Default: on. After restarting (CD/etc/init. d /. /xinetd restart) is viewed through netstat-an | grep 514, and no result is returned. Then, I manually add disable = NO to the last row of the three files, restart Xinetd, and use netstat-an | grep 514 to view the result. The TCP 0 0 0.0.0.0: 514 0.0.0.0: * The listen result indicates that the RSH server has been started.

You only need to ensure that the processes on the Linux machine contain the rstatd and xinetd services and you can use lr to monitor them.

  Two tips:

① Check whether the RSH server is enabled. The TCP listening speed of the RSH server is 514.

[Root @ mg04 root] # netstat-an | grep 514

TCP 0 0 0.0.0.0: 514 0.0.0.0: * listen

If 514 is displayed, the RSH server has been started.

② Check whether it is started: rstatd

Enter the command: rpcinfo-P

If the following information is displayed:

Program version protocol port

100001 5 UDP 937 rstatd

100001 4 UDP 937 rstatd

100001 3 UDP 937 rstatd

100001 2 UDP 937 rstatd

100001 1 udp 937 rstatd

It indicates that the rstatd service has been started. (Of course, PS ax can be used here)

③ Method for restarting xinetd:

In SuSE Linux, perform the following operations:

CD/etc/init. d/

./Xinetd restart

The following command is used in some places on the Internet:

# Service xinetd reload

#/Sbin/service xinetd rstart

I don't know what system is used.

④ How to install RSH and rsh-Server service packages

A. Uninstall RSH

# Rpm-q rsh ---------- view version number

# Rpm-e version --------- Uninstall this version.

B. Installation

# Rpm-IVH rsh-0.17-14.i386.rpm rsh-server-0.17-14.i386.rpm

⑤ When rpc. rstatd is started, the error "cannot register service: RPC: unable to receive; errno = ction refused" will be reported ".

The solution is as follows:

#/Etc/init. d./Portmap start

#/Etc/init. d./nfs start

Then start RPC. rstatd again.

Finally, in the controller, Drag and Drop UNIX resources to the right window, right-click and select Add measurements, add the IP address of the monitored Linux, and select the metric to be monitored.

 Iii. UNIX monitoring

LR monitoring UNIX, Unix first starts a rstatd service

InIBMHow to start the rstatd service in the AIX system:

1. Use telnet to log on to the AIX system as the root user

2. Enter VI/etc/inetd. conf at the command line prompt.

3. Search for rstatd and find

# Rstatd sunrpc_udp udp wait root/usr/sbin/rpc. rstatd 100001 1-3

4. Remove #

5. WQ: Save the Modification result

6. Enter refresh-s inetd at the command prompt to restart the service.

In this way, LoadRunner can monitor the performance of the AIX system.

Note: After inetd. conf is edited on the hp unix system, you must enter inetd-C to restart the inetd service.

On UNIX, you can also run the RUP command to check whether the rstatd program is configured and activated.

If the rstatd program is already running, check the PS-Ef | grep inet process, kill the process, and restart the refresh-s inetd.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.