I have a Windows 2003 server and need to poll the DHCP lease information from it with a perl script that is running on a Ubuntu server. Then I need to analyze & store the information in a mysql database. Is there a way to query the leases from a perl script? I can figure out how to process the info after I get it. Thanks.
There isn't really a nice non windows API for you to hit via PERL, if you ran PERL on a windows box you could do it in the same script via WMI. However...
Obviously I'm not sure on your requirements, but you can (through the scheduled task or a powershell script) have a script kick off when a DHCP lease occurs... See this question for firing a script during a lease event:
Then you could have a powershell script launch and dump its DHCP address (use WMI) information over to your ubuntu box (ftp/sftp) and process away. You'd always have the latest info.
Have one powershell script that runs on your windows 7/server every 20 minutes and probes (via WMI) your workstations and dumps to your central ubuntu box. You lose out on laptops that might be moving around though. Basically WMI is your friend, you can get that info locally or remotely, but it requires windows.