ORTHOS2(1)
πΈ NAME πΈ
Orthos Client β Command Line Interface (CLI). This is the ORTHOS CLIENT manual, bestie, and it's all about the CLI. Slay.
β¨ BASICS β¨
okay so the Orthos CLI is a simple interactive shell. You can perform following tasks with the Orthos CLI:
- execute complex queries such as βwhich machines have more than 4 CPUsβ and are reserved by Manfred
- reserve or release a machine
- trigger installation of a machine
- view detailed machine information (such as
dmidecode,lspci,lsmodorhwinfo) - turn power on/off or just reboot a machine
- edit machine data
- Sync machines with a cobbler server
- Trigger machine data scans
- ...
π INSTALL THE CLI π
Python 3 is recommended.
zypper in orthos-client
In the Orthos Web Client you will find also the download link Download CLI to the CLI, here you have the possibility to download the suitable client for your distribution(.rpm). The button is in the top right corner.
π CONNECTING THE CLI TO THE ORTHOS SERVER π
The CLI has several options how you can set up the connection to the Orthos server and adapt it to your needs.
Here's the flag menu, one bullet per option, because we keep every detail:
-h,--helpβ show this help message and exit-H HOST,--host HOSTβ use the hostname specified on the command line instead of the one in the config file-P PORT,--port PORTβ use the port specified on the command line instead of the one in the config file-U USER,--user USERβ use the username specified--password PASSWORDβ Better use--tokeninstead (Create a token in the preferences section of the user on the web interface of the server)--token TOKENβ use this token for automatic authentication (e.g. for scripting);-U/--passwordoptions will be ignored-D,--debugβ write debugging output-L FILE,--logfile FILEβ use that together with-Dto log the debug output in a file rather than the console--no-pagerβ do not use pager when showing results-p,--plain-outputβ print plain output (e.g. for scripting)-F IFS,--ifs IFSβ set internal field separator (only useful in combination with-p; default is$OIFS)-q,--quietβ makes command line client quiet-v,--versionβ print version output--timezone TZβ set the local time zone (default is"Europe/Berlin")
and the literal help output, untouched:
you_machine:~ # orthos --help
usage: orthos [-h] [-H HOST] [-P PORT] [-U USER] [--password PASSWORD]
[--token TOKEN] [-D] [-L FILE] [--no-pager] [-p] [-F IFS]
[-q] [-v] [--timezone TZ]
Orthos command line interface.
optional arguments:
-h, --help show this help message and exit
-H HOST, --host HOST use the hostname specified on the command line instead
of the one in the config file
-P PORT, --port PORT use the port specified on the command line instead of
the one in the config file
-U USER, --user USER use the username specified
--password PASSWORD Better use --token instead (Create a token in the
preferences section of the user on the web
interface of the server)
--token TOKEN use this token for automatic authentication (e.g. for
scripting); -U/--password options will be ignored
-D, --debug write debugging output
-L FILE, --logfile FILE
use that together with -D to log the debug output in a
file rather than the console
--no-pager do not use pager when showing results
-p, --plain-output print plain output (e.g. for scripting)
-F IFS, --ifs IFS set internal field separator (only useful in
combination with -p; default is $OIFS)
-q, --quiet makes command line client quiet
-v, --version print version output
--timezone TZ set the local time zone (default is "Europe/Berlin")
Example for the connection to the Orthos Server:
your_machine:~ # orthos -H https://orthos-next.arch.suse.de
(orthos 2.0.0)
ποΈ ORTHOSRC CONFIGURATION FILE ποΈ
The orthos package installs an empty configuration file in |orthosrc_loc|. Once you connected to the orthos server, it is recommended to copy this file to your local config directory: ~/.config/orthosrc and adapt the file to your needs.
yes, |orthosrc_loc| is literally what's printed here, bestie. The docutils error at the bottom explains the vibe. π
π§ ORTHOS COMMAND EXAMPLES π§
π HELP π
Provides help and shows you an overview of the available Orthos CLI commands.
(orthos 2.0.0) help
Commands are:
INFO Retrieve information about a machine.
POWER Power cycles a machine.
REGENERATE Regenerate machine-related or service files.
RESCAN Rescan a machine.
SERVERCONFIG Show server configuration.
RESERVATIONHISTORY Show reservation history of a machine.
ADD Adds information to the database.
RELEASE Release machines.
QUERY Retrieve information about a machine.
RESERVE Reserve machines.
SETUP Automatic machine setup.
DELETE Removes information from the database.
ALIAS Define own aliases.
AUTH Request authorisation manually.
EXIT Exit program.
HELP Provides help.
(orthos 2.0.0) help info
Command to get information about a machine.
Usage:
INFO <fqdn>
Arguments:
fqdn - FQDN or hostname of the machine.
Example:
INFO foo.suse.de
(orthos 2.0.0) help power
Command to power cycle machines or the get the current status.
Usage:
POWER <fqdn> <action>
Arguments:
fqdn - FQDN or hostname of the machine.
action - Specify new power state. Actions are:
on : Power on.
off : Power off via SSH. If didn't succeed, use remote power.
off-ssh : Power off via SSH only.
off-remotepower : Power off via remote power only.
reboot : Reboot via SSH. If didn't succeed, use remote power.
reboot-ssh : Reboot via SSH only.
reboot-remotepower : Reboot via remote power only.
status : Get power status.
Example:
POWER foo.suse.de reboot
(orthos 2.0.0) help reserve
Reserves a machine.
Usage:
RESERVE <fqdn>
Arguments:
fqdn - FQDN or hostname of the machine.
Example:
RESERVE foo.suse.de
(orthos 2.0.0) help alias
Define or display aliases. The command can be called without any arguments, then it displays all available aliases. If it's called with one argument, then it displays the definition of a specific alias. If it is called with more than two arguments, then you can define new aliases.
To execute an alias, type the alias name with a leading '@'.
Usage:
ALIAS [alias] [*args]
Arguments:
alias - Alias name.
*args - Valid command string.
Example:
ALIAS
ALIAS allmachines query name, ipv4 where name =~ foobar
ALIAS allmachines
@allmachines
π QUERY π
Retrieve all kind of information about a machine or general orthos data. This is a very powerful command. It is built up similar to a SELECT SQL database statement. In fact it ends up in querying the underlying orthos server database:
query foo, bar where binary_attribute and int_attribute > XY and
char_attribute =~ "STRING"
-> This will search for and show the results (also attributes): foo and bar where the condition after where matches.
Examples:
query fqdn, cpu_physical
query fqdn where cpu_model =~ Intel
query fqdn where cpu_model =~ Intel OR !efi
More complex queries:
# Show full names and installed distributions of all machines which
# are not reserved (!res_by), which do run and have an orthos ssh key
# installed and therefore could be nightly scanned (status_login)
# which are not administrative, x86_64 machines and do have more than 7
# CPU cores:
query fqdn, inst_dist where !res_by and status_login and !administrative and architecture = x86_64 and cpu_cores > 7
Use alias(es) for more complex queries: To permanently define and use above command as an alias (auto-stored in ~/.config/orthosrc), make sure to not use any quoting, just do:
alias x86_free_running query fqdn, inst_dist where !res_by and status_login and !administrative and architecture = x86_64 and cpu_cores > 7
To use above defined alias (tab completion working...):
@x86_free_running
Valid operators are:
!<field>β not (binary fields only)==,=β exactly equal=~β contains=*β startswith!=β unequal>,<β greater or less than (number fields only)>=,<=β greater equals or less equals (number fields only)ANDβ logical conjunctionORβ logical disjunction
π¦ ORTHOS VARIABLES AND OBJECTS π¦
The Orthos Client has many objects that you can query from the machine objects in Orthos. The names are self-explanatory and can be used for queries as described under the query command above or you use the TAB completion feature to see available query attributes.
π DOCUTILS SYSTEM MESSAGES π
This one's literally in the manual, bestie β a little docutils hiccup, not a vibe:
System Message: ERROR/3 (docs/commandline.rst:, line 83)
Undefined substitution referenced: "orthosrc_loc".
Catch u later, bestie! π The footer label just repeats the manual name, the example prompts show orthos 2.0.0, and there's no separate source/version/date line to copy β byeee! π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: orthos-client 1.2.83+git.cb8bcaf-bp160.1.10 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms