1. Install glance Pak (the measureware tool included in glance Pak For performance analysis)
Check whether glance Pak has been installed. Check the two license files/var/opt/perf/gkey and mwakey. We recommend that you back up these two files, you can avoid the problem that codeword cannot be installed when you reinstall glance. You can directly install the trial version and copy the two original files to overwrite it to the official version. In addition, when you reinstall glance Pak, you need to stop the midaemon process. Note that the version must be consistent when you install the glance and measureware packages respectively. Otherwise, coredump will appear, use # perfstat-V to check whether the glanceplus and measureware versions are consistent;
2. Modify the/var/opt/perf/parm file (define the name of the application process to collect performance ):
Application = Application name (define the application name as needed)
File = process name (Available * and other adaption)
For example:
Application = Informix
File = onstat
3. Use # MWA status (all command files are stored in/opt/perf/bin) to view the measureware status;
4. Use # MWA start to start the measureware service to collect process performance data and check whether the/var/opt/perf/datafiles/log * file is generated every 5 ~ Update once every 10 seconds. If yes, you can rest assured and remind the user to observe the log growth rate, especially for hosts with insufficient space;
5. Obtain performance data from weeks 1 and 2:
# MWA status
# MWA stop (stop the measureware collection service)
6. Upload the zamdata.txt script using the ascside of ftp.
# Cd/var/opt/perf/datafiles/
# Sh zamscript.txt (collect performance data after measureware starts)
When zamdata.csv
Download the zamdata.csv file in the binfang format of ftp, and then generate a performance analysis report using tools.
Use of glance monitoring commands
Recently, due to the need to frequently write reports to customers, we have studied glance, a powerful and easy-to-use online monitoring tool in a HP-UX system, which has two editions:
Is GPM, the graphics mode, the other is glance, text mode. It can be used on almost any terminal or workstation and occupies very little resources. Any version provides a wide range of system performance information. The default Process List lists general information about system resources and active processes. More details include CPU, memory, disk Io, network, NFS,
System CILS, swap, and system table.
Syntax: glance [-J interval] [-P [DEST] [-f dest] [-maxpages numpages]
[-Command] [-Nice nicevalue] [-nosort] [-Lock]
[-Adviser_off] [-adviser_only] [-bootup]
[-Iterations count] [-syntax filename] [-all_trans]
[-All_instances] [-Disks] [-kernel] [-NFS]
[-PIDs] [-no_fkeys]
Option description:
-J interval: Specifies the interval between screen refreshes. The unit is seconds. The default value is 5 seconds. The value range is 1 ~ 32767
-P [DEST] can enable continuous printing, which is very effective for printing when the screen is refreshed for a long interval,
The output will be directed to a default local printer unless you need to enter device parameters. Once
Run start. You can use the p command to terminate the operation.
-F dest can enable continuous printing, which is very effective for printing when the screen is refreshed for a long interval,
The output will be directed to a given file. Once the operation starts, run the p command to terminate the operation.
Work
-When the-p command is used for maxpages numpages, the-maxpages option can change the maximum number of pages to be printed. The default value is 200 pages.
-The command option is used to set the screen display of different process lists. This key value setting will display different
For detailed commands, see the-Command Option below. Only one command can be selected.
-Nice nicevalue: This option allows you to adjust the priority of the glance process. The default value is-10.
-After the nosort option is set, the screen does not need to display the Process in order, which can reduce the number of glance entries.
CPU overhead of the program
-Lock: This option allows you to lock glance into the memory, which can greatly improve the response time, but there are
You may receive an error message: "unable to allocate memory/swap space". You must cancel this option and run it again.
-Adviser_off allows you to run glance in the suggested mode.
-Adviser_only: This option allows glace to run without screen display on the terminal. It is recommended that you only prompt that it will run and send the result to the standard output. It is recommended that the prompt mode can be run in the background, and the result can be redirected to a file, but it must be used together with the-bootup option.
-Bootup and-adviser_only are used together. The recommended mode is enabled at startup.
-Iterations count: specifies the number of intervals in the glance running time limit.
And the-adviser_only option are used together when no terminal is displayed. After glance executes a specified number of times, the iteration is included in the list and then exits.
-Syntax filename: apply this option to enable custom recommended files.
-All_trans: This option allows glance to list all registered tasks in the system. If not specified, glance only lists filtered items
-All_instances: This option allows glance to display examples of all operation records
-Disks monitoring Disk
-Kernel Monitoring System Kernel
-Use NFS to monitor NFS
-PIDs: monitor Specified Processes
The preceding four Command Option values are directly passed in to midaemon (the performance monitoring interface daemon of HP) and adjusted to the startup parameters of midaemon. If midaemon is already running, these options will be ignored.
-No_fkeys: This option shields the function keys displayed on the Operation screen.
-Command Option List
Command screen displayed/Description
A cpu by processor
C CPU report
D disk report
G Process List
I Io by File System
L network by Interface
M memory report
N nfs by System
T system tables report
U Io by disk
V Io by logical volume
W swap space
A Application List
B global waits
D dce global activity
G process threads
H alarm history
I thread Resource
J thread wait
K DCE Process List
N nfs global activity
P prm group list
T transaction Tracker
Y global system CILS
Z global threads
? Commands menu
Keyboard Command for glance running
S select system/Disk/application/trans/thread
S select to view the process
Files opened by the f process
L Process System Call
M process memory
R process resources
W process waiting status
Screen Display Control Command
Next page B
F Previous Page
H online help
J. Adjust screen refresh interval
O adjust process threshold
P output print termination
E/Q exit glance
R refresh current screen
Y. Reset the nice value of the process.
Z clears statistics
> Display the next Screen
<Display the previous screen
! Call a shell
Display description
When glance is used in text mode, the following screen is displayed:
Proclist cpu rpt mem RPT disk RPT nextkeys slctproc help exit
B0000a glanceplus c.03.71.00 14:08:08 hpdemo01 9000/800 current AVG hig
-------------------------------------------------------------------------------
CPU util | 0% 0% 1
Disk util f | 1% 1% 2
Mem util s suub B | 22% 22% 22
Swap util U ur | 7% 7% 7
Bytes --------------------------------------------------------------------------------------
Process List users = 2
User CPU util cum disk thd
Process name PID ppid pri name (400% max) CPU Io rate RSS CNT
-------------------------------------------------------------------------------
Vxfsd 37 0 138 root 0.0/0.0 0.0 3.3/3.1 1.8 MB 22
The first line shows information about glance itself and the system that runs it. The CPU, disk,
Memory and swap space utilization information. The following sections describe:
I. CPU utilization
The rows that Display CPU utilization start with a bar chart with different shadows. It is divided into several parts to display the CPU usage for different purposes. Each part of this bar chart starts with one character and ends with one character. This character displays four types of information.
The 1. s section shows the percentage of CPU time utilization used for system behavior
2. n shows the CPU time utilization of the adjusted process. These are processes running at a lower priority.
3. The U part shows the percentage of time spent on the user process.
4. The R section shows the percentage of real-time process time utilization.
The rightmost part of the row shows the percentage of CPU usage from startup glance to current, average, and maximum
Ii. Disk Utilization
The disk utilization bar chart has two parts. Similar to the CPU usage bar chart, the following sections show the disk usage percentage for different behaviors
1. Part F shows the behavior of the file system. This is the disk I/O utilization for file read or write operations.
2. V shows the virtual memory behavior. If this part is large, it indicates that the system's physical memory is very tight.
The rightmost part of the row shows the current, average, and highest percentage of disk Utilization
Iii. Memory Utilization
Below the disk utilization bar chart is the memory utilization bar chart. It is divided into three parts
1. s shows the memory used for System Processes
2. The U part shows the memory used for the user program.
3. Part B shows the memory used to buffer the memory.
The rightmost part of the row shows the current, average, and highest utilization, which has the same meaning as CPU and disk utilization.
Iv. Exchange Utilization
The exchange space is divided into two parts by using a bar chart.
1. The U part shows the swap space in use.
2. The R part shows the reserved swap space. Once a process is created, a region is reserved in the SWAp zone, and a reserved zone is not used.
5. Process List
The process list is at the bottom of the screen. This column does not list all processes and only displays those processes that are using system resources. The columns are:
Process name: command name for creating a process
PID process ID
Ppid: process ID of the parent process
The priority of the PRI process. This is a number ranging from 0 to 255. The larger the number, the lower the priority.
User name: the user name used to start the process
The first number of CPU util is the percentage of CPU usage during the previous interval. The second is the percentage of CPU usage since glance was started. Lack of time-saving, glance updates this list every 5 seconds
Cum CPU the cumulative CPU usage of a process
The first digit of disk Io rate is the average disk I/O rate at the previous interval.
Two numeric glance average disk I/O rates after startup
Total amount of RAM used by a process of RSS
Thd CNT thread statistics