136

To view the latest entries in a log:

$ tail log-file

You can use the serveradmin getLogPaths command to see where the current DNS log is located. The default is /Library/Logs/named.log.

To display the log path:

$ sudo serveradmin command dns:command = getLogPaths

Listing DNS Service Statistics

You can use the serveradmin getStatistics command to display a summary of current DNS service workload.

To list statistics:

$ sudo serveradmin command dns:command = getStatistics

Sample Output

dns:queriesArray:_array_index:0:name = "NS_QUERIES"

dns:queriesArray:_array_index:0:value = -1

dns:queriesArray:_array_index:1:name = "A_QUERIES"

dns:queriesArray:_array_index:1:value = -1

dns:queriesArray:_array_index:2:name = "CNAME_QUERIES"

dns:queriesArray:_array_index:2:value = -1

dns:queriesArray:_array_index:3:name = "PTR_QUERIES"

dns:queriesArray:_array_index:3:value = -1

dns:queriesArray:_array_index:4:name = "MX_QUERIES"

dns:queriesArray:_array_index:4:value = -1

dns:queriesArray:_array_index:5:name = "SOA_QUERIES"

dns:queriesArray:_array_index:5:value = -1

dns:queriesArray:_array_index:6:name = "TXT_QUERIES"

dns:queriesArray:_array_index:6:value = -1 dns:nxdomain = 0

dns:nxrrset = 0 dns:reloadedTime = "" dns:success = 0 dns:failure = 0 dns:recursion = 0

dns:startedTime = "2003-09-10 11:24:03 -0700" dns:referral = 0

Firewall Service

Starting and Stopping Firewall Service

To start Firewall service:

$ sudo serveradmin start ipfilter

To stop Firewall service:

$ sudo serveradmin stop ipfilter

Chapter 13 Working With Network Services

Page 136
Image 136
Apple oxs manual Listing DNS Service Statistics, Starting and Stopping Firewall Service, Sample Output