Use of the Orleans monitoring tool

Source: Internet
Author: User

In this section, we say several utilities in Orleans, Orleanshost, Orleanscountercontrol, Orleansmanager, Clientgenerator.

1.OrleansHost

This tool is a console application hosted by a host or deployed, let's take a look at his usage.

From there, the direct point is to find the project in the source package and then compile and get what you need.

Another is that when you create a server and then install the Microsoft.Orleans.Server package, compiling the project is also generated under the compilation package.

I am directly compiling the source package to get, as follows:

Some DLLs, it is worth noting that the configuration package, there is a file orleansconfiguration.xsd, this is the server file configuration required XSD validation files, if we do not know the configuration file needs those nodes

You can view the file and copy it into the XML environment of your VS installation directory to get Smart hints, as follows:

C:\Program Files (x86) \microsoft Visual Studio 14.0\xml\schemas

My installation directory, if your installation directory has changed, you can flexibly adjust the

Look at the picture

Then we create the Orleansconfiguration.xml file in the OrleansHost.exe directory with VS Open

Add the root node orleansconfiguration, and then add xmlns= "Urn:orleans", we can get smart hints, such as

Next, we configure a basic configuration file that reads as follows

<?XML version= "1.0" encoding= "Utf-8"?><orleansconfigurationxmlns= "Urn:orleans">  <Globals>    <storageproviders>      <ProviderType= "Orleans.Storage.MemoryStorage"Name= "Memorystore" />      <ProviderType= "Orleans.Storage.MemoryStorage"Name= "Default" />      <!--<provider type= "Orleans.Storage.AzureTableStorage" name= "Azurestore"/> -    </storageproviders>    <SeednodeAddress= "localhost"Port= "22222"/>    <MessagingResponsetimeout= "30s"/>  </Globals>  <Defaults>    <NetworkingAddress= "localhost"Port= "22222"/>    <ProxyinggatewayAddress= "localhost"Port= "40000" />    <TracingDefaulttracelevel= "Info"Tracetoconsole= "true"Tracetofile= "{0}-{1}.log"Propagateactivityid= "false"Bulkmessagelimit= "+">      <TraceleveloverrideLogprefix= "Application"TraceLevel= "Info" />      <!--<traceleveloverride logprefix= "Runtime.dispatcher" tracelevel= "Verbose"/> <traceleveloverride Log prefix= "Assemblyloader.silo" tracelevel= "Warning"/> -    </Tracing>    <StatisticsMetricstablewriteinterval= "30s"Perfcounterwriteinterval= "30s"Logwriteinterval= "300s"writelogstatisticstotable= "true"Statisticscollectionlevel= "Info"/>  </Defaults></orleansconfiguration>
View Code

Okay, let's run this and see, Double-click Startorleans.cmd, the program ran, there is log file generation, probably browse again, not too smooth, there are some errors, fewer DLL references, less orleanscodegenerator.dll,orleansdependencyinjection.dll, and then to The project is generated directly from the source bundle and then copied to the Startorleans directory and run again, as expected, success:

Here I tidy up a orleanshost deployment package: Orleanshost

If necessary, you can download it directly.

Take a look at some of his used parameters:

The work has the following parameters:/? ,/help 、-?、-Help,/debug, Deploymentid=[value], Deploymentgroup=[value].

This time we'll flush the console into the directory where the program is located:

Cmd-> d: CD D:\demo\OrleansHost, as follows:

If we don't have any parameters, the program will start directly.

If below we take the above parameters to see the effect: orleanshost/? This is an order for help.

Orleanshost/debug This is started with a debug environment

Orleanshost Deploymentid=[value] This is a deployment name for the current silo of the deployment and then start (the value here will be set to Siloname in the future)

Orleanshost Deploymentgroup=[value] This value has not been enabled for the time being and may be useful for subsequent versions

There is a tool we will directly develop a good grain compiled program published to the program directory can be, and then restart, do not believe you can try, haha!

2.OrleansCounterControl

In Orleanshost the same directory there is an EXE, that is Orleanscountercontrol

Such as:

Let's first use CMD to enter the directory where the program is located

CD C:\Demo

Next, let's look at what parameters Orleanscountercontrol has

Orleanscountercontrol/r,/register,/U,/unregister,/F,/force,/pause,/?,/help, let's take a look at these parameter commands.

Run as administrator, if Orleanscountercontrol does not take any parameters, it will run some serialization initialization of the service side, output some console logs, and register the Windows counters

/R or/register Windows counter Registration

/U or/unregister cancel Windows counters

/F or/force Delete counters

/pause If there is an exit prompt

/? or/help help tips.

These commands can be used in combination, such as: ORLEANSCOUNTERCONTROL/R/pause

ORLEANSCOUNTERCONTROL/R/?

Summary: The Windows Counter management tool used by this tool for managing programs.

3.OrleansManager

The command line is located under the program directory (this tool is primarily used to view some status information on the server silo or grain on the client, or elsewhere. )

Next look at the command parameters:

Orleansmanager [] [/?] [-?] There are some helpful hints when executing this command

Orleansmanager grainstats [Silo1,silo2,...] is used to view statistics on silo address, number of activations, grain type, and so on.

Fullgrainstats [Silo1,silo2,...] View the status of all grain

Collect [Silo1,silo2,...]

Unregister [Silo1,silo2,...] Unregister

Lookup [Silo1,silo2,...]

Grainreport [Silo1,silo2,...]

The concrete is no longer explained here, everyone in the development process can be explored.

4.ClientGenerator

This tool generates an assembly from an instance of grain or a DLL path to the server-side grain, but it has not been used (if you know how to use it, please inform me that it is appreciated!). )

However, this tool will not work and will not affect development.

Let's talk about it here.

Use of the Orleans monitoring tool

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.