Use of commercial server AIX resource monitoring and modulation tools
Source: Internet
Author: User
Article Title: use of commercial server AIX resource monitoring and modulation tools. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Performance Optimization and determining the performance bottleneck in the system are one of the main tasks of the system administrator. In a computer system, CPU, memory, hard disk, and network are the main factors that affect the system performance. Therefore, the system performance adjustment mainly lies in how to obtain a balance among these resources, to meet people's expectations for system performance. Performance modulation requires a lot of skills, knowledge, and experience. It cannot be achieved only by analyzing statistics. Performance modulation is sometimes a complex or even very difficult task.
Like other UNIX systems, AIX also provides a wide range of methods for system administrators to cut systems. Here we will briefly introduce several tools in the RS/6000 AIX System for Monitoring and modulation of multiple system resources. Each tool has powerful functions. If you want to have a better understanding of the usage of these commands, please refer to the relevant technical materials or manuals. The commands described here are not limited to a certain aspect of CPU, hard disk, memory, or network resources. They can be used for one or more of these resources.
AIX Monitoring Tool 1. iostat
The iostat command monitors the load of system input/output devices by observing the active time of the physical disk and their average transmission speed. According to the report generated by the iostat command, you can determine whether a system configuration is balanced and balance the input/output load between the physical disk and the adapter accordingly.
The iostat tool is designed to monitor disk utilization (tm_act field) and detect system I/O bottlenecks. Iostat can also be used to identify CPU problems, assist in capacity planning, and provide relevant materials for final I/O problems. Used Together with vmstat and iostat to capture the required data for determining performance issues related to the CPU, memory, and I/O subsystems.
The iostat command can generate the following four types of reports:
• Tty and CPU utilization
• Disk Utilization
• System throughput
• Adapter Throughput
2. netpmon
The netpmon command can monitor system events and performance of network behaviors and CPU consumption of network behaviors. The netpmon Command reports network behavior during a specified monitoring period.
Netpmon runs in the background until the trcstop command is released to terminate it. If the default settings are used, the trace command will be automatically started immediately after the netpmon command. In addition, the trcon command can be used in netpmon to select a time later for tracking. When the trace is terminated with the trcstop command, the netpmon command will output its report and exit. The lack of time-saving reports will be output to the standard output. You can also redirect to a file as needed.
The netpmon command can also be used in offline mode in a previously generated trace. In this case, you need to use the gennames command to generate a file. This file must be generated immediately after the trace is terminated.
The reports generated include CPU usage, network device drive I/O, internet socket call, and Network File System (NFS) I/O information:
• CPU use: the netpmon Command reports the CPU usage of threads and interrupt processors. This command separates the CPU usage of Network-related behaviors from those of other behaviors.
• Network Device Driver I/O: The netpmon command monitors the I/O statistics passed on the Network adapter.
• Internet Socket CILS: The netpmon command monitors the read, recv, recvfrom, write, send, and sendto subprograms on Internet sockets. Each process of ICMP, TCP, and UDP protocols is reported.
• Nfs I/O: The netpmon command monitors the read and write subprograms on the NFS file of the customer, the RPC requests on the NFS client, and the read and write requests on the NFS server.
3. PDT (performance diagnostic tool)
PDT automatically identifies performance problems by collecting and collecting various performance, configurations, and available data. PDT evaluates the current status of the system and tracks changes in the workload and performance of the system. PDT data collection and reporting are easy to use and do not require more management actions.
Although many common system performance problems have characteristics, PDT also tries to use common concepts in systems that are considered to have good performance to help it find problems. These concepts include:
• Balanced use of resources
• Operations within a limited scope
• Determined workload trends
• Error-free misoperation
• Set system parameters as appropriate.
4. ps
Ps commands are the most common commands in UNIX systems. They mainly display statistics and status information about processes in the system, such as process ID, I/O behavior, and CPU utilization. The information provided by the ps command determines how long a process runs, how much CPU time the process uses, and whether the process is punished by the system. You can also use the ps command to determine how much memory the process uses, how much I/O is completed, the priority of the process, and who created the process.
The following command combinations are helpful for managing the RS/6000 AIX system:
(1) display 10 processes that consume the most CPU:
# Ps aux | head-1; ps aux | sort-rn + 2 | head? 10
(2) display 10 processes that consume the most storage space:
# Ps aux | head-1; ps aux | sort-rn + 3 | head-10
(3) display the penalty processes in the system in sequence:
# Ps-eakl | head-1; ps-eakl | sort-rn + 5
(4) display processes in the system in priority order:
# Ps-eakl | sort-n + 6 | head
(5) display the first 10 processes in the system in the order of processing time:
# Ps vx | head-1; ps vx | grep-v PID | sort-rn + 3 | head? 10
(6) display the first 10 processes in the system in the order of actual memory usage:
# Ps vx | head-1; ps vx | grep-v PID | sort-rn + 6 | head? 10
(7) display the first 10 processes in the system in the order of the incoming pages:
# Ps vx | head-1; ps vx | grep-v PID | sort-rn + 4 | head-10
5. vmstat
The vmstat Command reports statistics on core threads, virtual memory, traps, disks, and CPU behavior. In addition, each behavior report is more detailed with percentages, indicating the user State, core State, idle and waiting for disk I/O.
The kernel maintains statistics on the Core Thread, page feed, and interrupt behavior, while the vmstat command accesses the data by using the knlist subroutine and/dev/kmen pseudo device drive. The disk input/output statistics are maintained by the device drive. For disks, the average transmission speed is determined by the number of active time cores used to transmit information. The percentage of active time is calculated from the amount of busy time on the drive during the reporting period.
The vmstat command generates five types of reports:
• Inventory behavior reports
• Fork subprocess status report
• Interrupt status report for each device
• Summary Report
• Input/output behavior report
6. sar
The sar Command reports CPU usage, I/O, and other system behaviors. Sar commands can collect, report, and save system behavior information. If no input file is specified, sar calls the sarc command to access system data.
You can use the cron command to run two shell scripts (/usr/lib/sa/sa1 and/usr/lib/sa2) to provide daily statistics and reports. The crontab file/var/spool/cron/crontabs/adm contains sample sections to demonstrate when cron will run these shell scripts. The data collected in this way is useful for determining the time cycle characteristics of the system and determining the peak usage time.
Note that a considerable number of reads and writes are generated when the sar command is run by itself. Therefore, it is best to run sar statistics without workload to see how much impact sar has on the overall statistics.
7. topas
The topas command is used to monitor various system resources, such as CPU usage, CPU events and queues, memory and paging space usage, disk performance, network performance, and NFS statistics. It also reports the consumption of system resources by processes assigned to different WLM classes. It also reports hot categories of the most popular processes and Workload Manager (WLM) in the system. WLM class information is only displayed when WLM is activated. The topas command defines popular processes as those that use a large amount of CPU time. The topas command does not have the log option, and all information is real-time.
The topas command uses the System Performance Measurement Interface (SPMI) API to obtain relevant information. It is precisely because the spmi api minimizes the system overhead. The topas command uses the perfstat library to call the perfstat kernel extension.
8. truss
The truss command tracks system calls of a process, received signals, and machine errors. The application to be checked can be specified in the command line of the truss command, or the truss command can be mounted on one or more running processes.
AIX modulation Tool 1. fdpr
The fdpr command improves the execution time of user-level programs and libraries and the actual memory usage. The fdr command can be implemented through different operations, such as deleting unnecessary commands and reorganizing code and data. The fdr command is installed in the/usr/bin directory.
The fdpr command applies advanced optimization technology to the original code execution at three different stages to build an optimized executable code for it. The three phases are:
• In Phase 1, fdpr creates an executable program with some instruments added. The original executable program is saved as _ ProgramFile. save, and the new version is named _ ProgramFile. instr.
• In Phase 2, fdpr runs this added executable program for some devices and collects Summary (profiling) data. The summary data is saved in a file named _ ProgramFile. prof. When running the program, you need to provide it with typical input data so that the fdpr command can identify the optimizable part of the code.
• In Phase 3, The fdpr Command Re-sorts executable code using the important information collected in Phase 2. The sorting involves the following tasks:
(1) package the high-frequency Execution Code sequences together.
(2) re-order the parts of the condition to improve the hardware's prediction of the points of the condition.
(3) Remove less-used code.
(4) embedded some popular functions.
(5) Delete the NOP (null operation) command from the re-ordered code.
In addition, the compiler also provides a-qfdpr flag that allows the compiler to add additional information in the code to assist fdpr in re-sorting the executed code. However, if this-qfdpr flag is used, fdpr only sorts those modules compiled with the-qfdpr flag again.
2. schedtune
The schedtune command can set guidelines for jitter, process suspension, time slice, and the length of time that a thread can poll when it is locked.
With schedtune, You can adjust a set of parameters in AIX that affect its memory load control mechanism. The Schedtune command is used to display and modify parameters that are used to detect system memory usage and jitter. The Schedtune command can also be used to modify the penalty and attenuation factors of processes running on the system. Run the schedtune command under the root user to do the following:
• Determine the criteria used to determine jitter.
• Determines which criterion is used to suspend a process.
• The final Jitter
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.