Koozali.org: home of the SME Server

how to track the work of the DHCP Server?

Offline TeNeCo

  • ***
  • 60
  • +0/-0
how to track the work of the DHCP Server?
« Reply #15 on: March 05, 2007, 08:31:46 AM »
Code: [Select]

Source        Host       MAC Address       IP Address      Expiration (GMT)
============= ========== ================= =============== ================
dhcpd.leases  WSUSSERVER 00:0b:6a:08:3c:16 192.168.2.176   2007/03/05 18:22:13
dhcpd.leases  BRN_72BB06 00:80:77:72:bb:06 192.168.2.238   2007/03/05 21:37:18
dhcpd.leases  Wireless   00:11:6b:b0:11:35 192.168.2.240   2007/03/06 03:48:37
dhcpd.leases  sonyvaio   00:11:6b:60:e5:c6 192.168.2.239   2007/03/06 06:26:34
dhcpd.leases  WSUSSERVER 00:0b:6a:08:3c:16 192.168.2.176   2007/03/06 06:40:51
dhcpd.leases  Sempron    00:01:6c:d8:f4:24 192.168.2.241   2007/03/06 06:47:32
arp           pc-00176   00:0B:6A:08:3C:16 192.168.2.176   n/a
arp           localhost  00:15:0C:9B:D0:75 (192.168.178.2  n/a


I think that I have solved the miracle of the starnge localhost: I have given the sme server the name "gateway" but the local gateway ist that router at 192.168.178.2. Although I've changed the name of SME this morning the entry for that local host is still in de shell- output.

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
how to track the work of the DHCP Server?
« Reply #16 on: March 05, 2007, 02:50:33 PM »
Also see contrib "Sme7admin". It has what you are looking for.
Sophie from Montréal

Offline TeNeCo

  • ***
  • 60
  • +0/-0
how to track the work of the DHCP Server?
« Reply #17 on: March 05, 2007, 03:18:45 PM »
Quote from: "soprom"
Also see contrib "Sme7admin". It has what you are looking for.

Where? I have that Sme7admin but I can't find the actual IP-adresses with its windows names in there like here:
Code: [Select]

Source        Host       MAC Address       IP Address      Expiration (GMT)
============= ========== ================= =============== ================
dhcpd.leases  BRN_72BB06 00:80:77:72:bb:06 192.168.2.238   2007/03/05 21:37:18
dhcpd.leases  Wireless   00:11:6b:b0:11:35 192.168.2.240   2007/03/06 03:48:37
dhcpd.leases  sonyvaio   00:11:6b:60:e5:c6 192.168.2.239   2007/03/06 06:26:34
dhcpd.leases  WSUSSERVER 00:0b:6a:08:3c:16 192.168.2.176   2007/03/06 06:40:51
dhcpd.leases  Sempron    00:01:6c:d8:f4:24 192.168.2.241   2007/03/06 06:47:32
dhcpd.leases  Wireless   00:11:6b:b0:11:35 192.168.2.240   2007/03/06 09:15:06
dhcpd.leases  BRN_72BB06 00:80:77:72:bb:06 192.168.2.238   2007/03/06 09:37:25
arp           fritz      00:15:0C:9B:D0:75 192.168.178.2   n/a
arp           pc-00176   00:0B:6A:08:3C:16 192.168.2.176   n/a

Offline mmccarn

  • *
  • 2,657
  • +10/-0
how to track the work of the DHCP Server?
« Reply #18 on: March 05, 2007, 03:35:22 PM »
Quote from: "soprom"
Also see contrib "Sme7admin"

Doh! I use sme7admin on several hosts -- but I'm not using any of them for dhcp so I never noticed!

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
how to track the work of the DHCP Server?
« Reply #19 on: March 05, 2007, 07:34:57 PM »
I get the folowing error:
Code: [Select]
Source        Host       MAC Address       IP Address      Expiration (GMT)
============= ========== ================= =============== ================
awk: cmd. line:1:  { out = ""} \
awk: cmd. line:1:              ^ backslash not last character on line
test.sh: line 24: syntax error near unexpected token `|'
'est.sh: line 24: `  | grep active \
"It should just work" if it doesn't report it. Thanks!

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
how to track the work of the DHCP Server?
« Reply #20 on: March 06, 2007, 04:43:18 AM »
Quote
Also see contrib "Sme7admin". It has what you are looking for


Not quite ... it displays host name as eg: pc-00249.tibors.net ... it does not give you the pc name.

If SME7admin displayed the PC name as well it would be complete in my book.

I requested the creator to put that in when it was first made but nothing happened.

Regards,

Tib

Offline mmccarn

  • *
  • 2,657
  • +10/-0
how to track the work of the DHCP Server?
« Reply #21 on: March 06, 2007, 03:23:42 PM »
bpivk:

Make sure your 'test.sh' hasn't acquired any spaces after the various backslashes in the script...  the backslash is used to "escape" the <newline>, but if there's a space after it then it escapes that, instead, and breaks the command...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
how to track the work of the DHCP Server?
« Reply #22 on: March 06, 2007, 06:07:58 PM »
Well i did a copy & paste in windows and linux twice and i had the same problem. But i won't give up. :D
"It should just work" if it doesn't report it. Thanks!

Offline RedBeard

  • ***
  • 62
  • +0/-0
how to track the work of the DHCP Server?
« Reply #23 on: March 06, 2007, 07:30:42 PM »
Quote from: "bpivk"
Well i did a copy & paste in windows and linux twice and i had the same problem. But i won't give up. :D


bpivk, I had the same problem.  Pasting puts an extra space at the end of the line.  Open the file with pico or other editor and go to the end of each line with a / and delete any spaces after the / and save the file.  

It should work fine after that at least it did for me.
............

Offline mmccarn

  • *
  • 2,657
  • +10/-0
how to track the work of the DHCP Server?
« Reply #24 on: March 06, 2007, 08:29:38 PM »
I have double-checked the post with the script on page one and don't see any extraneous spaces in the post itself; I don't know why they're showing up when you copy/paste the script into pico...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
how to track the work of the DHCP Server?
« Reply #25 on: March 06, 2007, 08:50:51 PM »
Yes the problem was in the empty spaces in pico. I had to go from line to line and delete them. It works now.

Thanks
"It should just work" if it doesn't report it. Thanks!

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
how to track the work of the DHCP Server?
« Reply #26 on: March 06, 2007, 10:52:31 PM »
Quote from: "mmccarn"
OK - I've updated the earlier script again.


Mike (I think) could you please post your code into a New Feature Request in the bug tracker. It'll just get lost here.

Offline mmccarn

  • *
  • 2,657
  • +10/-0
how to track the work of the DHCP Server?
« Reply #27 on: March 07, 2007, 01:10:07 AM »
New Feature Request created: http://bugs.contribs.org/show_bug.cgi?id=2641

Script can be downloaded from: http://bugs.contribs.org/attachment.cgi?id=947

Or, download directly to your SME server using:
wget -O dhcpactiv.sh http://bugs.contribs.org/attachment.cgi?id=947

Offline calisun

  • *
  • 620
  • +0/-1
how to track the work of the DHCP Server?
« Reply #28 on: March 08, 2007, 01:48:38 AM »
install sme7admin contrib, it gives you the information you need plus a lot more.
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline TeNeCo

  • ***
  • 60
  • +0/-0
how to track the work of the DHCP Server?
« Reply #29 on: March 11, 2007, 09:13:18 PM »
One more question:

how can I influence the work of the DHCP-Server? It would be nice if a certain MAC address would get always the same IP from the DHCP server.