Configuring a Performance Statistics Collection Task
Context
To collect and analyze performance data of services in the system, configure a performance statistics collection task and bind the task to instances. In the performance statistics collection task, you can configure the performance statistics collection cycle and parameters for statistics file generation.
If the performance statistics collection task is busy writing collected statistics into a file, you may need to wait for a while before performance management configurations are successfully delivered. In this situation, a message is displayed indicating that the performance statistics collection task is busy.
Procedure
- Run system-view
The system view is displayed.
- Run pm
The performance management (PM) view is displayed.
- Run statistics enable
The performance statistics collection function is enabled.
By default, the performance statistics collection function is disabled.
- Run statistics-task task-name
A performance statistics collection task is created, and the performance statistics collection task view is displayed.
- Run binding instance-type instance-type { all | instance instance-name &<1-5> }
An instance is bound to the performance statistics collection task.
After an instance is bound to a performance statistics collection task, the system collects the performance statistics about the instance.
When all is specified, instance-type can only be ipfpm.
- (Optional) Run measure disable measure-name
Measurement is disabled for a statistics counter of the instance bound to the performance statistics collection task.
By default, all statistics counters of the instance bound to a performance statistics task are measured.
To add one or more indicators that have been disabled to the performance statistics task again, run the measure enable [ measure-name ] or undo measure disable [ measure-name ] command to enable these indicators.
To view statistics counters of the instance bound to a performance statistics task, run the display pm measure-info [ instance-type instance-type ] command.
- (Optional) Run statistics-cycle cycle
The performance statistics collection cycle is set.
The default cycle is 15 minutes.
- (Optional) Run sample-interval interval
The sampling interval for a performance statistics collection task is set.
By default, the sampling interval varies with the performance statistics collection cycle:
- If the performance statistics collection cycle is 5 minutes, the default sampling interval is 1 minute.
- If the performance statistics collection cycle is 10 minutes, the default sampling interval is 2 minutes.
- If the performance statistics collection cycle is 15 minutes, the default sampling interval is 3 minutes.
- If the performance statistics collection cycle is 30 minutes, the default sampling interval is 5 minutes.
- If the performance statistics collection cycle is 60 minutes, the default sampling interval is 5 minutes.
- If the performance statistics collection cycle is 1440 minutes, the default sampling interval is 15 minutes.
Number of Active Statistics Objects in the output of the display pm brief command shows the number of current statistics objects. When this number exceeds 10000, you are advised to run the statistics-cycle command to set the statistics collection period to 30 minutes or longer, and run the sample-interval command to set the sampling period to 5 minutes or longer.
- (Optional) Configure statistics file generation.
Run the record-file disable command to disable the generation of a performance statistics file.
By default, the system saves performance statistics in a performance statistics file automatic.
Run this command when you do not want the system memory to be occupied by many performance statistics files. After disabling the generation of a performance statistics file, you can still run the display pm statistics task-name data-index index [ instance-type instance-type [ measure measure-name | instance instance-name &<1-5> ] * ] command to view performance statistics.
If the performance statistics file generation function is left enabled, you can run the record-interval interval command to set the number of performance statistics collection cycles after which the system generates a statistics file.
By default, the interval at which the system generates performance statistics files is determined by the performance statistics collection cycle:- If a short performance statistics collection cycle (5, 10, 15, 30, or 60 minutes) is set, the system generates performance statistics files every four intervals.
- If a long performance statistics collection cycle (1440 minutes) is set, the system generates performance statistics files at every one interval.
After the command is executed, the system generates performance statistics files every cycle x interval minutes and automatically saves the performance statistics in the files. The system generates a maximum of four performance statistics files for each performance statistics collection task. If the system generates a new performance statistics file when four performance statistics files already exist, the latest performance statistics file will replace the earliest one.
- (Optional) Configure the function of reporting alarms when the performance statistics exceed the threshold