How LoadRunner monitors system resources in Linux
Some time ago, while studying LoadRunner, I used LoadRunner to monitor windows system resources in real time in the stress scenario test. I have summarized the related process in the previous sections, recently, some friends in the group asked me how to monitor system resources in Linux. So I also set up some Linux environments and deployed a web application in Linux, this section describes how to set LoadRuner to monitor Linux system resources in real time.
LoadRunner can monitor Linux system resources in the following steps:
1. Before monitoring Linux, I want to explain that the Liunx system mechanism is roughly the same as that of windows. To monitor and obtain relevant parameters, you must obtain its consent, this is the operating system. Therefore, you must have sufficient permissions and methods to obtain it. For Linux, you must add regions in LR, which is equivalent to windows. In windows, you need to enable many permissions and some remote access processes. Currently, there is no exception in Linux. in Linux, a process is required, that is, the system Daemon rpc. restat, I believe the daemon process is no stranger to everyone. Many services are usually started during Linux system boot. These services are Daemon Processes and run independently of terminals in the background.
Therefore, you must first check whether the system has enabled the rpc service by running the rpcinfo-p command.
As you can see, if four rstatd services are enabled, the rpc daemon service is successfully started. If you do not have this service, you must manually install it.
: Http://heanet.dl.sourceforge.net/sourceforge/rstatd/
Installation: one-time run -- tar-xzvf rpc.rstatd-4.0.1.tar.gz // unzip the installation package
Cd rpc. rstatd-4.0.1 // enter the rpc. rstatd directory
./Configure // configure rc. rstatd for Installation
Make // edit rc. rstatd
Make install // install
2. Restart the port ing service portmap.
/Etc/rc. d/init. d/portmap start // start portmap
Find the portmap service and click OK.
3. Run the rpcinfo-p command to check whether the service is successfully installed and started, as shown in figure 1.
4. Add linux system resource items in the LoadRunner scenario
Note that when we add the linux Resource Service for the first time, an error message may be prompted, indicating that the rpc service cannot be added to the client. If this happens, you may feel disappointed again. Don't worry. If you analyze the cause of the error, you can determine what the rpc service was not obtained remotely and what was hijacked. Let's look at the system firewall, the configuration of cat/etc/sysconfig/iptables needs to be added to the rpc access policy. Therefore, I have disabled the Firewall service and do not need to set a firewall policy. The command is:
Chkconfig iptables on // Enable Firewall permanently
Chkconfig iptables off // permanently disable the Firewall
After the firewall is disabled, add Linux Resources in the LoadRunner scenario, as shown in:
When we see the above charts and graphs, the configuration is OK. We have made some progress by breaking the LoadRunner.
This article permanently updates the link address: