2. Getting Started
2.1. Installation
check README.md how to install LN.
2.2. Test your Installation
to test whether your LN install was successful and whether your environment is setup correctly try to execute:
python3 -c "import links_and_nodes"
ln_manager --help
this should not output any errors and you should see the ln-manager help:
2022-03-16 15:25:01.79 info Manager: ln_manager <source tree>
2022-03-16 15:25:01.79 info Manager: python3.6 from /opt/python/osl153-x86_64/python3/stable/1.4.4/bin/python3.6 on linux-x86_64
usage: ln_manager [-h] [GENERIC_OPTIONS] ( -c config_filename [NEW_MANAGER_OPTIONS] | --connect HOST_OR_IP:PORT )
STARTUP MODE:
-c config_filename read configuration from given file and start a manager
--connect HOST_OR_IP:PORT
connect to an already running manager
GENERIC_OPTIONS:
-h show this usage info and exit
--log-level LEVEL sets the log-level. valid values are: debug, info, warning, error
--without-gui start without gui
--webui start without GUI, open /lnm/ in browser
--present present manager window after startup
--profile collect cProfile data and write to ln_manager.stats
--show-stats fn read cProfile file fn and print stats
--console start command console
--console-exec CMD start console and execute CMD
--mi-console start command console in machine-interface-mode
NEW_MANAGER_OPTIONS:
-i instance_name overwrite configured the name of this ln-instance!
-p PORT overwrite configured manager listening port
--start NAME starts process/state or group NAME after manager startup (can be specified multiple times)
--export-hosts SSHCFG read given ln-config file (maybe only hosts.inc.lnc?) and generate ssh config file
--isolated-test use unique, generated instance-name & manager-port and use private ln_daemon on localhost
2.3. ln_manager Consoles
ln_manager also provides interactive command-line consoles in addition to the GUI.
--consolestarts a console intended for interactive use by a human.
--mi-consolestarts a console with a more machine-oriented interface. This is useful when driving ln_manager from scripts or other tools and when parsing replies and notifications programmatically.
Both modes are useful for lightweight remote control tasks such as inspecting the current manager state, starting or stopping processes, reloading the configuration, or attaching to process output without using the GUI.
You can either start a new manager with a console on the current terminal, or connect a console to an already running manager.
For example, to start a new manager and use only the console without opening the GTK GUI:
ln_manager -c path/to/config.lnc --console --without-gui
To connect to an already running manager and open the machine-interface console, specify the host name or IP address and port of that manager:
ln_manager --connect HOST_OR_IP:PORT --mi-console
Inside the console, use help to list the available commands and
help COMMAND to show command-specific usage information.
--webuistarts without the GUI and opens the built-in
/lnm/URL in the user’s browser withxdg-open. When combined with--connect, it only opens that URL for the target manager and then exits immediately.