Changes

Jump to navigation Jump to search
21 bytes added ,  10:38, 28 July 2015
Line 1: Line 1:  
{{Needs review}}
 
{{Needs review}}
   −
== Display the dhcpd lease==
+
== Display the dhcp lease==
    
according in [[bugzilla:2641]] you have a script which display in your terminal how many computers are connected their ip, mac adress and their expiration of dhcp leases.
 
according in [[bugzilla:2641]] you have a script which display in your terminal how many computers are connected their ip, mac adress and their expiration of dhcp leases.
Line 23: Line 23:  
  # - added "GMT" indicator to Expiration col head
 
  # - added "GMT" indicator to Expiration col head
 
  #
 
  #
  echo "Source        Host       MAC Address      IP Address      Expiration (GMT)"
+
  echo "Source        Host                     MAC Address      IP Address      Expiration (GMT)"
  echo "============= ========== ================= =============== ================"
+
  echo "============= ========================= ================= =============== ================"
 
  #
 
  #
 
  awk ' { out = ""} \
 
  awk ' { out = ""} \
Line 34: Line 34:  
   | grep active \
 
   | grep active \
 
   | sed -e s/'[{};" ]'/\ /g  \
 
   | sed -e s/'[{};" ]'/\ /g  \
   | awk '{ printf "%-13s %-10s %-17s %-15s %-10s %-5s\n", "dhcpd.leases", $6, $5, $1, $2, $3 }'
+
   | awk '{ printf "%-13s %-25s %-17s %-15s %-10s %-5s\n", "dhcpd.leases", $6, $5, $1, $2, $3 }'
 
   
 
   
 
  #
 
  #
Line 46: Line 46:  
   | grep : \
 
   | grep : \
 
   | sed -e  s/'[{};\" ]'/\ /g -e  s/\.`config get DomainName`// \
 
   | sed -e  s/'[{};\" ]'/\ /g -e  s/\.`config get DomainName`// \
   | awk  '{ printf "%-13s %-10s %-17s %-15s %-15s \n", "dhcpd.conf", $1, $2, $3, "reservation"}'
+
   | awk  '{ printf "%-13s %-25s %-17s %-15s %-15s \n", "dhcpd.conf", $1, $2, $3, "reservation"}'
 
  #
 
  #
 
  # Finally, grab the current arp table
 
  # Finally, grab the current arp table
Line 52: Line 52:  
  arp -a \
 
  arp -a \
 
   |  sed -e s/\\..*\(/\ / -e s/\)// \
 
   |  sed -e s/\\..*\(/\ / -e s/\)// \
   |  awk '{ printf "%-13s %-10s %-17s %-15s %-15s \n", "arp", $1, $4, $2, "n/a"}'
+
   |  awk '{ printf "%-13s %-25s %-17s %-15s %-15s \n", "arp", $1, $4, $2, "n/a"}'
   −
 
+
==customize the lease duration==
 
  −
== Create custom template fragments ==
   
You can customize the lease duration for the dhcp server ('''dhcpd''') in SME using these instructions.
 
You can customize the lease duration for the dhcp server ('''dhcpd''') in SME using these instructions.
 
The commands below will create custom template fragments for <tt>default-lease-time</tt> and <tt>max-lease-time</tt>, re-generate <tt>/etc/dhcpd.conf</tt>, and restart the '''dhcpd''' service in order to activate your changes.
 
The commands below will create custom template fragments for <tt>default-lease-time</tt> and <tt>max-lease-time</tt>, re-generate <tt>/etc/dhcpd.conf</tt>, and restart the '''dhcpd''' service in order to activate your changes.
67

edits

Navigation menu