-
Notifications
You must be signed in to change notification settings - Fork 9
Commands
Commands are broken down into different levels, similar to shells like crmsh, and each new level will present different commands.
Commands below will work at all levels.
Change or show display settings inside lvsm.
Print a relevant help messge depending on the level.
Return to the previous level.
Exit the lvsm shell.
Exit the lvsm shell.
Available commands are
Restarts a given module. For this command to work the configuration items director_cmd and/or firewall_cmd need to be set up in the lvsm.conf file.
Usage:
restart <module>
Where <module> is one of:
| Option | Result |
|---|---|
director |
restart the lvs director |
firewall |
restart the iptables firewall |
In this level the status of the live setup can be viewed.
Show the running status of all virtual servers.
Usage:
status
Show the running status of one or more virtual server(s).
Usage:
show tcp|udp|fwm <vip> [<port>]
The options are defined below
| Option | Meaning |
|---|---|
<service> |
service type of tcp, udp, or fwm. Refer to ipvsadm documentation for more info. |
<vip> |
hostname or IP address of the virtual server |
<port> |
optional. the port name or number associated with the server |
Examples:
lvsm(live)(virtual)# show udp 10.10.10.20 53
lvsm(live)(virtual)# show tcp mysite
Enable a real server. This option is dependent on the director type.
- Under ldirectord it is supported only when the
maintenancediris set inldirectord.conf. - Under keepalived it is supported only when SNMP support is enabled and SNMP is configured in read/write mode to have access to Keepalived.
Usage:
enable real <server> [<port>]
Disable a real server in ipvs. This option is dependent on the director type.
- Under ldirectord it is supported only when the
maintenancediris set inldirectord.conf. - Under keepalived it is supported only when SNMP support is enabled and SNMP is configured in read/write mode to have access to Keepalived.
Usage:
disable real <server> [<port>]
In this level
Show information about a specific real server.
Usage:
show <server> [<port>]
Enable a real server. This option is dependent on the director type.
- Under ldirectord it is supported only when the
maintenancediris set inldirectord.conf. - Under keepalived it is supported only when SNMP support is enabled and SNMP is configured in read/write mode to have access to Keepalived.
Usage:
enable real <server> [<port>]
Disable a real server in ipvs. This option is dependent on the director type.
- Under ldirectord it is supported only when the
maintenancediris set inldirectord.conf. - Under keepalived it is supported only when SNMP support is enabled and SNMP is configured in read/write mode to have access to Keepalived.
Usage:
disable real <server> [<port>]
This level provides information about the iptables filters.
Display the status of all packet filtering rules.
Usage:
status
Show the running status of specific packet filter tables.
Usage:
show <table>
| Table | Meaning |
|---|---|
nat |
show the network address translation table in the prerouting chain |
filters |
show the filter table in the input chain |
Enters configuration mode. In this mode, the configuration files can be viewed and synced if under version control and/or cluster mode. Configure mode provides access to the director configuration as well as firewall rules.
Available commands are
Will display the configuration for the specified module.
Usage:
show <module>
Where <module> is one of:
| Option | Result |
|---|---|
director |
show the director configuration |
firewall |
show the iptables configuration |
Example:
lvsm(configure)# show director
Opens the configuration file for the module using an editor. Note: the editor is currently set to vi.
Usage:
edit <module>
Where <module> is one of:
| Option | Result |
|---|---|
director |
edit the director configuration |
firewall |
edit the iptables configuration |
Example:
lvsm(configure)# edit director
Synchronizes all configuration files across the cluster by first commiting to a revision control system. Currently only subversion and git are supported.
Example:
lvsm(configure)# sync