|
From: Robert K. <r....@cr...> - 2005-02-08 16:30:18
|
On Tue, 2005-02-08 at 14:52, Olivier Reuland wrote:
> Is there a way, using the command line to get:
As netdisco stores all the data in a database you can query the database
directly to get pretty much any info you want.
> a) the mac address and the switch/port given a client IP address?
# psql -U netdisco
Password:
netdisco=> select node.mac,node.switch,node.port from node,node_ip where
node_ip.ip='x.x.x.x' and node.mac=node_ip.mac;
mac | switch | port
-------------------+----------------+------
yy:yy:yy:yy:yy:yy | z.z.z.z | 7
(1 row)
> b) the same, specifing a date?
This might be more difficult, netdisco records a first and last seen
time, but doesn't seem to record history between the two. You might be
able to do it by working through the archived data.
--
Robert Kerr
|