<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> <title>The 66 Suite: 66-info</title> <meta name="Description" content="Detailed documentation for the 66-info command which is part of the 66 software suite" /> <meta name="Keywords" content="66 command 66-info scandir supervision supervise set service information" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> <p> <a href="index.html">66</a><br /> <a href="//obarun.org/">www.obarun.org</a> </p> <h1>66-info</h1> <p> This command displays information about trees and services. </p> <h2>Interface </h2> <h3>Main interface</h3> <pre> 66-info [ -h help ] [ -T tree ] [ -S service ] </pre> <h3>Tree sub interface</h3> <pre> 66-info [ -T ] [ -h help ] [ -v <em>verbosity</em> ] [ -l live ] [ -r recurse ] [ -d <em>depth</em> ] <em>tree</em> </pre> <h3>Service sub interface</h3> <pre> 66-info [ -S ] [ -h help ] [ -v <em>verbosity</em> ] [ -l live ] [ -p n lines ] [ -r recurse ] [ -d <em>depth</em> ] <em>service</em> </pre> <p> 66-info displays detailed information about a <em>tree</em> or a specific <em>service</em> depending on the options passed. </p> <h2>Main Options </h2> <ul> <li> <tt>-h </tt> : prints this help. </li> <li> <tt>-T </tt> : asks for <em>tree</em> information. </li> <li> <tt>-S </tt> : asks for <em>service</em> information. </li> </ul> <h2>Tree sub options </h2> <ul> <li> <tt>-h </tt> : prints this help. </li> <li> <tt>-v <em>verbosity</em> </tt> : increases/decreases the verbosity of the command. <tt>1(Default)</tt>: Only print error messages. <tt>2</tt>: Also print warning messages. <tt>3</tt>: Also print debugging messages. </li> <li> <tt>-l <em>live</em> </tt> : changes the supervision directory of <em>service</em> to <em>live</em>. By default this will be <tt>/run/66</tt>. The default can also be changed at compile time by passing the <tt>--livedir=<em>live</em></tt> option to <tt>./configure</tt>. An existing absolute path is expected and should be within a writable filesystem - likely a RAM filesystem—see <tt><a href="66-scandir.html">66-scandir</a></tt>. </li> <li> <tt>-r </tt> : shows the dependency graph of <em>tree</em> in reverse mode. </li> <li> <tt>-d <em>depth</em> </tt> : limits the depth of the dependency graph visualisation; defaults to 1. </li> <p>(!) If <em>tree</em> is not specified <tt>66-info</tt> will display information about all available trees for the current owner of the process.</p> </ul> <h2>Service sub options </h2> <ul> <li> <tt>-h </tt> : prints this help. </li> <li> <tt>-v <em>verbosity</em> </tt> : increases/decreases the verbosity of the command. <tt>1(Default)</tt>: Only print error messages. <tt>2</tt>: Also print warning messages. <tt>3</tt>: Also print debugging messages. </li> <li> <tt>-l <em>live</em> </tt> : changes the supervision directory of <em>service</em> to <em>live</em>. By default this will be <tt>/run/66</tt>. The default can also be changed at compile time by passing the <tt>--livedir=<em>live</em></tt> option to <tt>./configure</tt>. An existing absolute path is expected and should be within a writable filesystem - likely a RAM filesystem—see <tt><a href="66-scandir.html">66-scandir</a></tt>. </li> <li> <tt>-p <em>n lines</em> </tt> : prints the <em>n</em> last lines from the associated log file of the <em>service</em>. </li> <li> <tt>-r </tt> : shows the dependency graph of <em>service</em> in reverse mode. </li> <li> <tt>-d <em>depth</em> </tt> : limits the depth of the dependency graph visualisation; defaults to 1. </li> </ul> <h2>Tree output display example</h2> <p>The command <tt>66-info -T boot</tt> as root user on the <em>Obarun</em> default system displays the following where <em>boot</em> is the tree used to properly boot the machine: <pre> boot Initialized: yes | Current: no Contains: | Enabled: no ├─(253,classic) tty12 ├─(0,oneshot) filesystem ├─(0,oneshot) hostname ├─(0,bundle) 00 ├─(0,oneshot) rofs-cgroups ├─(0,oneshot) rofs-kernmod ├─(421,longrun) udevd-udev ├─(0,oneshot) udevd-udevadm ├─(0,bundle) rofs-Udevd ├─(0,oneshot) rofs-console ├─(0,oneshot) rofs-hardclock ├─(0,oneshot) checkfs-dmraid ├─(0,oneshot) checkfs-btrfs ├─(0,oneshot) checkfs-lvm ├─(0,oneshot) checkfs-fscheck ├─(0,bundle) rofs-Checkfs ├─(0,oneshot) rofs-modules ├─(0,oneshot) rofs-swap ├─(0,oneshot) rofs-kernruntime ├─(0,bundle) all-Rofs ├─(0,oneshot) rwfs-fsrw ├─(0,oneshot) rwfs-tmpdir ├─(0,oneshot) rwfs-iptables ├─(0,oneshot) rwfs-ip6tables ├─(0,oneshot) rwfs-loopback ├─(0,oneshot) rwfs-nofilesystem ├─(0,oneshot) rwfs-localtime ├─(0,oneshot) rwfs-random ├─(0,oneshot) rwfs-logfiles ├─(0,oneshot) rwfs-end ├─(0,oneshot) rwfs-dmesglog ├─(0,oneshot) rwfs-66local ├─(0,oneshot) rwfs-tmpfiles ├─(0,bundle) all-Rwfs ├─(0,oneshot) boot-extra └─(0,bundle) All </pre> </p> <p>By default the first service displayed is the first service started, the second one is the second started and so on.</p> <p>The first line give you the name of the <em>tree</em>, <tt><em>Initialized</em></tt> tells if the <tree>tree</tree> was initialized with <tt><a href="66-init.html">66-init</a></tt> tool, <tt><em>Current</em></tt> tells if the <em>tree</em> is the current one or not—see <tt><a href="66-tree.html">66-tree -c</a></tt> and <tt><em>Enabled</em></tt> reveals the state of the tree—see <tt><a href="66-tree.html">66-tree -E</a></tt>. For each service the first number found between '()' bracket is the corresponding pid of the service, the type of the service is shown next to it. Finally the name of the service is displayed. </p> <p> By default the dependency graph is rendered in order of execution. In this example the <em>'bundle' All</em> is the last finished service and <em>'classic' tty12</em> is the first one executed. You can reverse the rendered order with the <tt>-r</tt> option.</p> </p> <h2>Service output display example</h2> <p>The command <tt>sudo 66-info -S -d3 00</tt> displays the following where <em>00</em> is the name of the service: <pre> 00 on tree : boot status : nothing to display type : bundle description : mount filesystem and set the hostname source : /etc/66/service/boot/ run at : /run/66/tree/0/boot/servicedirs/00 contents ├─(0,oneshot) filesystem └─(0,oneshot) hostname </pre> </p> <p>Let's take another example, the command sudo <tt>66-info -S -p5 ntpd</tt> displays the following: <pre> ntpd on tree : root status : up (pid 786) 2380 seconds type : classic description : ntpd daemon source : /etc/66/service/ run at : /run/66/scandir/0/ntpd dependencies └─(785,classic) ntpd-log scripts start script : foreground { mkdir -p -m 0755 ${RUNDIR} } execl-cmdline -s { ntpd ${CMD_ARGS} } environment !RUNDIR=/run/openntpd !CMD_ARGS=-d -s logger logger associated : ntpd-log log destination : /var/log/66/ntpd 2019-03-18 06:50:21.749572500 adjtimex returns frequency of 0.000000ppm 2019-03-18 06:50:21.764241500 ntp engine ready 2019-03-18 06:50:21.847440500 adjtimex adjusted frequency by 16.428986ppm 2019-03-18 06:50:21.847479500 set local clock to Mon Mar 18 06:50:21 +11 2019 (offset 0.000000s) </pre> <p> In our case : <ul> <li> <tt>ntpd </tt> : name of the service. Main section where general informations is displayed. </li> <li> <tt>on tree </tt> : service enable on tree root. </li> <li> <tt>status </tt> : status of the service. </li> <li> <tt>type </tt> : type of the service. </li> <li> <tt>description </tt> : short description of the service. </li> <li> <tt>source </tt> : origin of the frontend service file used to enable the service. </li> <li> <tt>run at </tt> : location of the service into the scandir. </li> <li> <tt>dependencies</tt> : dependencies informations section. This section will display a graphical tree on the service dependencies. </li> <li> <tt>scripts</tt> : scripts informations section. This will display the command executed at start and stop process. </li> <li> <tt>start script </tt> : command line executed at start process. If a stop section was set an additionnal field called stop script will be displayed with the corresponding command line executed at stop process. </li> <li> <tt>environment</tt> : environment informations section. Display the environment variables set at <tt>/etc/66/conf/<service_name></tt> or <tt>$HOME/.66/conf/<service_name></tt> depending of the owner of the process. </li> <li> <tt>logger</tt> : logger informations section. </li> <li> <tt>logger associated </tt> : name of the service logger. </li> <li> <tt>log destination </tt> : destination of the logger file. </li> <li> the last part display the last 5 line of the logger file. </li> </ul> </p> <p>Note: <tt>66-info</tt> use color to output the informations, the previous examples do not reflect the veritable output concerning the colors.</p> </body> </html>