felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Felix > 4.1. Commands
Date Mon, 05 Oct 2009 20:54:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=FELIX&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/FELIX/4.1.+Commands">4.1.
Commands</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~fdiotalevi">filippo
diotalevi</a>
    </h4>
     fixed wrong link
          <div id="versionComment" class="noteMacro" style="display:none; padding: 5px;">
     fixed wrong link<br />
     </div>
          <br/>
     <div class="notificationGreySide">
         <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
width='33%' class='ScrollbarPrevName'>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/FELIX/4.+Understanding+Karaf"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/FELIX/4.+Understanding+Karaf">4. Understanding Karaf</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/FELIX/4.2.+Remote+Console">4.2.
Remote Console</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/FELIX/4.2.+Remote+Console"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>
<p><a name="4.1.Commands-top"></a></p>

<h1><a name="4.1.Commands-4.1.ConsoleandCommands"></a>4.1. Console and Commands</h1>

<h2><a name="4.1.Commands-Overview"></a>Overview</h2>

<p>Karaf provides a powerful console and a set of commands that can be used to perform
various tasks.  Commands can be located in the root shell or in a sub-shell.  A sub-shell
is a group of related commands, like commands related to the OSGi framework or the log system.</p>

<p>The following shells are available out-of-the-box, but the console can be <a href="/confluence/display/FELIX/6.1.+Extending+the+console"
title="6.1. Extending the console">easily extended</a>:</p>
<ul>
	<li><a href="#4.1.Commands-Adminshell">admin</a></li>
	<li><a href="#4.1.Commands-Configshell">config</a></li>
	<li><a href="#4.1.Commands-Featuresshell">features</a></li>
	<li><a href="#4.1.Commands-Logshell">log</a></li>
	<li><a href="#4.1.Commands-OBRshell">obr</a></li>
	<li><a href="#4.1.Commands-OSGishell">osgi</a></li>
	<li><a href="#4.1.Commands-Packageshell">package</a></li>
	<li><a href="#4.1.Commands-Shellshell">shell</a></li>
	<li><a href="#4.1.Commands-SSHshell">ssh</a></li>
	<li><a href="#4.1.Commands-Wrappershell">wrapper</a></li>
</ul>


<h2><a name="4.1.Commands-Adminshell"></a>Admin shell</h2>

<p>This shell is described extensively in section <a href="/confluence/display/FELIX/4.7.+Administration"
title="4.7. Administration">4.7. Administration</a>.</p>

<h2><a name="4.1.Commands-Configshell"></a>Config shell</h2>

<p>This shell is described extensively in section <a href="/confluence/display/FELIX/4.8+Configuration"
title="4.8 Configuration">4.8 Configuration</a>.</p>

<h2><a name="4.1.Commands-Featuresshell"></a>Features shell</h2>

<p>The features shell contains a few commands to provision entire applications easily.<br/>
More information is available on the chapter <a href="/confluence/display/FELIX/4.6.+Provisioning"
title="4.6. Provisioning">4.6. Provisioning</a>.</p>

<h2><a name="4.1.Commands-Logshell"></a>Log shell</h2>

<p>The log shell contains a few commands to display the log entries, retrieve or change
the log levels:</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Command         </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> display           </td>
<td class='confluenceTd'> Display log entries. </td>
</tr>
<tr>
<td class='confluenceTd'> display-exception </td>
<td class='confluenceTd'> Display the last exception from the log. </td>
</tr>
<tr>
<td class='confluenceTd'> get               </td>
<td class='confluenceTd'> Show log level. </td>
</tr>
<tr>
<td class='confluenceTd'> set               </td>
<td class='confluenceTd'> Set log level. </td>
</tr>
</tbody></table>

<p>See the documentation on the <a href="/confluence/display/FELIX/4.3.+Logging+system#4.3.Loggingsystem-Commands">logging
system</a> for more informations.</p>

<h2><a name="4.1.Commands-OBRshell"></a>OBR shell</h2>

<p>OBR (<a href="http://www2.osgi.org/Repository" rel="nofollow">OSGi Bundle Repository</a>)
is a proposed specification that defines an xml format for repositories of OSGi bundles and
an associated service to access it.  Karaf proposes a number of commands that can be used
to deal with such repositories.</p>

<p>Note that this feature is not installed by default.  To install it, you must run
the following command:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
smx@root:/&gt; features:install obr
</pre>
</div></div>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Command  </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> addUrl     </td>
<td class='confluenceTd'> Add a list of repository URLs to the repository service </td>
</tr>
<tr>
<td class='confluenceTd'> deploy     </td>
<td class='confluenceTd'> Deploy </td>
</tr>
<tr>
<td class='confluenceTd'> info       </td>
<td class='confluenceTd'> Display the meta-data for the specified bundles. </td>
</tr>
<tr>
<td class='confluenceTd'> list       </td>
<td class='confluenceTd'> List </td>
</tr>
<tr>
<td class='confluenceTd'> listUrl    </td>
<td class='confluenceTd'> Display the repository URLs currently associated with the
repository service. </td>
</tr>
<tr>
<td class='confluenceTd'> removeUrl  </td>
<td class='confluenceTd'> Remove a list of repository URLs from the repository service
</td>
</tr>
<tr>
<td class='confluenceTd'> source     </td>
<td class='confluenceTd'> Source </td>
</tr>
<tr>
<td class='confluenceTd'> start      </td>
<td class='confluenceTd'> Start </td>
</tr>
</tbody></table>

