blob: b7a1bc1b579a8e15c2ebc524256101997b43497b [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="SMILA/Documentation/Management,SMILA/Documentation/Crawler,SMILA/Documentation/SesameOntologyManager,SMILA/Documentation/Solr,SMILA/Project Concepts/Performance counters API" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/SMILA/Documentation/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (English)" />
<link rel="alternate" type="application/rss+xml" title="Eclipsepedia RSS Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=atom" />
<title>SMILA/Documentation/Management - Eclipsepedia</title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "http://wiki.eclipse.org/skins/eclipsenova/novaWide.css?116"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="http://wiki.eclipse.org/skins/eclipsenova/eclipsenovaPrint.css?116" />
<link rel="stylesheet" type="text/css" media="handheld" href="http://wiki.eclipse.org/skins/eclipsenova/handheld.css?116" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/header.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/tabs.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/visual.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/layout.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/footer.css" media="screen" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/skins/eclipsenova/IEpngfix.css" media="screen" /><![endif]-->
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE50Fixes.css?116";</style> <![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE55Fixes.css?116";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/skins/eclipsenova/IE60Fixes.css?116";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/skins/eclipsenova/IE70Fixes.css?116";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/skins/common/IEFixes.js?116"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "eclipsenova";
var stylepath = "/skins";
var wgArticlePath = "/$1";
var wgScriptPath = "";
var wgScript = "/index.php";
var wgServer = "http://wiki.eclipse.org";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "SMILA/Documentation/Management";
var wgTitle = "SMILA/Documentation/Management";
var wgAction = "view";
var wgRestrictionEdit = [];
var wgRestrictionMove = [];
var wgArticleId = "18604";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "309801";
var wgVersion = "1.12.0";
var wgEnableAPI = true;
var wgEnableWriteAPI = false;
/*]]>*/</script>
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/wikibits.js?116"><!-- wikibits js --></script>
<!-- Performance mods similar to those for bug 166401 -->
<script type="text/javascript" src="http://wiki.eclipse.org/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=eclipsenova"><!-- site js --></script>
<!-- Head Scripts -->
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/ajax.js?116"></script>
<style type="text/css">/*<![CDATA[*/
.source-xml {line-height: normal; font-size: medium;}
.source-xml li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for xml
* CSS class: source-xml, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-xml .de1, .source-xml .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-xml {}
.source-xml .head {}
.source-xml .foot {}
.source-xml .imp {font-weight: bold; color: red;}
.source-xml .ln-xtra {color: #cc0; background-color: #ffc;}
.source-xml li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-xml li.li2 {font-weight: bold;}
.source-xml .coMULTI {color: #808080; font-style: italic;}
.source-xml .es0 {color: #000099; font-weight: bold;}
.source-xml .br0 {color: #66cc66;}
.source-xml .st0 {color: #ff0000;}
.source-xml .nu0 {color: #cc66cc;}
.source-xml .sc0 {color: #00bbdd;}
.source-xml .sc1 {color: #ddbb00;}
.source-xml .sc2 {color: #339933;}
.source-xml .sc3 {color: #009900;}
.source-xml .re0 {color: #000066;}
.source-xml .re1 {font-weight: bold; color: black;}
.source-xml .re2 {font-weight: bold; color: black;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "http://wiki.eclipse.org/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><link rel="stylesheet" type="text/css" href="Management.html" /> </head>
<body class="mediawiki ns-0 ltr page-SMILA_Documentation_Management">
<div id="globalWrapper">
<div id="column-one">
<!-- Eclipse Additions for the Top Nav start here M. Ward-->
<div id="header">
<div id="header-graphic">
<img src="http://wiki.eclipse.org/skins/eclipsenova/eclipse.png" alt="Eclipse Wiki">
</div>
<!-- Pulled 101409 Mward -->
<div class="portlet" id="p-personal">
<div class="pBody">
<ul>
<li id="pt-login"><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/Management">Log in</a></li>
</ul>
</div>
</div>
<div id="header-icons">
<div id="sites">
<ul id="sitesUL">
<li><a href="http://www.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/eclipseIcon.png" width="28" height="28" alt="Eclipse Foundation" title="Eclipse Foundation" /><div>Eclipse Foundation</div></a></li>
<li><a href="http://marketplace.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/marketplace.png" width="28" height="28" alt="Eclipse Marketplace" title="Eclipse Marketplace" /><div>Eclipse Marketplace</div></a></li>
<li><a href="https://bugs.eclipse.org/bugs"><img src="http://dev.eclipse.org/custom_icons/system-search-bw.png" width="28" height="28" alt="Bugzilla" title="Bugzilla" /><div>Bugzilla</div></a></li>
<li><a href="http://live.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/audio-input-microphone-bw.png" width="28" height="28" alt="Live" title="Live" /><div>Eclipse Live</div></a></li>
<li><a href="http://planeteclipse.org"><img src="http://dev.eclipse.org/large_icons/devices/audio-card.png" width="28" height="28" alt="PlanetEclipse" title="Planet" /><div>Planet Eclipse</div></a></li>
<li><a href="http://portal.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/preferences-system-network-proxy-bw.png" width="28" height="28" alt="Portal" title="Portal" /><div>My Foundation Portal</div></a></li>
</ul>
</div>
</div>
</div>
<!-- NEW HEADER STUFF HERE -->
<div id="header-menu">
<div id="header-nav">
<ul> <li><a class="first_one" href="http://wiki.eclipse.org/" target="_self">Home</a></li> <li><a href="http://www.eclipse.org/downloads/" target="_self">Downloads</a></li>
<li><a href="http://www.eclipse.org/users/" target="_self">Users</a></li>
<li><a href="http://www.eclipse.org/membership/" target="_self">Members</a></li>
<li><a href="http://wiki.eclipse.org/index.php/Development_Resources" target="_self">Committers</a></li>
<li><a href="http://www.eclipse.org/resources/" target="_self">Resources</a></li>
<li><a href="http://www.eclipse.org/projects/" target="_self">Projects</a></li>
<li><a href="http://www.eclipse.org/org/" target="_self">About Us</a></li>
</ul>
</div>
<div id="header-utils">
<!-- moved the search window here -->
<form action="http://wiki.eclipse.org/Special:Search" >
<input class="input" name="search" type="text" accesskey="f" value="" />
<input type='submit' onclick="this.submit();" name="go" id="searchGoButton" class="button" title="Go to a page with this exact name if one exists" value="Go" />&nbsp;
<input type='submit' onclick="this.submit();" name="fulltext" class="button" id="mw-searchButton" title="Search Eclipsepedia for this text" value="Search" />
</form>
</div>
</div>
<!-- Eclipse Additions for the Header stop here -->
<!-- Additions and mods for leftside nav Start here -->
<!--Started nav rip here-->
<!-- these are the nav controls main page, changes etc -->
<div id="novaContent" class="faux">
<div id="leftcol">
<ul id="leftnav">
<!-- these are the page controls, edit history etc -->
<li class="separator"><a class="separator">Navigation &#160;&#160;</li>
<li id="n-mainpage"><a href="http://wiki.eclipse.org/Main_Page">Main Page</a></li>
<li id="n-portal"><a href="http://wiki.eclipse.org/Eclipsepedia:Community_Portal">Community portal</a></li>
<li id="n-currentevents"><a href="http://wiki.eclipse.org/Eclipsepedia:Current_events">Current events</a></li>
<li id="n-recentchanges"><a href="http://wiki.eclipse.org/Special:Recentchanges">Recent changes</a></li>
<li id="n-randompage"><a href="http://wiki.eclipse.org/Special:Random">Random page</a></li>
<li id="n-help"><a href="http://wiki.eclipse.org/Help:Contents">Help</a></li>
<li class="separator"><a class="separator">Toolbox &#160;&#160;</a></li>
<li id="t-whatlinkshere"><a href="http://wiki.eclipse.org/Special:Whatlinkshere/SMILA/Documentation/Management">What links here</a></li>
<li id="t-recentchangeslinked"><a href="http://wiki.eclipse.org/Special:Recentchangeslinked/SMILA/Documentation/Management">Related changes</a></li>
<!-- This is the toolbox section -->
<li id="t-upload"><a href="http://wiki.eclipse.org/Special:Upload">Upload file</a></li>
<li id="t-specialpages"><a href="http://wiki.eclipse.org/Special:Specialpages">Special pages</a></li>
<li id="t-print"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Management&amp;printable=yes">Printable version</a></li> <li id="t-permalink"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Management&amp;oldid=309801">Permanent link</a></li> </ul>
</div>
<!-- Additions and mods for leftside nav End here -->
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<div id="tabs">
<ul class="primary">
<li class="active"><a href="Management.html"><span class="tab">Page</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/Management&amp;action=edit"><span class="tab">Discussion</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Management&amp;action=edit"><span class="tab">View source</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Management&amp;action=history"><span class="tab">History</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/Management"><span class="tab">Edit</span></a></li>
</ul>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<h1 class="firstHeading">SMILA/Documentation/Management</h1>
<div id="bodyContent">
<h3 id="siteSub">From Eclipsepedia</h3>
<div id="contentSub"><span class="subpages">&lt; <a href="../../SMILA.html" title="SMILA">SMILA</a> | <a href="../Documentation.1.html" title="SMILA/Documentation">Documentation</a></span></div>
<div id="jump-to-nav">Jump to: <a href="Management.html#column-one">navigation</a>, <a href="Management.html#searchInput">search</a></div> <!-- start content -->
<div class="messagebox" style="background-color: #def3fe; border: 1px solid #c5d7e0; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="http://wiki.eclipse.org/Image:Note.png" class="image" title="Note.png"><img alt="" src="http://wiki.eclipse.org/images/c/cc/Note.png" width="35" height="35" border="0" /></a></div>
<div><b>This is deprecated for SMILA 1.0, the JMX management framework is still functional but it's planned to replace it with management and monitoring HTTP ReST APIs.</b><br /></div>
</div>
<p><br />
SMILA is a framework with a lot of functionality. Most is invoke automatically by internal operations. Nevertheless, the user has to configure and start an initial operation. All functions a user can execute are accessible from the JMX Management Agent. On the following pages you will learn how to use SMILA with the aid of Java's built in JConsole and to handle the JMXClient which features access to SMILA commands via batch files.
</p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="Management.html#Management_with_the_aid_of_jconsole"><span class="tocnumber">1</span> <span class="toctext">Management with the aid of jconsole</span></a>
<ul>
<li class="toclevel-2"><a href="Management.html#Smila_manageable_Components"><span class="tocnumber">1.1</span> <span class="toctext">Smila manageable Components</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Management.html#PerformanceCounter"><span class="tocnumber">2</span> <span class="toctext">PerformanceCounter</span></a>
<ul>
<li class="toclevel-2"><a href="Management.html#Processing_performance_counters"><span class="tocnumber">2.1</span> <span class="toctext">Processing performance counters</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Management.html#JMX_Client"><span class="tocnumber">3</span> <span class="toctext">JMX Client</span></a>
<ul>
<li class="toclevel-2"><a href="Management.html#Pre-defined_commands_.28batch-files.29"><span class="tocnumber">3.1</span> <span class="toctext">Pre-defined commands (batch-files)</span></a></li>
<li class="toclevel-2"><a href="Management.html#Usage"><span class="tocnumber">3.2</span> <span class="toctext">Usage</span></a></li>
<li class="toclevel-2"><a href="Management.html#Configuration"><span class="tocnumber">3.3</span> <span class="toctext">Configuration</span></a>
<ul>
<li class="toclevel-3"><a href="Management.html#Configuration_explanation"><span class="tocnumber">3.3.1</span> <span class="toctext">Configuration explanation</span></a>
<ul>
<li class="toclevel-4"><a href="Management.html#To_use_commands_which_interact_with_JMX_a_connection_to_the_JMX_port_of_SMILA_is_needed"><span class="tocnumber">3.3.1.1</span> <span class="toctext">To use commands which interact with JMX a connection to the JMX port of SMILA is needed</span></a></li>
<li class="toclevel-4"><a href="Management.html#Existing_commands"><span class="tocnumber">3.3.1.2</span> <span class="toctext">Existing commands</span></a></li>
<li class="toclevel-4"><a href="Management.html#To_create_your_own_commands_you_have_to_use_cmd_command_after_the_schema_defined_in_the_above_folder"><span class="tocnumber">3.3.1.3</span> <span class="toctext">To create your own commands you have to use cmd command after the schema defined in the above folder</span></a></li>
<li class="toclevel-4"><a href="Management.html#To_keep_the_console_open_and_inform_you_about_actual_status_you_can_use_the_wait_tag"><span class="tocnumber">3.3.1.4</span> <span class="toctext">To keep the console open and inform you about actual status you can use the wait tag</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toclevel-1"><a href="Management.html#JMX_Client_in_OSGi_console"><span class="tocnumber">4</span> <span class="toctext">JMX Client in OSGi console</span></a></li>
<li class="toclevel-1"><a href="Management.html#External_links"><span class="tocnumber">5</span> <span class="toctext">External links</span></a></li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<a name="Management_with_the_aid_of_jconsole"></a><h2> <span class="mw-headline"> Management with the aid of jconsole </span></h2>
<p>The jconsole is a little tool for monitoring java applications nested in the JDK. Over a JMX connection it’s possible to connect an application with the swing UI of jconsole. If you start up SMILA engine and open jconsole you can connect the Jconsole to SMILA immediately.
</p>
<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="http://wiki.eclipse.org/Image:Jconsole.png" class="image" title="jconsole"><img alt="jconsole" src="http://wiki.eclipse.org/images/thumb/6/68/Jconsole.png/180px-Jconsole.png" width="180" height="137" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="http://wiki.eclipse.org/Image:Jconsole.png" class="internal" title="Enlarge"><img src="http://wiki.eclipse.org/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>jconsole</div></div></div>
<p>After connecting you can find SMILA operation on MBeans tab in the Tree on the left site.
</p>
<a name="Smila_manageable_Components"></a><h3> <span class="mw-headline"> Smila manageable Components </span></h3>
<p>Most components are now controlled via the HTTP REST API. Remaining JMX controlled components are:
</p>
<ul><li> <a href="SesameOntologyManager.html" title="SMILA/Documentation/SesameOntologyManager">SMILA/Documentation/SesameOntologyManager</a>
</li><li> <a href="Solr.html" title="SMILA/Documentation/Solr">SMILA/Documentation/Solr</a>
</li></ul>
<p>Also, some third-party components embedded in SMILA (e.g. Zookeeper) offer monitoring tools via JMX.
</p>
<a name="PerformanceCounter"></a><h2> <span class="mw-headline"> PerformanceCounter </span></h2>
<p>A <a href="../Project_Concepts/Performance_counters_API.html" title="SMILA/Project Concepts/Performance counters API">PerformanceCounter</a> monitors the activity of a component. In SMILA currently two kinds of PerformanceCounters are available, one for <a href="Crawler.html" title="SMILA/Documentation/Crawler">Crawlers</a> and another for Processing within the Data Flow Process. With the aid of jconsole you have the possibility to look at interesting counters of SMILA. There exist a lot of views that allow you to get information about different situations.
</p>
<a name="Processing_performance_counters"></a><h3> <span class="mw-headline"> Processing performance counters </span></h3>
<p>As soon as Router puts <tt>Record</tt>s into MQ the Listener pushes them into Data Flow Process. This time a new section with the following hierarchy (only an example, because PerformanceCounters vary according to your personal usage of SMILA) appears in MBeans-tree:
</p>
<ul><li> <tt>Pipeline</tt>: lists all invoked pipelines.
<ul><li> <tt>AddPipeline</tt>
</li><li> <tt>DeletePipeline</tt>
</li></ul>
</li><li> <tt>Processing Service</tt>: lists all processing services which were invoked, sorted by pipelines
<ul><li> <tt>AddPipeline</tt>
<ul><li> <tt>SimepleMimeTypeIdentifier</tt>
</li></ul>
</li><li> <tt>DeletePipeline</tt>
<ul><li> <tt>SolrIndexPipelet</tt>
</li></ul>
</li></ul>
</li><li> <tt>Simple Pipelet</tt>: lists all pipelets which were used, sorted by pipelines
<ul><li> <tt>AddPipeline</tt>
<ul><li> <tt>HtmlToTextPipelet</tt>
</li><li> <tt>SolrIndexPipelet</tt>
</li></ul>
</li></ul>
</li></ul>
<a name="JMX_Client"></a><h2> <span class="mw-headline"> JMX Client </span></h2>
<p>The JMX Client is a lightweight and very easy to use command line driven component to use access most JMX Management operations. It works without jconsole and provides only a few commands. If you want to have full control over SMILA framework you have to use jconsole as described in the chapter above. Furthermore you have the possibility to expand functionality of JMX Client. It is highly configurable with only one single configuration file.
</p>
<a name="Pre-defined_commands_.28batch-files.29"></a><h3> <span class="mw-headline"> Pre-defined commands (batch-files) </span></h3>
<ul><li> <tt>clearOntology</tt>: remove all statements from "native" ontology.
</li><li> <tt>importRDF</tt>: import RDF file into "native" ontology. First argument is path to the RDF file (different formats are supported if the suffix is correct, see <a href="SesameOntologyManager.html#JMX_Management_Agent" title="SMILA/Documentation/SesameOntologyManager">SMILA/Documentation/SesameOntologyManager#JMX Management Agent</a>, second argument is the baseURI for all "relative" resources defined in the file. The value is irrelevant if the file contains only "absolute" URIs.
</li><li> <tt>exportRDF</tt>: export all statements from "natvie" ontology to file "export.rdf" in RDF/XML format.
</li></ul>
<a name="Usage"></a><h3> <span class="mw-headline"> Usage </span></h3>
<p>If you open command window in folder <tt>SMILA/jmxclient</tt> and execute <tt>run.bat</tt> you'll get very useful help.
</p>
<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="http://wiki.eclipse.org/Image:JMXClient.png" class="image" title="JMX Client"><img alt="JMX Client" src="http://wiki.eclipse.org/images/thumb/a/a4/JMXClient.png/180px-JMXClient.png" width="180" height="77" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="http://wiki.eclipse.org/Image:JMXClient.png" class="internal" title="Enlarge"><img src="http://wiki.eclipse.org/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>JMX Client</div></div></div>
<p>The JMX Client can be used to simplify JMX Management while using batch-files for most important functions. But that’s not all. With the aid of JMX Client you have the possibility to use SMILA completely from your console or write own batch files which could invoke for example one method after another. The Client works with commands. These commands are managed in only one configuration file. In addition to the pre-defined commands you are able to create own commands. You only need to know the fully qualified class name and method name of function you want to invoke. To execute a command simply use this pattern: run.bat commandName commandParameters. The JMX client is able to execute any JMX operation and get any JMX attribute and to make it in one batch with reusing previous results.
</p>
<a name="Configuration"></a><h3> <span class="mw-headline"> Configuration </span></h3>
<p>There is a configuration file located at <tt>org.eclipse.smila.management.jmx.client/schemas/jmxclient.xsd</tt> (Source) and <tt>jmxclient/schemas/jmxclient.xsd</tt> (Build). The default configuration file could be found at <tt>org.eclipse.smila.management.jmx.client/config.xml</tt> (Source) and <tt>jmxclient/config.xml</tt>.
</p><p><br />
</p>
<a name="Configuration_explanation"></a><h4> <span class="mw-headline"> Configuration explanation </span></h4>
<a name="To_use_commands_which_interact_with_JMX_a_connection_to_the_JMX_port_of_SMILA_is_needed"></a><h5> <span class="mw-headline"> To use commands which interact with JMX a connection to the JMX port of SMILA is needed </span></h5>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;connection</span> <span class="re0">id</span>=<span class="st0">&quot;local&quot;</span> <span class="re0">host</span>=<span class="st0">&quot;localhost&quot;</span> <span class="re0">port</span>=<span class="st0">&quot;9004&quot;</span><span class="re2">/&gt;</span></span></pre></div>
<a name="Existing_commands"></a><h5> <span class="mw-headline"> Existing commands </span></h5>
<p>The JMX client commands for SMILA are defined in the file <tt>config.xmk</tt> of the package <tt>org.eclipse.smila.management.jmx.client</tt>.
The schema for the commands is defined in the folder <tt>schemas</tt> of the same package.
</p>
<a name="To_create_your_own_commands_you_have_to_use_cmd_command_after_the_schema_defined_in_the_above_folder"></a><h5> <span class="mw-headline"> To create your own commands you have to use cmd command after the schema defined in the above folder </span></h5>
<ul><li> cmd:
<ul><li> id: the name of the command.
</li><li> echo: information to display on console if command is executed.
<ul><li> operation
<ul><li> domain: the JMX property root. If not defined, it will be defaulted to "SMILA".
</li><li> key: Class containing method.
</li><li> name: name of the method to invoke.
</li><li> echo: information to display on console if method is invoked.
<ul><li> parameter: one tag for each parameter.
<ul><li> echo: description of the parameter.
</li></ul>
</li></ul>
</li></ul>
</li></ul>
</li></ul>
</li></ul>
<a name="To_keep_the_console_open_and_inform_you_about_actual_status_you_can_use_the_wait_tag"></a><h5> <span class="mw-headline"> To keep the console open and inform you about actual status you can use the wait tag </span></h5>
<ul><li> <b>STEP 1</b>:
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;cmd</span> <span class="re0">id</span>=<span class="st0">&quot;crawlW&quot;</span> <span class="re0">echo</span>=<span class="st0">&quot;Starting crawler by datasource id and wait for finished&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;operation</span>
<span class="re0">key</span>=<span class="st0">&quot;CrawlerController&quot;</span>
<span class="re0">name</span>=<span class="st0">&quot;startCrawling&quot;</span>
<span class="re0">echo</span>=<span class="st0">&quot;Starting crawl [%1]&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;parameter</span> <span class="re0">echo</span>=<span class="st0">&quot;data source id&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;parameter</span> <span class="re0">echo</span>=<span class="st0">&quot;job name&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/operation<span class="re2">&gt;</span></span></span>
...</pre></div>
<dl><dd><dl><dd> for the MBean of DOMAIN "SMILA" with KEY „CrawlerController" the operation "startCrawlerTask" with two input parameters (with String type - default) is executed. JMX will return a result to the client, e.g. <i>"Crawler with the dataSourceId 'file' pushing to job 'indexUpdateJob' successfully started! (import run id: 595826)"</i>
</dd></dl>
</dd></dl>
<ul><li> <b>STEP 2</b>:
</li></ul>
<dl><dd><dl><dd> we need to extract the hash code (which is the import run id) from the crawler's feedback to track its activities. This can be done by the following regexp tag which would return "595826" as its result for the above example.
</dd></dl>
</dd></dl>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;regexp</span> <span class="re0">pattern</span>=<span class="st0">&quot;^.*\(\D*(\d+)\).*$&quot;</span> <span class="re0">group</span>=<span class="st0">&quot;1&quot;</span> <span class="re0">echo</span>=<span class="st0">&quot;Extracting crawler hash code&quot;</span><span class="re2">/&gt;</span></span></pre></div>
<ul><li> <b>STEP 3</b> is an unconditional simple wait task. We have to wait for the jmx counters to be created before we can access them in the next step.
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;wait</span> <span class="re0">echo</span>=<span class="st0">&quot;Waiting for jmx counters&quot;</span> <span class="re0">pause</span>=<span class="st0">&quot;1000&quot;</span> <span class="re2">/&gt;</span></span></pre></div>
<ul><li> <b>STEP 4</b> is a wait task - the most complex task - we will wait until the crawl is finished. This wait tag is defined by using two subnodes
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;wait</span> <span class="re0">echo</span>=<span class="st0">&quot;Waiting while crawl ends&quot;</span> <span class="re0">pause</span>=<span class="st0">&quot;1000&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;in<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;cmd</span> <span class="re0">id</span>=<span class="st0">&quot;-&quot;</span> <span class="re0">echo</span>=<span class="st0">&quot;Getting crawler status by datasource id&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;operation</span>
<span class="re0">key</span>=<span class="st0">&quot;CrawlerController&quot;</span>
<span class="re0">name</span>=<span class="st0">&quot;getStatus&quot;</span>
<span class="re0">echo</span>=<span class="st0">&quot;Crawl [%1] status&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- value=&quot;%1&quot; --&gt;</span></span>
<span class="sc3"><span class="re1">&lt;parameter</span> <span class="re0">echo</span>=<span class="st0">&quot;data source id&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/operation<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/cmd<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;const</span> <span class="re0">value</span>=<span class="st0">&quot;Finished&quot;</span> <span class="re0">echo</span>=<span class="st0">&quot;Crawling finished status&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;const</span> <span class="re0">value</span>=<span class="st0">&quot;Stopped&quot;</span> <span class="re0">echo</span>=<span class="st0">&quot;Crawling stopped status&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;const</span> <span class="re0">value</span>=<span class="st0">&quot;Aborted&quot;</span> <span class="re0">echo</span>=<span class="st0">&quot;Crawling aborted status&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/in<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;cmd</span> <span class="re0">id</span>=<span class="st0">&quot;-&quot;</span> <span class="re0">echo</span>=<span class="st0">&quot;Reading crawler performance counters&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;attribute</span>
<span class="re0">key</span>=<span class="st0">&quot;Crawlers/%3/Total&quot;</span>
<span class="re0">name</span>=<span class="st0">&quot;Records&quot;</span>
<span class="re0">echo</span>=<span class="st0">&quot;Total records&quot;</span><span class="re2">/&gt;</span></span>
...
<span class="sc3"><span class="re1">&lt;/cmd<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/wait<span class="re2">&gt;</span></span></span></pre></div>
<dl><dd><dl><dd> First subnode ( here its logical IN ) is a condition defining when to exit from the WAIT task. The second subnode is a command to execute in each iteration of the wait loop.
</dd><dd> If the condition is not evaluated to true, the wait task will pause for the given amount of milliseconds before entering the next iteration. So each 1000 ms the following will be executed:
<ul><li> three performance counters defined in <tt>cmd</tt> with <tt>id="-"</tt> will be printed.
</li><li> it will read the number of records, ask for the crawler's status checks if the status is "Finished", "Stopped" or "Aborted".
</li><li> if it is, the crawling has finished and so the loop exits, otherwise the next iteration of the loop is started.
</li></ul>
</dd></dl>
</dd></dl>
<a name="JMX_Client_in_OSGi_console"></a><h2> <span class="mw-headline"> JMX Client in OSGi console </span></h2>
<p>The JMX client is also available in the Equinox OSGi console as a command provider. Thus you can now invoke the same configured actions also from the OSGi console without having to open a separate window. The command name is <tt>smila</tt> followed by the same arguments used with the <tt>run</tt> script in <tt>SMILA/jmxclient</tt>. Use <tt>help</tt> to get a description of the supported commands. Usually a lot more help output for the standard Equinox commands follows so you may need to scroll back a lot to find the description of the <tt>smila</tt> command. The commands are exactly like when using the <tt>run</tt> script, only the command name is <tt>smila</tt>, not <tt>run</tt>.
</p>
<a name="External_links"></a><h2> <span class="mw-headline"> External links </span></h2>
<ul><li> <a href="http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/" class="external text" title="http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/" rel="nofollow">Java Management Extensions (JMX)</a>
</li><li> <a href="http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html" class="external text" title="http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html" rel="nofollow">Using JConsole to Monitor Applications</a>
</li></ul>
<!--
NewPP limit report
Preprocessor node count: 102/1000000
Post-expand include size: 1044/2097152 bytes
Template argument size: 512/2097152 bytes
#ifexist count: 0/100
-->
<!-- Saved in parser cache with key wikidb:pcache:idhash:18604-0!1!0!!en!2!edit=0 and timestamp 20130416061005 -->
<div class="printfooter">
Retrieved from "<a href="Management.html">http://wiki.eclipse.org/SMILA/Documentation/Management</a>"</div>
<div id="catlinks"><p class='catlinks'><a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories">Category</a>: <span dir='ltr'><a href="http://wiki.eclipse.org/Category:SMILA" title="Category:SMILA">SMILA</a></span></p></div> <!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<!-- Yoink of toolbox for phoenix moved up -->
</div>
</div>
<div id="clearFooter"/>
<div id="footer" >
<ul id="footernav">
<li class="first"><a href="http://www.eclipse.org/">Home</a></li>
<li><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/org/foundation/contact.php">Contact</a></li>
<li><a href="http://wiki.eclipse.org/Eclipsepedia:About" title="Eclipsepedia:About">About Eclipsepedia</a></li>
</ul>
<span id="copyright">Copyright &copy; 2013 The Eclipse Foundation. All Rights Reserved</span>
<p id="footercredit">This page was last modified 07:12, 5 July 2012 by <a href="http://wiki.eclipse.org/User:Juergen.schumacher.empolis.com" title="User:Juergen.schumacher.empolis.com">Juergen Schumacher</a>. Based on work by <a href="http://wiki.eclipse.org/index.php?title=User:Juergen.schumacher.attensity.com&amp;action=edit" class="new" title="User:Juergen.schumacher.attensity.com">Juergen Schumacher</a>, <a href="http://wiki.eclipse.org/index.php?title=User:Nadine.auslaender.attensity.com&amp;action=edit" class="new" title="User:Nadine.auslaender.attensity.com"> </a> and <a href="http://wiki.eclipse.org/index.php?title=User:Daniel.stucky.attensity.com&amp;action=edit" class="new" title="User:Daniel.stucky.attensity.com">Daniel Stucky</a> and <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/Management&amp;action=credits" title="SMILA/Documentation/Management">others</a>.</p>
<p id="footerviews">This page has been accessed 4,113 times.</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-910670-4");
pageTracker._trackPageview();
</script>
<!-- <div class="visualClear"></div> -->
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
</div>
<!-- Served in 0.206 secs. --></body></html>