CLI Utilities

Tibbo's Linux devices are preloaded with several traditional command-line interface (CLI) utilities that are well-known by Linux users due to their usefulness. All of these CLI tools can be accessed via the Serial Console or through a Secure Shell (SSH) connection, and are available on both the LTPP3 and LTPP3(G2). Due to the limited scope of this documentation, only the most frequently encountered use scenarios and options for these tools will be covered below.

Managing systemd units

Many normal administrative tasks in a modern Linux system are conducted via the command systemctl. This tool allows you to control the behavior of units managed by systemd and serves as the primary means of rebooting and shutting down the system in the CLI.

To generate a list of all unit files, simply run systemctl list-unit-files; use the Page Up and Page Down keys to scroll through the list, and press Q to return to the CLI.

If you want to control the behavior of a specific unit, you can do so via the start, restart, and stop. For example, after making changes manually to the system's networking configuration, you might need to run systemctl restart systemd-networkd. If you need a unit to start when the system boots up, run systemctl enable XXX, where XXX is the name of the unit. Similarly, systemctl disable XXX will stop unit from starting when the system boots.

Finally, you can reboot and shut down the system via systemctl reboot and systemctl poweroff, respectively.

For more information about all the features of systemctl, please consult its man page.

Viewing the system journal

One of the most powerful tools in the Linux CLI utility arsenal is journalctl. Most of the system's logs are stored in the journal and journalctl provides a way to dynamically list events based on your needs.

Note that to ensure the most accurate results when using this tool, the system time must be set properly — the easiest way to do so is via the Web Interface's Time & Date page.

Running journalctl will present every entry in the journal, starting with the oldest entries. You can scroll through the entries with the Page Up and Page Down keys, and exit by pressing Q.

If you would like to see only the journal entries for the current boot, run journalctl -b.

To see journal entries for specific time frames, you can use the -- since and/or -- until options. These options must be followed by either relative values — yesterday, today, tomorrow, or now — or absolute time values, which take the format "YYYY-MM-DD HHMMSS" and must include the quotes. For example, running journalctl --since "2020-07-21 120000" would display all journal entries recorded since noon on June 21, 2020.

Perhaps the most useful way of filtering the journal is by unit, or services being run on the system. For example, running journalctl -u ag_server would display all journal entries related to AggreGate Server events.

Finally, this utility can be used to monitor the journal and display entries as they are created in real time by running journalctl -f. To stop following, press Ctrl+C.

For more details about journalctl, please consult its man page.


Monitoring system load

The default CLI utility to monitor system load on most Linux distributions is top. This interactive tool displays near-real-time information about CPU and RAM usage, as well as active processes and how much CPU time they are consuming, among other data. To exit the utility, press Ctrl+C.

Information on using the powerful interactive features of top is easily found online.

Checking disk space

To see the size and usage of all media mounted on the system, you can run df to display the information in 1K blocks. If you would prefer output in units more commonly used on a daily basis, run df -h to display the information in kilobytes (K), megabytes (M), and gigabytes (G).

The partition most likely to be of interest will be mounted on root (i.e., "/").

Managing networking functionality

The powerful iproute2 collection of utilities is available on Tibbo devices running Linux. This software package replaces several legacy tools for controlling and managing a wide range of aspects of networking in a Linux system.

The most commonly used utility in the collection is ip, which is used to query and configure the system's networking settings, including IP address, link configuration, routing tables, and tunnels. One of the most common use cases is getting a network adapter's IP address, which is accomplished by running ip address show.

For more information on all of the functionality provided by iproute2, please refer to its online documentation.