Skip to content
Smarter by Design.Simpler for Business

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 ​

TR7 WEB-CLI · gtm service
# Tab after the command: all of the subcommands
admin@TR7LBWAF01> gtm service
add delete list restart show status update
 
admin@TR7LBWAF01> gtm service list # list them all
admin@TR7LBWAF01> gtm service show <id> # show one
admin@TR7LBWAF01> gtm service add name <name> v-device <device> namespace <table>
admin@TR7LBWAF01> gtm service update id <id> … # change
admin@TR7LBWAF01> gtm service delete <id> # delete
admin@TR7LBWAF01>  

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 ​

OrderFieldStatusValue
1nameRequiredThe name of the service
2v-deviceRequiredThe virtual device on which the service will run
3namespaceRequiredThe 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.

FieldDefaultValue
--listen.0.ip—One of the addresses defined in the selected route table; a free address cannot be written
--listen.0.portIn the panel a new row opens with 53The port to be listened on
--listen.0.noForwarderfalseProvides 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 ​

FieldDefaultValue
--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 ​

FieldDefaultValue
--cachefalseTurns on the answers being taken into the cache
--cacheTtl.val · --cacheTtl.unit60 secondsThe storage duration of the answers in the cache; the unit is s, m or h
--maxCacheEntries1000000The 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 ​

FieldDefaultValue
--qosfalseTurns on the resource limits
--cpuPrioritylowThe processor priority: low · normal · high
--cpuLimit—The maximum processor share; if it is left empty, no limit is applied
--memoryLimit1 GBThe 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 ​

FieldDefaultValue
--logfalseTurns on the service records
--metaData.0.key · --metaData.0.valueEmptyThe 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:

CommandFunction
gtm service status listIt 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
TR7 WEB-CLI · status and restart
admin@TR7LBWAF01> gtm service status list
admin@TR7LBWAF01> gtm service status id <service>
admin@TR7LBWAF01> gtm service restart id <service>
admin@TR7LBWAF01>  

The output of the status commands can be formatted with the --output and --filter options.

Examples ​

TR7 WEB-CLI · A) Creating a service and the listening address
admin@TR7LBWAF01> gtm service add name kurum-dns v-device <device> namespace <table> \
--listen.0.ip <address> --listen.0.port 53
admin@TR7LBWAF01>  
TR7 WEB-CLI · B) The cache and the forwarder profile
admin@TR7LBWAF01> gtm service update id <id> \
--forwarder <profile> --cache true --cacheTtl.val 5 --cacheTtl.unit m
# let an address skip the forwarding
admin@TR7LBWAF01> gtm service update id <id> --listen.0.noForwarder true
admin@TR7LBWAF01>  
TR7 WEB-CLI · C) The resource limit and the record
admin@TR7LBWAF01> gtm service update id <id> \
--qos true --cpuPriority normal --cpuLimit 50 --log true
admin@TR7LBWAF01> gtm service restart id <id> # to apply the change
admin@TR7LBWAF01>  

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.