-**-v***verbosity* : increases/decreases the verbosity of the command.
**1* : only print error messages. This is the default.
**2* : also print warning messages.
**3* : also print tracing messages.
**4* : also print debugging messages.
-**-n** : do not display the field name(s) specified.
-**-o** : comma separated list of fields to display. If this option is not passed, *66-inservice* will display all fields.
-**-g** : shows the dependency list of the *service* as a hierarchical graph instead of a list.
-**-d***depth* : limits the depth of the dependency list visualisation; default is 1. This implies **-g** option.
-**-r** : shows the dependency list of *services* in reverse mode.
-**-t***tree* : only searches the *service* at the specified *tree*, when the same service may be enabled in more trees.
-**-p***nline* : prints the *nline* last lines from the log file of the *service*. Default is 20.
## Valid fields for -o options
-*name* : displays the name of the *service*.
-*intree* : displays the *service*'s tree name.
-*status* : displays the status.
-*type* : displays the *service* type.
-*description* : displays the description.
-*source* : displays the source of the *service*'s [frontend](frontend.html) file.
-*live* : displays the *service*'s live directory.
-*depends* : displays the *service*'s dependencies.
-*extdepends* : displays the *service*'s external dependencies.
-*optsdepends* : displays the *service*'s optional dependencies.
-*start* : displays the *service*'s start script.
-*stop* : displays the *service*'s stop script.
-*envat* : displays the source of the environment file.
-*envfile* : displays the contents of the environment file.
-*logname* : displays the logger's name.
-*logdst* : displays the logger's destination.
-*logfile* : displays the contents of the log file.
## Command and output examples
The command `66-inservice 00` run as root user on [Obarun](https://web.obarun.org)'s default system, displays the following, where *00* is a service contained in the tree boot:
```
Name : 00
In tree : boot
Status : enabled, nothing to display
Type : bundle
Description : Set the hostname and mount filesystem
***Note***: the *Optional dependencies* and *External dependencies* also displays the name of the tree where the service is currently enabled after the `colon(:)` mark if any:
By default the dependency graph is rendered in the order of execution. In this example the `oneshot` system-hostname is the first executed service and `oneshot`*mount-cgroups* is the last one when it finishes. You can reverse the rendered order with the **-r** option.
You can display the *status* and *depends on* field and only these fields of a *service* using the command `66-inservice -o status,depends -g <service>` connmand where the dependency list is diplayed as a graph:
```
Status : enabled, up (pid 938) 34652 seconds
Dependencies : /
├─(933,Enabled,longrun) dbus
└─(929,Enabled,longrun) connmand-log
```
You can display the status,log file and log destination and only these fields of a service using the command `66-inservice -o status,logdst,logfile -g dbus`:
```
Status : enabled, up (pid 933) 34852 seconds, ready 34852 seconds
-**-v***verbosity* : increases/decreases the verbosity of the command.
**1* : only print error messages. This is the default.
**2* : also print warning messages.
**3* : also print tracing messages.
**4* : also print debugging messages.
-**-l***live* : changes the supervision directory of *service* to *live*. By default this will be `%%livedir%%`. The default can also be changed at compile time by passing the `--livedir=live` option to `./configure`. An existing absolute path is expected and should be within a writable and executable filesystem - likely a RAM filesystem—see [66-scandir](66-scandir.html).
-**-n** : do not display the field name(s) specified.
-**-o** : comma separated list of fields to display. If this option is not passed, *66-intree* will display all fields.
-**-g** : shows the dependency list of the *service* as a hierarchical graph instead of a list.
-**-d***depth* : limits the depth of the dependency list visualisation; default is 1. This implies **-g** option.
-**-r** : shows the dependency list of *tree* in reverse mode.
***(!)*** If tree is not specified *66-intree* will display information about all available trees for the current owner of the process. In this case, It displays first the trees which is not marked enabled in alphabetical order then the trees marked enabled in start order.
## Valid fields for -o options
-*name* : displays the name of the *tree*.
-*init* : displays a boolean value of the initialization state.
-*enabled* : displays a boolean value of the enable state.
-*start* : displays the list of *tree*(s) started before.
-*current* : displays a boolean value of the current state.
-*allowed* : displays the list of allowed user to use the *tree*.
-*symlinks* : displays the target of *tree*'s symlinks.
-*contents* : displays the contents of the *tree*.
## Command and output examples
The command `66-intree boot`, run as root user, on [Obarun](https://web.obarun.org)'s default system displays the following where *boot* is the tree used to properly boot the machine:
The field *Initialized* tells you if the tree was initialized with [66-init](66-init.html) tool.
The field *Enabled* reveals the state of the tree—see [66-tree -E](66-tree.html).
The field *Starts after* reveals the start process order if the *tree* is enabled, meaning which *tree* is started before the current one.
The field *Current* tells you if the tree is the current one or not—see [66-tree -c](66-tree.html).
The field *Allowed* gives you a list of user(s) allowed to handle the tree—see [66-tree -a|d](66-tree.html).
The field *Symlinks* tells you if the current live state point to the *source* or the *backup* of the *tree*. Every use of [66-enable](66-enable.html) tool create a automatic backup of the tree for `classic`,`bundle` or `atomic` service(s). A symlink pointing to *backup* mean that you have enabled a service without starting it. Right after a boot, each tree should point to *source*.
The field *Contents* gives you a list of all services enabled in the *tree*.
You can display the contents list as a graph and only these fields using the command `66-intree -o contents -g boot`:
```
Contents : /
├─(253,Enabled,classic) tty12
├─(0,Enabled,oneshot) system-hostname
├─(0,Enabled,oneshot) mount-run
├─(0,Enabled,oneshot) populate-run
├─(0,Enabled,oneshot) mount-tmp
├─(0,Enabled,oneshot) populate-tmp
├─(0,Enabled,oneshot) mount-proc
├─(0,Enabled,oneshot) mount-sys
├─(0,Enabled,oneshot) populate-sys
├─(0,Enabled,oneshot) mount-dev
├─(0,Enabled,oneshot) mount-pts
├─(0,Enabled,oneshot) mount-shm
├─(0,Enabled,oneshot) populate-dev
├─(0,Enabled,oneshot) mount-cgroups
├─(0,Enabled,bundle) 00
├─(0,Enabled,oneshot) modules-kernel
├─(485,Enabled,longrun) udevd
├─(0,Enabled,oneshot) udevadm
├─(0,Enabled,oneshot) devices-crypttab
├─(0,Enabled,oneshot) system-hwclock
├─(0,Enabled,oneshot) system-random
├─(0,Enabled,oneshot) modules-system
├─(0,Enabled,oneshot) system-sysctl
├─(0,Enabled,oneshot) system-fontnkey
├─(0,Enabled,oneshot) devices-dmraid
├─(0,Enabled,oneshot) devices-btrfs
├─(0,Enabled,oneshot) devices-lvm
├─(0,Enabled,oneshot) devices-zfs
├─(0,Enabled,bundle) system-Devices
├─(0,Enabled,oneshot) mount-swap
├─(0,Enabled,bundle) all-Mount
├─(0,Enabled,oneshot) system-fsck
├─(0,Enabled,oneshot) mount-fstab
├─(0,Enabled,bundle) all-System
├─(0,Enabled,oneshot) mount-rw
├─(0,Enabled,oneshot) local-iptables
├─(0,Enabled,oneshot) local-ip6tables
├─(0,Enabled,oneshot) local-loop
├─(0,Enabled,oneshot) local-sethostname
├─(0,Enabled,oneshot) local-time
├─(0,Enabled,oneshot) local-authfiles
├─(0,Enabled,oneshot) local-tmpfiles
├─(0,Enabled,oneshot) local-rc
├─(0,Enabled,oneshot) local-dmesg
├─(0,Enabled,bundle) all-Local
├─(0,Enabled,oneshot) all-Runtime
└─(0,Enabled,bundle) All
```
For each service the first field found between `()` parentheses is the corresponding pid of the service, the second one is the state of the service, and next to it is the type of the service, separated by commas, and finally the name of the service is displayed after the parenthesis `)`.
By default the dependency graph is rendered in the order of execution. In this example the `classic`*tty12* is the first executed service and `bundle`*All* is the last before it finishes. You can reverse the rendered order with the **-r** option.
You can display the name and current field and only these fields for each tree using the command `66-intree -o name,current`:
By default the dependency graph is rendered in the [start](start.html) order of execution. You can reverse the rendered order, meaning the [stop](stop.html) execution, with the `-r` option.
Without specifying the `-o`, all fields are displayed.
## Options
-**-h**: prints this help.
-**-n**: do not display the field name(s) specified. Combining this options with the `-o` facilitates scripting usage.
-**-o**: comma separated list of fields to display.
-**-g**: shows the dependency list of the *service* as a hierarchical graph instead of a list.
-**-d***depth*: limits the depth of the dependency list visualisation; default is 1. This implies **-g** option.
-**-r**: shows the dependency list of *services* in reverse mode.
-**-p***nline*: prints the *nline* last lines from the log file of the *service*. Default is 20.
## Valid fields for -o options
-**name**: displays the name.
-**version**: displays the version of the service.
-**intree**: displays the service's tree name.
-**status**: displays the status.
-**type**: displays the service type.
-**description**: displays the description.
-**partof**: displays the module name for services part of that module.
-**notify**: displays the number of the fd for readiness notification.
-**maxdeath**: displays the number of maximum death.
-**earlier**: displays if service is an earlier one.
-**source**: displays the source of the service's [frontend](frontend.html) file.
-**live**: displays the service's live directory.
-**depends**: displays the service's dependencies.
-**requiredby**: displays the service(s) which depends on service.
-**contents**: displays services within module.
-**optsdepends**: displays the service's optional dependencies. Also displays the name of the associated *tree* of the optional dependencies after the `colon(:)` mark if any.
-**start**: displays the service's start script.
-**stop**: displays the service's stop script.
-**envat**: displays the source of the environment file.
-**envfile**: displays the contents of the environment file.
-**logname**: displays the logger's name.
-**logdst**: displays the logger's destination.
-**logfile**: displays the contents of the log file.
## Usage examples
Displays all information of service `foo`
```
66 status foo
```
Only displays the field `name` and `status` of service `foo`
```
66 status -o name,status foo
```
Also, do not display the name of the field `name` and `status` of service `foo`
```
66 status -no name,status foo
```
Only displays the contents of the log file of the service `foo`
```
66 status -o logfile foo
```
Also, displays the last 100 lines of the log file of the service `foo`
```
66 status -o logfile -p100 foo
```
In a script you can do
```
#!/bin/sh
service="${1}"
type=$(66 status -notype${service})
if[${type}="classic"];then
echo${service} is a classic service
else if[${type}="module"];then
echo${service} is a module service
else if[${type}="oneshot"];then
echo${service} is a oneshot service
fi
```
Displays information of the service using the graph mode
```
66 status -g dbus
Name : dbus
Version : 0.0.1
In tree : global
Status : enabled, up (pid 731) 34829 seconds, ready 34829 seconds