Ltos6 Cli
Ltos6 Cli
LANTIME OS Version 6
V6.16 Command Line Interface Reference
1 Introduction 1
3 Command Reference 3
3.1 Conguration Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.1 lscong - List Saved Congsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.2 rmcong - Delete a Congset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.3 dicong - Show unsaved Conguration Changes . . . . . . . . . . . . . . . . . . . . . . 5
3.1.4 checkcong - Check for unsaved Conguration Changes . . . . . . . . . . . . . . . . . . . 5
3.1.5 savecong - Save Conguration Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.6 loadcong - Load Congset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 File Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.1 pwd - Print Working Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.2 cd - Change Working Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.3 ls - List Directory Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.4 cp - Copy Files and/or Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.5 mv - Move Files and/or Directories or Rename them . . . . . . . . . . . . . . . . . . . . 8
3.2.6 rm - Delete Files and/or Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.7 cat - Show File Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Firmware Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.1 fwlist - List Installed Firmware Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.2 fwselect - Select/Show Activated Firmware Image . . . . . . . . . . . . . . . . . . . . . . 11
3.3.3 fwrm - Delete Firmware Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3.4 fwuncompress - Extract Firmware Image . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 User Account Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Network Conguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.1 netcong - Check for Network Conguration Changes and Apply them . . . . . . . . . . . 14
3.5.2 nicinfo - Show Physical Network Interface Conguration State . . . . . . . . . . . . . . . 14
3.5.3 nicmgr - Management of Physical Network Interfaces . . . . . . . . . . . . . . . . . . . . 15
3.5.4 netinfo - Show Logical Network Interface Conguration State . . . . . . . . . . . . . . . . 16
3.6 System Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.6.1 status - Show Status of System Services . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.6.2 start - Start a System Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.6.3 stop - Stop a System Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.6.4 restart - Restart a System Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.6.5 reload - Reload Conguration of a System Service . . . . . . . . . . . . . . . . . . . . . . 19
3.6.6 svccong - Check for System Service Conguration Changes and Apply them . . . . . . . 20
3.7 Showing Current Status Information - show and monitor . . . . . . . . . . . . . . . . . . . . . . 21
3.7.1 cpuload - Show CPU Utilization Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.7.2 devices - Meinberg Hardware Module and Components List . . . . . . . . . . . . . . . . . 22
3.7.3 ip - List all active IPv4 and IPv6 Adresses . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.7.4 lantimelog - Show LANTIME Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.7.5 linkstate - Show Connection Status of Physical Network Interfaces . . . . . . . . . . . . . 25
3.7.6 modules - Kernel Driver and Module List . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.7.7 network - Show current Network State . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.7.8 Processes - List System Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.7.9 route - List all active IPv4 and IPv6 Network Routes . . . . . . . . . . . . . . . . . . . . 29
3.7.10 syslog - Show System Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.7.11 version - Show Current Firmware Version . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.8 System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.8.1 reboot - Full System Restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.8.2 make_noise - Visual and Audio Identication of a Device . . . . . . . . . . . . . . . . . . 33
0
Page 0
4 Text Editors 34
4.1 nano . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2 edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.3 vim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
1 Introduction
The conguration and management of a Meinberg LANTIME network time server can be performed using a
number of dierent user interfaces. The graphical user interface of such a device is accessible using a web browser
and oers the possibility to review the current status of the system and to visualize statistical values using the
web based diagram software called xtrastats.
The command line interface (CLI) of the sixth LANTIME rmware generation is using a text-only (non-graphical)
approach. It can be accessed using local connections (serial console ports) or remote network connections (SSH
or Telnet). The CLI is based on a standard Unix shell interpreter called Bourne Again Shell (Bash), oering
comfortable editing of a command line by using the cursor keys and delete/backspace. By accessing a command
history using the up/down cursor keys, the shell allows to modify an already used command or simply execute it
again, without modication, if required. The tabulator key (Tab) can be used to auto-complete a command and
saves the user from having to type in the full command name.
By using a standard shell the LTOS6 rmware environment can benet from a number of additional advan-
tages. A Unix system administrator will certainly already know how to work with a shell and by making use of
the script language elements of the shell, very sophisticated or recurring command sequences can be automated.
In addition to the Bourne Again Shell the so-called Debian Almquist Shell ("Dash") and the standard Almquist
Shell ("ash") are available on the system and can be used in addition or as a replacement to the standard shell.
This reference manual does not contain a description for every of the more than 400 commands that are available
on a LTOS6 system. It tries to cover the most popular commands, especially those that are LANTIME specic
and that are not existing on other Unix- or GNU Linux based systems. A number of commands allows to read a
short help text describing the parameters and use of the command by executing "commandname -h".
For any questions regarding the LANTIME command line interface, please contact your Meinberg Technical
Support.
Serial Console
Serial console ports are located on the front panel or (in modular systems) on the CPU module (some devices
come with both a front port and a CPU console port). These ports can be accessed with a serial terminal running
at 38400 baud and using 8 data bits, no parity, 1 stop bit (8N1).
Logging in
The default conguration knows one user account (root) with a standard password (timeserver). Other users can
access the CLI only if their access level has been set to "Super User". If that is not the case, the system will
reject the user and does not allow to access the command line interface.
A "Super User" will be presented with a system status overview after successfully authentication, followed by a
shell prompt.
Automatic Logout
The CLI will automatically terminate a CLI session if a user does not enter a command for more than 300 seconds
(5 minutes). This timeout can be disabled by entering the "no_shell_timeout" command. It can be changed
by using the "set TMOUT=x" command (x represents the new timeout in seconds).
To edit a command line, the left/right cursor keys (or, alternatively, CTRL+B and CTRL+F) can be used
to move the cursor. Entering ESC+F and ESC+B will move the cursor to the beginning of the next or previous
word. And BACKSPACE (CTRL+H) deletes the character to the left of the cursor.
Command History
Already entered and processed commands can be recalled within a CLI session by using the cursor up/down keys
(or CTRL+P and CTRL+N). It is possible to search for an already entered command line by pressing CTRL+R
and then starting to enter a search pattern. If more than one command line matches the entered pattern, re-
peatedly pressing CTRL+R will toggle through the matching entries.The "history" command lists all previously
entered and processed commands.
3 Command Reference
This chapter descibes all available CLI commands and their parameters.
Conventions
The command names in this chapter are shown in bold characters, parameters (if supported) are represented
in italic characters. If a parameter or part of the commandline is optional, i.e. it does not have to be entered, it
is surrounded by brackets [ ].
The character "#" at the beginning of a line represents the shell prompt, which will contain dierent char-
acters depending on the conguration and status of the device.
Examples:
# pwd
(shows the name of the currently selected directory)
# ls [path]
(shows the content of the specied path [path] or - if no [path] parameter has been entered, the content of the
current directory.
This command lists all les included in a saved conguration (i.e. a so-called "congset") for a given pack-
age. It can also list all saved congsets for a given package.
If both package and congset have been specied, the command will show all les included in the speci-
ed congset for the given package. If only the package is provided, lscong will output a list of all available
congsets that include saved conguration les for the specied package. If "all" is specied as the package
name, the command covers all installed packages.
Examples
This command deletes a saved conguration (i.e. a so-called "congset"). Attention: rmcong does not ask for
a conrmation, it immediately removes the selected congutation from the ash memory of the device. This is
non-reversible and therefore requires you to be very careful when using this command.
The parameter package species the package whose conguration should be deleted. This could be "network" or
"lantime" or "snmp". The available packages can be found by looking at the contents of the /package directory,
in which you can nd a subdirectory for each package installed. If the given package name is "all", the whole
conguration set will be deleted.
The congset parameter denes the saved conguration ("congset") from which the package conguration
shall be deleted. It is not allowed to use "default" because the default conguration of a package cannot be
deleted. By specifying the congset "startup", the default package conguration will be restored during the next
system start.
Examples
With this command a saved conguration (i.e. a so-called "congset") can be compared with the current
conguration. This allows to check for unsaved conguration changes.
The parameter package species the package whose conguration should be compared. Examples would be
"network" or "lantime" or "snmp". If the given package name is "all", the complete conguration set will be
compared. This is the default behavior if no package name is specied on the command line.
The congset parameter denes with which saved conguration ("congset") the currently running congu-
ration should be compared.If this is not specied on the command line, the congset "startup" is used as a default.
Examples
# dicong
(shows the dierences between the current conguration to the "startup" congset, i.e. for all packages)
This command shows whether an unsaved conguration change has been detected or not. It does not show
any details on conguration changes (like dicong).
# checkcong
This command must be run without any parameters.
Examples
# checkcong
No conguration changes.
This command saves the currently active conguration in a conguration set ("congset"). It can be used
to persistently store conguration changes (by saving them to the "startup" congset that is loaded during the
powerup/boot sequence) and to backup a conguration.
package species the package whose conguration should be saved. Examples for this are "snmp" or "ssh"
or "network". If no package name is provided on the command line, the conguration for all packages is saved
as a standard behavior.
The congset parameter denes the saved conguration ("congset") to which the package conguration(s)
shall be saved. It is not allowed to use "default" because the default conguration of a package cannot be
overwritten/changed. By specifying the congset "startup", the conguration will be restored during the next
system start. If no congset name is specied, the startup conguration set ("startup") is used as a default.
Examples
# savecong snmp
(saves the SNMP conguration to the startup conguration "startup")
The loadcong command loads the conguration for the whole system (all packages) or a given package from a
previously saved conguration set ("congset"). It can be used to restore the default conguration, the startup
conguration or a conguration backup.
The package parameter species the package whose conguration should be loaded. Using "all" will load
the conguration for all packages. If no package name is provided on the command line, "all" is assumed as the
standard behavior.
With the congset parameter the name of the previously saved conguration ("congset") is dened. The
package conguration(s) is loaded from this conguration set. Specifying "default" will load the default values of
the package and "startup" loads the startup conguration set that is automatically loaded during the powerup/-
boot process. If no congset is given, the "startup" congset is loaded.
Examples
# loadcong snmp
(loads the SNMP conguration from the startup conguration "startup")
The pwd command prints the name and path of the current working directory.
# pwd
This command does not require any parameters.
Examples
# pwd snmp
/var/run
# cd [directory]
The system changes the working directory to the given directory or, if no directory has been specied, to the
home directory of the current user.
Examples
# cd /etc
(sets the working directory to /etc)
# cd
(changes to the home directory of the current user, e.g. /root for the root user)
# ls [Options] [directory]
The content of the given directory are printed. A large number of options is available which control how the
ls command lists all the les and subdirectories. Please use the "help" option to get a list of all supported options.
Examples
# ls /var/log
(shows the content of the /var/log directory in standard output format)
# ls -l /var/run
(lists the les and subdirectories of the /var/run directory, using the "long" output format (-l) which shows a
number of details like le sizes)
One or more les can be specied as the source(s), wildcards (like * or ?) are allowed. The target can ei-
ther be a directory or, if the source is one single le, a target lename.
Copying a whole directory structure is possible by using the "-r" (recursive) option.
Examples
# cp /etc/hosts /var/tmp
(copies the le hosts from the /etc directory into the target directory /var/tmp where it will be stored under the
same name, i.e. hosts)
# cp /config/global_configuration /var/tmp/mycopy
(copies the le global_conguration from the /cong directory into the target directory /var/tmp using the target
lename mycopy)
# cp /etc/ssh/ssh_* /tmp/
(copies all les form /etc/ssh with a lename beginning with "ssh_" into the directory /tmp)
# cp -r /etc/udev /tmp/
(creates a copy of the /etc/udev directory with all subdirectories and containing les in the target directory /tmp)
The "mv" command moves les or whole directories from one location to another. It can be used to rename les
and directories, too.
One or more les can be specied as the source(s), wildcards (like * or ?) are allowed. The target can ei-
ther be a directory or, if the source is one single le, a target lename. In this case, the original le will be moved
and renamed at the same time.
Examples
# mv /dir_a/file_a /dir_b/file_b
(moves the le le_a from the /dir_a directory into the target directory /dir_b and renames it to le_b)
# mv /dir_a/file_a /dir_b/
(moves the le le_a from the /dir_a directory into the target directory /dir_b but preserves the lename)
# mv /dir_a/file_*.txt /tmp/
(moves all les from /dir_a with a lename beginning with "le_" and ending on ".txt" into the directory /tmp)
# mv /dir_a/ /tmp/
(moves the whole directory /dir_a with all its subdirectories and included les into the /tmp directory)
The "rm" command deletes one or more les or whole directories (including all their content, i.e. les and
subdirectories). It is possible to use wildcard characters to delete a group of similar named les, e.g. "*.bak"
includes all lenames that end on ".bak". Since deleting les and directories can lead to system malfunction and
all kinds of failures, the "rm" command should only be used if you are 100% sure that the specied les/directo-
ries are not required for proper operation of the LANTIME system. If you are in doubt, please contact Meinberg
support.
Deleted les and directores cannot be restored and are lost forever. Because of this, the "rm" command should
be used with the greatest caution.
One or more les can be specied, wildcards (like * or ?) are allowed. If a whole directory and all its con-
tents shall be deleted, the "-r" option needs to be specied.
There is no "Are you sure?" prompt shown before the deletion is carried out, the system will im-
mediately delete the specied les. In order to avoid system failures, please triple check whether the
le(s) and/or directories you specify are really OK to be deleted.
Examples
# rm /dir_a/file_a
(deletes the le le_a from the /dir_a directory)
# rm -r /dir_b/
(deletes the whole /dir_b directory and all included les and subdirectories - forever)
# cat [lename]
The content of the given le is printed. The "cat" command can be combined with the "less" command to
allow paginated output and oers an easier way to review a le.
Examples
# cat /var/log/messages
(shows the content of the le messages in the /var/log directory)
The "fwlist" command prints a list of all rmware images which are installed on the device.
The [searchpattern] parameter can be used to lter the list of installed rmware images. If no searchpattern
is specied, all installed images are listed. The "-v" option will show the version number of each rmware image
behind its name.
Examples
# fwlist
(shows all installed rmware images)
# fwlist -v fw_*
(shows all installed rmware images with a name beginning with "fw_" and their respective rmware revision)
# fwlist OSV
(shows the installed rmware image with the name "OSV")
With the "fwselect" command it is possible to activate an installed rmware image, i.e. that rmware im-
age is started during the next boot sequence. If an error occurs during the activation, the system will roll back
to the previous state.
If fwselect is started without any parameters, it will show the name of the activated rmware image, i.e. the
image that is going to be used at the next system start.
# fwselect [FWImage]
The [FWImage] parameter species which rmware image is going to be used at the next system start. Without
this parameter, "fwselect" will print the name of the currently selected image and exits.
Examples
# fwselect
(shows the currently activated rmware image)
# fwselect fw_6.12.004
(selects the image "fw_6.12.004" and tries to prepare the system to use this image at the next boot sequence)
The "fwrm" command can be used to delete one or more rmware images from the internal ash memory
to regain space.
# fwrm [FWImage]
or
The FWImage parameter denes which image will be deleted. The secon form (wipe-all) deletes all rmware
images except the OSV image, the currently running image and - if dierent from the running image - the rmware
image that has been selected to be activated at the next system start. The optional "keep" parameter allows
to specify how many rmware images should be preserved in addition to the non-deletable images mentioned above.
Examples
# fwrm fw_6.14.021
(deletes the rmware image fw_6.14.021)
Starting with version 6.15 all rmware updates will be installed in compressed form to preserve ash space.
Such an image is read-only and cannot be modied, i.e. it is not possible to add or remove les or change
their content in any way. Under normal circumstances this is not required and therefore it is recommended to use
compressed images instead of uncompressed ("standard") ones. If it is necessary for a specic user requirement to
change the contents of a rmware image, the "fwuncompress" command can extract the contents of a compressed
image and create a new, uncompressed copy of it. The (compressed) source image will not be touched or changed
in any way by "fwuncompress" and, if not required anymore, would have to be deleted manually afterwards using
the "fwrm" command.
It is possible to uncompress the currently running rmware image without any problems.
# fwuncompress FWImage
The specied image (name usually starts with "fw_") will be used to create an uncompressed copy of it. The
newly created image will get a prex "u", i.e. uncompressing a rmware image "fw_6.15.015" will create an
uncompressed image named "ufw_6.15.015".
Examples
# fwuncompress fw_6.16.002
(extract the contents of the compressed rmware image fw_6.616.002, creating a new image named ufw_6.16.002)
The main conguration le for network related settings is /etc/mbg/net.cfg which contains denitions and pa-
rameters for all physical and logical ("virtual") network interfaces. This le, its structure and content, is described
in detail in the Conguration Files chapter.
3.5.1 netconfig - Check for Network Configuration Changes and Apply them
Purpose
With netcong the system will compare the state of all network interfaces (both physical and virtual) with
their conguration. If any required changes are detected, they will be applied.
If, for example, a virtual interface has been congured but is missing, it will be created and congured ac-
cording to the net.cfg contents.
# netcong
This command does not support any parameters.
Examples
# netcong
(checks all network interfaces and applies changes, if the conguration diers from the current state)
nicinfodisplays the conguration status of physical network interfaces. It lists the MAC address, the assigned
bonding group, the link speed and duplex mode as well as the IPv6 mode.
-s Short Mode
This option leads to a very compact output, only indicating the current conguration state of an interface:
If an interface name is specied with the INTERFACE parameter, "nicinfo" will only show information about the
specied interface (e.g. lan0). If this parameter is not specied or empty, the command will output information
about all interfaces.
Examples
# nicinfo
Please wait ...
Current state of physical interfaces:
lan0 matches configuration (lan0 00:13:95:00:6b:ef - 100FDX AUTO=ON
IPV6=ACTIVATED+AUTOCONF)
lan1 matches configuration (lan1 00:60:6e:7a:d3:4d - 10HDX AUTO=ON
IPV6=ACTIVATED)
lan2 matches configuration (lan2 00:60:6e:7a:d3:4e - 10HDX AUTO=ON
IPV6=DEACTIVATED)
lan3 matches configuration (lan3 00:60:6e:7a:d3:4f - 10HDX AUTO=ON
IPV6=DEACTIVATED)
# nicinfo -s
=lan0
!lan1/1
=lan2
=lan3
(shows conguration state for all interfaces, in this case there is a pending change for lan1)
# nicinfo -c lan0
Please wait ...
Current state of lan0:
Status of physical interface lan0 is 100FDX LINK_CHECK=ON
(shows the link state of lan0 - 100Mbit/s Full Duplex - and whether it is monitored or not)
The "nicmgr" command allows to add uncongured physical network interfaces to the network conguration
in order to be able to assign virtual network interfaces to them. This is necessary whenever new network interface
cards are added to an existing system, for example by inserting a new LNE module into a device. It is also possible
to remove network interfaces from the conguration with nicmgr, if those physical network interfaces have been
permanently removed from the system.
# nicmgr help
or
# nicmgr autoassign
or
# nicmgr autoreplace
The FREE_IF parameter represents an uncongured/uninitialized network interface. These interfaces are named
ethX (X is a running number which is assigned at startup or directly after a network expansion module has been
inserted into the system). When a LANTIME Network Expansion (LNE) card is added to the system, the four
new interfaces will be named "eth0, eth1, eth2 and eth3. As soon as they have been correctly added to the
conguration, they will be renamed lanX (where X is also a number that has been assigned by the user or the sys-
tem). The rst physical network interface is always located on the management CPU module and is named "lan0".
IFNUMBER is the number of an already added (congured) port, therefore IFNUMBER=1 refers to the physical
interface lan1, a "5" means lan5 and so on.
The two commands "autoassign" and "autoreplace" simplify the addition or the replacement of multiple ports.
"autoassign" automatically adds all detected and currently uncongured network interfaces to the conguration.
The "autoreplace" command searches for congured but missing interfaces (e.g. if a LNE card has been removed
due to a failure, its interfaces are still in the conguration but they are missing). If it nds missing interfaces and
uncongured interfaces, it will replace the conguration of the rst missing interface with the rst uncongured
interface, the second missing interface with the second uncongured interface and so on.
Examples
# nicmgr remove 6
(removes lan6 from the system conguration)
# nicmgr autoassign
(automatically adds all uncongured/unassigned interfaces to the system conguration)
# nicmgr autoreplace
(replaces all missing physical network ports with available uncongured ethX interfaces)
netinfo displays the conguration status of logical ("virtual") network interfaces, it shows IP addresses and
the conguration state of the interface(s), i.e. if an interface state corresponds to the congured state.
-s Short Mode
This option leads to a very compact output, only indicating the current conguration state of an interface:
If an interface name is specied with the INTERFACE parameter, "nicinfo" will only show information about the
specied interface (e.g. lan0:0). If this parameter is not specied or empty, the command will output information
Examples
# netinfo
Current state of logical interfaces:
bond0:2 matches configuration (STATIC 10.99.109.11 255.255.255.0 - NONE)
lan0:0 matches configuration (DHCP - - - NONE)
lan1:1 [Virtual Interface 1] is not active and requires to be configured
bond0:3 has no configuration
# netinfo -s
=bond0:2
=lan0:0
+lan1:1
_bond0:3
# netcinfo -s -i lan0:0
=lan0:0/0
(like above, but now contains the interface number, too: /0)
In certain situations, it can be necessary to check the status of a service or manually start or stop it. After
a manual conguration le change it is often required to restart a related service to force it to apply the changed
conguration.
With the command "status all", the running state of all registered services will be listed and therefore can
be used to nd out which services are available on a certain device.
This chapter describes the various CLI commands that control the system services.
The status command shows whether a specied system service is currently running or not. It is also possible
to get the status for all services.
# status service
The only parameter is the name of the service for which the running state should be shown. Specifying "all"
instead of a certain service name will result in showing the state of all services.
Examples
# status ssh
(shows whether the SSH service is currently running or not)
# status all
(lists the state of all system services)
With this command, a specied system service can be started if it is not already running.
# start service
The service parameter species which service should be started. The system rst checks whether the service
is already running or not. If it is, nothing will happen. You can check the running state of a service with the
status command.
Examples
# start ssh
(starts the SSH service if it is not already running)
# start http
(starts the HTTP service)
The stop command will stop a specied system service, i.e. the relevant processes are terminated.
# stop service
With the service parameter you can specify which service should be stopped. The system rst checks whether the
service is currently running or not. It will only try to stop the service if it is running, otherwise nothing will happen.
The system stops a network related service automatically if it has been disabled on all interfaces. Stopping such
a service will immediately result in terminating any active connections and disables connectivity on all interfaces.
Examples
# stop ssh
(stops the SSH service if it is running - ATTENTION: this will immediately terminate any active SSH connection,
including the one that you used to enter this command)
# stop https
(stops the HTTPS service)
The restart command stops a service (if it is running) and then restarts it. If it was not running when the
restart command has been called, it is started normally (omitting the "stop" command).
# restart service
service species which service should be restarted. The system rst checks whether the service is already running
or not. If it is, it will stop the service and then restart it. A non-running service will simply be started.
Examples
# restart ssh
(restarts the SSH service, active connections are terminated)
# restart http
(restarts the HTTP service)
The reload command forces a service to reload its conguration, for most services this is achieved by restarting
them (see "restart" command, but "reload" automatically chooses the applicable way for each service.
# reload service
The service parameter species for which service the conguration should be reloaded.
Examples
# reload ssh
(reloads the SSH service conguration by restarting it)
# reload http
(reloads the HTTP service conguration by restarting it)
3.6.6 svcconfig - Check for System Service Configuration Changes and Apply them
Purpose
The svccong command will check for all services if one of the registered conguration les changed (since
the last start of the service). If such a change is detected, the corresponding service is forced to reload its
conguration (with the reload command). A list of all registered conguration changes can be found in the
/var/run/services/svccfg.db le. This le can be inspected by using the cat command.
# svccong
This command does not support any parameters. It will always check all registered les for all services.
Examples
# svccong
(checks all registered conguration les for all services and, if a le change has been detected, reloads the
corresponding service)
This information can be requested by using one of the two commands "show" and "monitor". While "show" will
display the current status and then returns to the command prompt, "monitor" will keep running and updates
its output in a xed time interval. In order to return to the command prompt, "monitor" has to be stopped by
pressing CTRL+C.
After the "show" or "monitor" command word it is necessary to specify which type of information should be
displayed. The dierent types of information are provided by so-called plugins, each of them generating a specic
type of status information. The "ip" plugin for example can generate and output a list of all IP addresses currently
used by the system. In order to get this information, the user either has to enter the command "show ip" (will
generate and show a list of all IP addresses and then returns to the command prompt) or "monitor ip" (the IP
address list is shown and will for example be updated every 10 seconds until CTRL+C is pressed to stop the
monitor command).
The following sections will explain the available plugins and, if necessary, their additional parameters.
The "cpuload" module shows the current CPU utilization metrics of the system.
# show cpuload
or
# monitor cpuload
This command does not have any additional parameters. The following output line will be generated once
(using the "show" command) or every 5 seconds (using the "monitor" command):
Tue Jan 21 12:52:26 UTC 2014 Cpu(s): 3.0%us, 4.8%sy, 0.0%ni, 92.1%id,
0.0%wa, 0.0%hi, 0.1%si, 0.0%st Loadavg: 0.36 0.21 0.19 1/80 12803
"Tue Jan 21 12:52:26 UTC 2014" is the current date/time, "Cpu(s): 3.0%us, 4.8%sy, 0.0%ni, 92.1%id, 0.0%wa,
0.0%hi, 0.1%si, 0.0%st" indicates the CPU utilization for each CPU state (us=User, sy=System, ni=nice, wa=I/O
wait, hi=Hardware IRQ, si=Software IRQ, st=Steal Time), "Loadavg: 0.36 0.21 0.19" represents the load average
values for the last 1, 5 and 10 minutes and "1/80 12803" shows the number of currently running/total processes
and the last assigned process ID.
Examples
# show cpuload
(shows the current CPU utilization)
# monitor cpuload
(continously shows the CPU utilization every 5 seconds)
# sc
(shortcut for "show cpuload")
# mc
(shortcut for "monitor cpuload")
The "devices" module shows the system details and a list of detected Meinberg hardware components.
# show devices
or
# monitor devices
This command does not have any additional parameters. The following output line will be generated once
(using the "show" command) or every 10 seconds (using the "monitor" command):
System Details
System ID: M200
Backplane: P
CPU Carrier: V33
Platform: AMDCONGA
CPU Board: E900
CPU ID: CPU=AuthenticAMD CPUID=AuthenticAMD MODELID=...
RAM: 100868 kB
System Components
Bus/Id Device Product Ver Serial Status
USB 001/005: 1938:0101 Meinberg CPC - Control Panel Controller 1.12 1.0.0
0x0001
Examples
# show devices
(shows the system details and the list of detected Meinberg components)
# monitor devices
(continously repeats the "show devices" command until CTRL+C has been pressed)
# sd
(shortcut for "show devices")
# mc
(shortcut for "monitor devices")
# show ip [Filter]
or
# monitor ip [Filter]
The "[Filter]" parameter is optional and allows to lter the output of "show ip" or "monitor ip" using a search
keyword.
In the "monitor" mode, the list of IP addresses is automatically refreshed every 10 seconds, until CTRL+C
has been pressed.
The output of "show ip" / "monitor ip" looks like this (example):
The rst column represents the interface name, which is composed from the name of the physical port (e.g.
"lan0" for the rst Ethernet port or "bond2" for an interface that is part of the bonding group 3) and the ID
of the logical ("virtual") network interface. This can be either the interface number (":0" for the rst virtual
interface) or the VLAN ID (".120" for VLAN ID 120) .
The second column lists the type of the address, this can be "static" for manually congured static IP addresses,
"dhcp" for IP addresses automatically assigned by DHCP/DHCPv6, "linklocal" for IPv6 Linklocal addresses or
"ra" for IPv6 addresses assigned by a router advertiser.
Whether an IP address entry is an IPv4 or IPv6 address is specied in the third column.
The fourth and last column nally shows the IP address and either the netmask (for IPv4) or the prex length
(for IPv6).
Examples
# show ip
(shows the current list of all active IP addresses)
# monitor ip
(like "show ip", but automatically refreshes every 10s)
# show ip lan0
(shows all IP addresses assigned to the physical port "lan0")
# show ip ipv6
(shows only the IPv6 addresses)
# show ip dhcp
(lists all IP addresses assigned by DHCP or DHCPv6)
# monitor ip bond
(lists all IP addresses assigned to one of the bonding interfaces and refreshes automatically every 10s)
This "show" plugin lists the entries of the LANTIME log le (/var/log/lantime_messages), a le that only
contains the most important events.
If a Filter parameter has been added, only those lines in the log le will be printed that contain the given
lter string (this is not case sensitive). If no lter is specied, all entries will be listed.
# show lantimelog
2014-11-20 13:26:55 UTC: LANTIME -> OSCILLATOR ADJUSTED [Refclock: 1 ]
2014-11-20 13:26:07 UTC: LANTIME -> NORMAL OPERATION
2014-11-20 13:26:03 UTC: LANTIME -> NETWORK LINK UP [Affected LAN
Interface: 1 ]
2014-11-20 13:25:57 UTC: LANTIME -> NTP RESTART
2014-11-20 13:25:57 UTC: LANTIME -> NTP SYNC TO GPS
#
Examples
# show lantimelog
(shows the full LANTIME protocol le )
# monitor lantimelog
(lists the last 20 entries and then waits for new entries, cancel waiting with CTRL+C)
# s la
(short form of "show lantimelog")
# m la
(short form of "monitor lantimelog")
The "linkstate" plugin shows the current network connection state of one or more physical network interfaces.
The "monitor" mode automatically refreshes the output every 10 seconds until CTRL+C has been pressed.
The rst column contains the name of the interface, e.g. "lan0" for the rst physical port.
The second column represents the MAC address of the interface and the third column indicates the current
connection state. This can be either "NO_LINK", if no active connection could be established, or it shows the
current connection speed (10, 100, 1000 or 10000) in MBit/s plus the duplex mode (FDX for full duplex or HDX
for half duplex).
Examples
# show linkstate
(shows the connection state of all physical network interfaces)
# monitor linkstate
(like "show linkstate", but refreshing the output every 10s until CTRL+C has been pressed)
# s li
(short form of "show linkstate")
# m li
(short form of "monitor linkstate")
This "modules" plugin shows a list of all loaded kernel modules and drivers. If you want to show all detected
hardware modules and components in your system, please check out the "show devices" command.
# show modules
or
# monitor modules
This command does not have any additional parameters. The following output line will be generated once
(using the "show" command) or every 10 seconds (using the "monitor" command):
Examples
# show modules
(shows all currently loaded kernel modules)
# monitor modules
(continously repeats the "show modules" command until CTRL+C has been pressed)
# sm
(shortcut for "show modules")
# mm
(shortcut for "monitor modules")
This command shows an overview of the currently active network conguration, including the assigned IP ad-
dresses, the link state of the physical network interfaces and, if appropriate, the state of bonding groups.
# show network
This command does not have any additional parameters. The following output line will be generated:
Examples
# show network
(shows the currently active network conguration)
# sn
(shortcut for "show network")
The "show processes" command generates a list of all processes currently running on the system. In combi-
nation with a lter string it is possible to check if a certain command or software component has been started
and is still running.
In the "monitor" mode, the list of processes is automatically refreshed every second until CTRL+C is pressed.
The output of "show processes" / "monitor processes" looks like this (example):
The rst column represents the process ID and the second column contains the terminal name (TTY), which can
be "?" for internal processes not bound to a specic terminal.
In the fourth column the cumulative CPU time used by this process and - after that - the command itself, typically
with its parameters, is listed.
Examples
# show processes
(shows the current list of all processes currently running on the system)
# monitor processes
(like "show ip", but automatically refreshes every second)
# sp
(short form of "show processes")
# m p ntp
(short form of "monitor processes ntp")
3.7.9 route - List all active IPv4 and IPv6 Network Routes
Purpose
The "route" plugin show all currently active IP routes and routing rules.
In the "monitor" mode, the routing entry list is automatically refreshed every 10 seconds, until CTRL+C has
been pressed.
The output of "show route" / "monitor route" looks like this (example):
Routing Rules:
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
Examples
# show route
(shows the current list of all active IP network routes)
# monitor route
(like "show route", but automatically refreshes every 10s)
# sr
(short form of "show route")
# mr
(short form of "monitor route")
This "show" plugin lists the entries of the system log le (/var/log/messages), a le that contains all events
and status changes.
If a Filter parameter has been added, only those lines in the log le will be printed that contain the given
lter string (this is not case sensitive). If no lter is specied, all entries will be listed.
# show syslog
Dec 15 10:41:08 timeserver root: Restarting syslog due to configuration
change ...
Dec 15 10:41:08 timeserver syslog-ng[7864]: Termination requested via
signal, terminating;
Dec 15 10:41:08 timeserver syslog-ng[7864]: syslog-ng shutting down;
version=’2.0.9’
Dec 15 10:41:08 test_tr0_lt04 syslog-ng[22289]: syslog-ng starting up;
version=’2.0.9’
Dec 15 11:19:40 test_tr0_lt04 sshd[5061]: Accepted password for root from
172.16.3.120 port 41449 ssh2
Dec 15 11:19:40 test_tr0_lt04 sshd[5061]: pam_unix(sshd:session): session
opened for user root by (uid=0)
Dec 15 11:19:46 test_tr0_lt04 sshd[5061]: Received disconnect from
172.16.3.120: 11: PECL/ssh2 (http://pecl.php.net/packages/ssh2)
Dec 15 11:19:46 test_tr0_lt04 sshd[5061]: pam_unix(sshd:session): session
closed for user root
#
Examples
# show syslog
(shows the full system protocol le )
# monitor syslog
(lists the last 20 entries and then waits for new entries, cancel waiting with CTRL+C)
# ss
(short form of "show syslog")
# ms
(short form of "monitor syslog")
# s
(short form of "s s")
# m
(short form of "m s")
The "version" module shows the rmware version of the currently running rmware image.
# show version
Examples
# show version
(shows the rmware version)
# sv
(shortcut for "show version")
The reboot command initiates a restart of the whole system. This includes stopping all services and reset-
ting the CPU. Please note that any unsaved conguration changes are not automatically saved, therefore the
system comes back up with the last startup conguration that was saved using savecong.
It is possible to specify a delay, i.e. the reboot process waits for a given time before carrying out the system
restart. Such a delay can be applied in the background, allowing a user to continue to work in the foreground, e.g.
changing conguration les and applying changes. A backgrounded reboot process kan be canceled at any time
during the waiting period, allowing a user to set a reboot time before trying to change the system conguration.
If one of these changes results in the system becoming unreachable (e.g due to a network IP address conguration
error), the backgrounded reboot process will automatically restart the system after the specied time and restores
the last saved startup conguration, resulting in a restore of the network connectivity. Once the user completed
and tested all conguration changes successfully and veried that the system is still reachable, the waiting reboot
process can be canceled.
reboot noties all logged in users in active SSH, TELNET and serial console sessions about the reboot and
the specied waiting period. This enables everyone to save any changes made and log out correctly or cancel the
restart, as long as the reboot process is still in a waiting state.
In order to be able to continue to work in the same SSH/TELNET/serial console session, the reboot com-
mand can be told to wait in the background instead of blocking the shell prompt. This background mode is
enabled by adding a "&" character at the end of the command line.
A waiting reboot process can be canceled by specifying "stop" instead of a delay. This can be used to stop
a restart process that is waiting in the background but it can also be used to cancel the reboot process of another
user.
If no parameter is given, reboot will restart immediately, i.e. after the default waiting time of 2 seconds.
Examples
# reboot
(immediately restarts the system, i.e. after the 2s default waiting period)
# reboot 20
(restarts in 20 seconds)
# reboot 1h
(restarts in 1 hour)
# reboot 5m &
(restarts in 5 minutes, but waits in the background allowing the user to enter additional commands in the mean-
time)
# reboot stop
(cancels any waiting reboot process, no matter if that is a backgrounded process or had been initiated by a
dierent user)
The make_noise command allows to identify a device in a server room or rack via beep sounds and periodical
blinking (Alarm LED). This is useful if a device needs to be physically identied, for example in a large server room.
The audio-visual signals can be switched o if the device has a display and front panel buttons. In that case the
display shows a note saying that the F2 button can be used to stop this mode. It is also possible to cancel the
command by pressing CTRL+C, which will also result in stopping the audio-visual identication mode.
# make_noise
This command does not support any parameters. It causes the device to beep every 2 seconds and switch
the red Alarm LED on and o peridocally.
Examples
# make_noise
(initiates the audio-visual identication mode, can be stopped/canceled by pressing CTRL+C or the F2 front
panel button of the device)
4 Text Editors
Manually modifying a conguration le is an often used task within the CLI environment. LTOS V6 provides two
dierent text editors for this: nano and edit. Both can be used to edit textles, the main dierence between
them is their feature list and the way the functions are accessed. It is completely up to you which one you choose,
it may happen that one of the two oers a better compatibility with your terminal software or that you simply
prefer the operating concept of one of them.
On earlier versions of LANTIME OS the nano text editor could be started with the command
vi [lename]
which is still available on V6 for compatibility reasons. However, this command will show a short note telling you
about the two possible editors available on V6 and then asks you to choose which one to use for editing the le
[lename] you specied on the commandline.
4.1 nano
The nano text editor is a fast, small and easy-to-use opensource program (see http://www.nano-editor.org/ for
further information). This editor has been used as the standard CLI tool for modifying text les in earlier LTOS
versions (in which it was started using the vi command).
Command Keys
The "nano" editor uses key combinations to access its functions. Most key combinations use the control key
(CTRL) which has to be held down while pressing and releasing another key to execute a certain editor command.
Search/Replace
To nd a certain search term in the current le, press CTRL+W. If you want to replace a search string, use the
CTRL+\ key combination. The nano Editor supports regular expressions as search terms.
More Functions
A number of additional editor commands and functions can be accessed with specic key combinations. A
help screen listing all of them is available with the CTRL+G command key combination.
4.2 edit
The edit text editor is a part of the Midnight Commander opensource project and is normally called mcedit (see
http://www.midnight-commander.org/ for further information). This editor has a rich feature set, a menu system
and color options (if supported by the terminal).
Function Keys
This editor uses Function Keys to perform most program functions. If your terminal does not support send-
ing the correct key codes for the function keys or if you cannot use the function keys for some other reason, you
can emulate a function key by pressing the escape key (ESC) rst, followed by the digit 1-9 (for F1 to F9) or 0
(for F10). F10 is important as it is used to quit the editor and return to the CLI prompt.
Search/Replace
In order to search for a certain search string in the le, please press F7 (ESC+7). If a search string needs to be
replaced by another string, press F4 to open the search/replace dialogue. This function has a large number of
options which can be selected, for example the "prompt on replace" option to bring up a conrmation dialogue
before each replacement is performed or the "replace all" ag to select that multiple/all occurrences of the search
string shall be replaced.
More Functions
The mcedit Editor has a large number of functions and useful features, most of them are accessible via the on
screen menu. In order to open the menu, please press F9 (or ESC+9) and then navigate with the cursor keys and
ENTER to select a menu option or ESC to leave the menu and return to the le editor.
4.3 vim
The VImproved text editor ("vim") is a powerful but complex opensource program (see http://www.vim.org/ for
further information). It is not recommended for beginners and requires a lot of training and learning to become
useful.