<h2><a name="4.1.Commands-OSGishell"></a>OSGi shell</h2>

<p>The OSGi sub-shell provides commands for managing the OSGi framework: listing OSGi
bundles, services, managing bundle lifecycles.<br/>
Look at the online help (launch <tt>osgi help</tt> command) for more informations.</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Command           </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> bundle-level        </td>
<td class='confluenceTd'> Get or set the start level of a given bundle </td>
</tr>
<tr>
<td class='confluenceTd'> headers             </td>
<td class='confluenceTd'> Display headers </td>
</tr>
<tr>
<td class='confluenceTd'> install             </td>
<td class='confluenceTd'> Install bundle </td>
</tr>
<tr>
<td class='confluenceTd'> list                </td>
<td class='confluenceTd'> List bundles </td>
</tr>
<tr>
<td class='confluenceTd'> ls                  </td>
<td class='confluenceTd'> List services </td>
</tr>
<tr>
<td class='confluenceTd'> refresh             </td>
<td class='confluenceTd'> Refresh bundle </td>
</tr>
<tr>
<td class='confluenceTd'> update              </td>
<td class='confluenceTd'> Update bundle </td>
</tr>
<tr>
<td class='confluenceTd'> resolve             </td>
<td class='confluenceTd'> Resolve bundle </td>
</tr>
<tr>
<td class='confluenceTd'> shutdown            </td>
<td class='confluenceTd'> Shutdown </td>
</tr>
<tr>
<td class='confluenceTd'> start               </td>
<td class='confluenceTd'> Start bundle </td>
</tr>
<tr>
<td class='confluenceTd'> start-level         </td>
<td class='confluenceTd'> Get or set the start level </td>
</tr>
<tr>
<td class='confluenceTd'> stop                </td>
<td class='confluenceTd'> Stop bundle </td>
</tr>
<tr>
<td class='confluenceTd'> uninstall           </td>
<td class='confluenceTd'> Uninstall bundle </td>
</tr>
</tbody></table>

<h2><a name="4.1.Commands-Packageshell"></a>Package shell</h2>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Command      </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> imports        </td>
<td class='confluenceTd'> Display imported packages </td>
</tr>
<tr>
<td class='confluenceTd'> exports        </td>
<td class='confluenceTd'> Display exported packages </td>
</tr>
</tbody></table>

<h2><a name="4.1.Commands-Shellshell"></a>Shell shell</h2>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Command  </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> cat        </td>
<td class='confluenceTd'> Displays the content of a file or url </td>
</tr>
<tr>
<td class='confluenceTd'> echo       </td>
<td class='confluenceTd'> Echoes or prints arguments to STDOUT </td>
</tr>
<tr>
<td class='confluenceTd'> exec       </td>
<td class='confluenceTd'> Executes system processes </td>
</tr>
<tr>
<td class='confluenceTd'> grep       </td>
<td class='confluenceTd'> Prints lines matching the given pattern </td>
</tr>
<tr>
<td class='confluenceTd'> info       </td>
<td class='confluenceTd'> Prints system informations </td>
</tr>
<tr>
<td class='confluenceTd'> java       </td>
<td class='confluenceTd'> Execute a Java standard application </td>
</tr>
<tr>
<td class='confluenceTd'> printf     </td>
<td class='confluenceTd'> Format and print arguments </td>
</tr>
<tr>
<td class='confluenceTd'> sleep      </td>
<td class='confluenceTd'> Sleeps for a bit then wakes up </td>
</tr>
<tr>
<td class='confluenceTd'> sort       </td>
<td class='confluenceTd'> Write sorted concatenation of all files to standard output.
</td>
</tr>
<tr>
<td class='confluenceTd'> tac        </td>
<td class='confluenceTd'> Captures the STDIN and returns it as a string. Optionally
writes the content to a file </td>
</tr>
</tbody></table>


<p>Examples:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
cat mvn:org.apache.servicemix/servicemix/3.2.1/pom
</pre>
</div></div>
<p>or</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
log:display | grep error
</pre>
</div></div>

<h2><a name="4.1.Commands-SSHshell"></a>SSH shell</h2>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Command  </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> ssh        </td>
<td class='confluenceTd'> Connects to a remote SSH server </td>
</tr>
<tr>
<td class='confluenceTd'> sshd       </td>
<td class='confluenceTd'> Creates a SSH server </td>
</tr>
</tbody></table>

<h2><a name="4.1.Commands-Wrappershell"></a>Wrapper shell</h2>

<p>Note that this feature is not installed by default.  To install it, you must run
the following command:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
smx@root:/&gt; features:install wrapper
</pre>
</div></div>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Command  </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> install    </td>
<td class='confluenceTd'> Install the container as a system service in the OS. </td>
</tr>
</tbody></table>

<p><a href="#4.1.Commands-top">top</a></p>
<style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
width='33%' class='ScrollbarPrevName'>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/FELIX/4.+Understanding+Karaf"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/FELIX/4.+Understanding+Karaf">4. Understanding Karaf</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/FELIX/4.2.+Remote+Console">4.2.
Remote Console</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/FELIX/4.2.+Remote+Console"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/FELIX/4.1.+Commands">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=74686&revisedVersion=18&originalVersion=17">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/FELIX/4.1.+Commands?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message