Monitors the Linux resources of the server during stress testing of LoadRunner.

Source: Internet
Author: User
From: http://blog.csdn.net/marising/archive/2010/01/08/5160210.aspx#1476673

The load test is to monitor the CPU, memory, disk, and network conditions of the server. How to monitor Ubuntu.

1. Install rstatd and sudo apt-Get install rstatd. If you cannot install rstatd, download and install it.

2. Start rpc. rstatd

run the following command to check whether the instance is started properly:
rpcinfo-P

[root @ localhost ~] # Rpcinfo-P
program vers proto port
100000 2 TCP 111 Portmapper
100000 2 UDP 111 Portmapper
100024 1 udp 676 status
100024 1 TCP 679 status
100001 3 UDP 691 rstatd
100001 2 UDP 691 rstatd
100001 1 udp 691 rstatd

3. On the run interface of LoadRunner controller, add the UNIX Resource under system resource graphs, right-click Add measurements on the UNIX Resource graph, and click Add. Fill in the IP address, for example, 192.168.1.99, by default, there are only three metrics. You can add other metrics in the Add section below.

4. The following describes the various metrics.

CPU metrics

  • Average Load
    Average number of processes in the "ready" status at the same time in the last minute, <CPU count * Number of cores * 0.7
  • CPU utilization
    CPU usage time percentage. If it is more than 75%, you can consider changing the CPU.
  • Swap-In Rate
    Number of processes in exchange
  • Swap-out rate
    Number of processes in exchange
  • Context switches Rate
    Number of switches between processes or threads per second
  • System Mode CPU utilization
    CPU usage time percentage in System Mode
  • User Mode CPU utilization
    CPU usage percentage in user mode
  • Interrupt Rate
    Number of device interruptions per second

Memory

    • page-In rate
      Number of pages read into the physical memory per second
    • page-out rate
      Number of pages written to and deleted from the physical memory per second
    • paging rate
      the number of pages that are read into the physical memory or written to the page file per second. If the number persists for several hundred times, the memory may be increased.
In the data collected by LoadRunner, memory usage is not available. Sar can be installed and then observed by SAR: you can use this command to SAR-N Dev-u-r 3 120> perform. log
This command sample once every 3 seconds, 120 times 360 seconds = 6 minutes, you can adjust the values 3 and 120 as needed. Perform. log is the saved file name.

Disk

    • Collision rate
      Number of conflicts detected on the Ethernet per second
    • Disk Rate
      Disk Transfer Rate

Network

  • Incoming packets Error Rate
    Number of errors received per second when an Ethernet packet is received
  • Incoming packets Rate
    Number of incoming Ethernet packets per second
  • Outgoing packets errors Rate
    Number of errors sent per second when an Ethernet packet is sent
  • Outgoing packets Rate
    Number of Ethernet packets transmitted per second

PPS is

The minimum packet length for Ethernet transmission is 64 bytes. The packet forwarding speed is measured by the number of 64 bytes of data packets (minimum packet) sent per unit time.

For Gigabit Ethernet, the calculation method is as follows:
1000 Mbps/(64b + 8B + 12B) × 8bit) = 1.488095pps
Note: When the Ethernet frame is 64 byte, the fixed overhead of the 8 byte leading character and the 12 byte frame gap must be considered.
In Ethernet, each frame header must contain an 8-byte leading character, which is used to tell the listener that data is coming. Then, there must be a frame gap between each frame in the Ethernet, that is, after each frame is sent, wait for a while before another frame is sent. In the Ethernet standard, the minimum value is 12 bytes, however, the frame gap may be larger than 12 bytes in practice. Here I use the minimum value. Each frame has a fixed overhead of 20 bytes. (In addition, the 20 bytes of information cannot be captured by the packet capture software)
Therefore, the packet forwarding rate of a full-duplex Gigabit Ethernet port when forwarding 64 bytes of packets is 1.488 mpps.

The following is a packet forwarding rule for common Ethernet ports:

1. 10 Gigabit Ethernet: 14.88 mpps
2. ge Ethernet: 1.488 mpps
3. 0.1488 Mbps Ethernet: mpps

4. 10G Ethernet: 0.01488 mpps (14.88 KPPS)

========================================================== ========================================

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.