Collecting the Sample of Data on Linux
There is no native version of VRAdvisor available on the Linux platform. If VxVM is installed on your system, use the vxstat command to collect data for analysis. If VxVM is not installed, you can collect data using the sar command and use the script provided with VRAdvisor to convert the output of the sar command into the VRAdvisor format. Use the Windows client to analyze the data that was collected in the vxstat or csv files.
On Linux, collect the sample of data using one of the following methods:
Collecting Data Using the vxstat Command
If VxVM is installed on your system, use the vxstat command to collect data.
To collect data using vxstat
-
Set the locale to C:
# export LC_ALL=C
-
To collect the data in the format required for analysis, use the following command with exactly the parameters shown:
# vxstat -g dgname -i interval -c count volumes > filename
where:
interval is the data collection interval in seconds.
count is the number of samples to collect.
volumes is a list of volume names separated by spaces.
For example, use the following command to collect a sample of data every 120 seconds and to collect 5040 samples. The volumes are the data volumes hr_dv01 and hr_dv02 in the disk group hrdg. The results are collected in the file vra_in.
# vxstat -g hrdg -i 120 -c 5040 hr_dv01 hr_dv02 > vra_in
After the data collection completes, the file filename (for example, vra_in) contains the sample of data in the vxstat format, which can be used for analysis by VRAdvisor. To proceed, see Analyzing the Sample of Data.
Collecting Data Using the sar Command
If VxVM is not installed on your system, collect data using the sar command and use the script provided with VRAdvisor to convert the output of the sar command into the VRAdvisor format.
To collect data using sar
-
Set the locale to C:
# export LC_ALL=C
-
To collect the data in the format required by the conversion script, use the following command with exactly the parameters shown:
# sar -bd interval count > filename
where:
interval is the data collection interval in seconds.
count is the number of samples to collect.
For example, use the following command to collect the buffer and device activity every 120 seconds and to collect 5040 samples. The results are collected in the file sar_out.linux.
# sar -bd 120 5040 > sar_out.linux
The sample of data that you have collected now needs to be converted to a format which can be analyzed with VRAdvisor. Proceed with the following section to run the appropriate conversion script.
Converting the Data to the Required Format
After the data has been collected with the sar command, run the conversion script located in the following directory on the VERITAS software disc containing VRAdvisor:
volume_replicator/tools/vradvisor/scripts/sar2csv_linux.pl
To convert the sar data for Linux
-
Ensure that perl is installed on the system on which the script is to be run.
Note
The script can be run on any system that has perl installed. It does not need to be the same system on which the sar command was run.
-
To run the script, use the following command:
# perl sar2csv_linux.pl sar_out.linux > vra_in.linux
The resulting file, vra_in.linux, contains the sample of data in the VRAdv CSV format, which can be used for analysis by VRAdvisor. To proceed, see Analyzing the Sample of Data.
If the sar2csv_linux.pl script cannot determine the time stamp from the specified input files, then the command may fail with the following message:
Cannot determine timestamp information from sar_out.linux. Please provide data collection interval in seconds
In this case, use the following command to run the script:
# perl sar2csv_linux.pl <sar_data_file> <interval_in_seconds> > \
<csv_data_file_name>
For example, use the following command for an time interval of 5 seconds:
# perl sar2csv_linux.pl sar_out.linux 5 > vra_in.linux
|