How to use Windows performance counter
If we want to track performance counters on a single Azure Windows VM, simply copy the binary in Azure Windows VM and run it.
Azure file, which exposes file sharing using the standard SMB 2.1protocol. As introduced by the Azure storage product team, Azure file sharing can also be used to save diagnostic files, such as logs, performance metrics, and troubleshooting. Multiple Azure VM can load the same file and share to write log files in different folders.
The figure in figure 7 shows how to use the Azure file as a repository for performance counter log files generated from different Azure VM.
Figure 7: storing the performance counter log file in the Azure file
You can use simple basic commands to define Azure files through Azure Powershell:
Import-Module Azure
Select-AzureSubscription-SubscriptionName [[SubscriptionName]]
Get-AzureSubscription-current
New-AzureStorageAccount-StorageAccountName [[AzureStorageAccountName]]-Label [[AzureStorageAccountName]]-Location "North Europe"
# find out if you are using the module
(get-module azure). Version
$ctx=New-AzureStorageContext [[AzureStorageAccountName]] [[AzureStorageAccountKey]]
$ctx = New-AzureStorageContext-StorageAccountName [[AzureStorageAccountName]]-StorageAccountKey [[AzureStorageAccountKey]]
# create a new share
$s = New-AzureStorageShare [[shareName]]-Context $ctx
In our example, we define a share name equal to "logshare01":
$s = New-AzureStorageShare logshare01-Context $ctx
To install a shared folder in Azure Windows VM, we can use this command in two Azure Windows VM:
Net use z:\ [[AzureStorageAccountName]]. File.core.windows.net\ logshare01 / u: [[AzureStorageAccountName]] [[AzureStorageAccountKey]]
This command installs the shared folder "logshare01" of the Azure storage account as driver Z:
To store the log files in a different folder, we can change the SysField.XML file value
Z:\ SysParamsLog1\
Fftest01.txttrue201
The contents of the SysField.XML file in test02 Azure VM:
Z:\ SysParamsLog2\
Fftest02.txt true
twenty
one