Hello,
My name is Ivar, I work at Universitat Pompeu Fabra of Barcelona and we use NAV 4.5.2. I have a question about the NAV's API functionalities.
We are looking to see if it's possible to check whether a group of computers connected to a specific switch have "link signal status" even when they are turned off (all the computers have WOL enabled as well). I found an example to get the state (active) of a computer. Here in this following link of your documentation URL: http://navscc-upf.x.upf.edu/doc/howto/using_the_api.html
You show a specific scenario titled: We want to know the interface a computer is connected to right now. We have the ip-address of the computer.
So, when it says "We want to know the interface a computer *is connected to right now*" means the computer is turned on or it works even if the computer is off? it would help us a lot.
Thank you. --
*Ivar Bergelin* Tècnic de suport informàtic Unitat d'Informàtica del Campus del Poblenou Roc Boronat 138 | 08018 - Barcelona [Tel.] (+34) 93 542 23 58 http://www.upf.edu
On Mon, 6 Feb 2023 10:49:08 +0100 "BERGELIN SABADELL, IVAR-ERIC" ivar.bergelin@upf.edu wrote:
Hello,
Hi there!
we use NAV 4.5.2.
That's pretty old, I would recommend you upgrade to the latest version :)
We are looking to see if it's possible to check whether a group of computers connected to a specific switch have "link signal status" even when they are turned off (all the computers have WOL enabled as well). I found an example to get the state (active) of a computer. Here in this following link of your documentation URL: http://navscc-upf.x.upf.edu/doc/howto/using_the_api.html
You show a specific scenario titled: We want to know the interface a computer is connected to right now. We have the ip-address of the computer.
So, when it says "We want to know the interface a computer *is connected to right now*" means the computer is turned on or it works even if the computer is off? it would help us a lot.
The data comes from the uplink switch's forwarding table (CAM). When you power-off a computer, it normally drops its ethernet link, and its MAC address will be evicted from the switch CAM table as a result of inactivity - thus, it will no longer show up as active in NAV data. But, this is just log data to NAV - you can still see *when* and *where* a MAC address was last seen. This data is logged indefinitely, unless you set up a custom cleanup job to delete old records.
I would assume a computer with wake-on-lan enabled still maintains an ethernet link when it's powered down, but unless it actually transmits some sort of keep-alive ethernet packets in this state, I would still assume it at some point disappears from the switch CAM table.
I'm not all that familiar with how WOL works in practice, though. The APIs you are referring to correspond to the searches available in the Machine Tracker tool in NAV, so you could easily just search for computers you know to be powered-down for a while and see how they appear there.