gtm service
The gtm service command manages the DNS services that meet the DNS queries: the context in which the service will run, the addresses it listens on, where it will forward the queries it is not authoritative for, the cache and the resource limits. Its panel equivalent is the Service Management screen.
The domain names and the records live inside this service; both of them are added after the service is created.
Command Summary
Besides the five basic actions, this command carries two more operations: restart and status. Both of them are explained in a separate section below.
Required Fields
| Order | Field | Status | Value |
|---|---|---|---|
| 1 | name | Required | The name of the service |
| 2 | v-device | Required | The virtual device on which the service will run |
| 3 | namespace | Required | The route table in which the service will run |
The Listened Addresses
From which address and port the service will meet the DNS queries is written with the --listen.N. fields.
| Field | Default | Value |
|---|---|---|
--listen.0.ip | — | One of the addresses defined in the selected route table; a free address cannot be written |
--listen.0.port | In the panel a new row opens with 53 | The port to be listened on |
--listen.0.noForwarder | false | Provides that the queries coming to this address go directly to the service without passing through the forwarder profile; it is used only while a forwarder profile is bound |
The same address and port being used in another service is not accepted.
The Forwarder Profile
| Field | Default | Value |
|---|---|---|
--forwarder | — | The profile to which the queries the service is not authoritative for will be forwarded |
The profiles are created with gtm forwarder-profile.
The Cache
| Field | Default | Value |
|---|---|---|
--cache | false | Turns on the answers being taken into the cache |
--cacheTtl.val · --cacheTtl.unit | 60 seconds | The storage duration of the answers in the cache; the unit is s, m or h |
--maxCacheEntries | 1000000 | The maximum number of entries to be kept in the cache |
The duration and entry number fields are seen only while the cache is on.
The Resource Limits
| Field | Default | Value |
|---|---|---|
--qos | false | Turns on the resource limits |
--cpuPriority | low | The processor priority: low · normal · high |
--cpuLimit | — | The maximum processor share; if it is left empty, no limit is applied |
--memoryLimit | 1 GB | The memory limit; it is selected from the list |
The processor core selection is not present on the command line
In the panel the cores the service will use can be checked one by one. There is no such field on the command line; the core selection is made from the panel.
The Other Settings
| Field | Default | Value |
|---|---|---|
--log | false | Turns on the service records |
--metaData.0.key · --metaData.0.value | Empty | The key and value pairs to be written into the configuration |
The Status and the Restart
Besides the five basic actions, there are two more subcommands in this command; since status is separated into two within itself, there are three usages in total:
| Command | Function |
|---|---|
gtm service status list | It lists the status of all the DNS services |
gtm service status id <service> | It shows the status of a single service |
gtm service restart id <service> | It restarts the service |
The output of the status commands can be formatted with the --output and --filter options.
Examples
Things to Know
- The address is selected from the list. The address to be listened on comes from among the addresses defined in the selected route table; a free address cannot be written.
- The same address and port cannot be used a second time. A pair used by another service or vService is not accepted.
- The cache and resource fields depend on their switch. Without the related switch being turned on, these fields are not asked for and do not enter the record.
- The domain names are bound to the service. When the service is deleted, the domain names and the records in it lose their meaning as well; before deleting, the content should be checked.
