Send netdisco-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:

   1. SQL Query For Free Ports (Jason Garrett)
   2. Re: SQL Query For Free Ports (Christian Ramseyer)
--- Begin Message ---
I'm trying to determine what database fields NETDISCO is using to determine the 
Free status that can be seen in the web interface.  I found 'lastchange' in 
public.device_port but I can't figure out exactly how that correlates or is 
calculated.

Ultimately I would like a SQL query that shows me each switch, switch uptime, 
and the number of free ports where free is determined by the port either not 
being used since switch was last rebooted, or port not used in last 6 months if 
uptime is greater than 6 months.
Thanks!
Jason Garrett
Diocese of Lincoln Schools
Email: [email protected]<mailto:[email protected]>


--- End Message ---
--- Begin Message ---
Hi Jason

You can find an example query in here:

<https://github.com/netdisco/netdisco/blob/master/lib/App/Netdisco/DB/Result/Virtual/PortUtilization.pm>

This seems to pretty much do what you're looking for, otherwise let us know.

Cheers
Christian




On 20.01.21 18:44, Jason Garrett wrote:
> I’m trying to determine what database fields NETDISCO is using to
> determine the Free status that can be seen in the web interface.  I
> found ‘lastchange’ in public.device_port but I can’t figure out exactly
> how that correlates or is calculated.
> 
>  
> 
> Ultimately I would like a SQL query that shows me each switch, switch
> uptime, and the number of free ports where free is determined by the
> port either not being used since switch was last rebooted, or port not
> used in last 6 months if uptime is greater than 6 months.
> 
> Thanks!
> 
> Jason Garrett
> 
> Diocese of Lincoln Schools
> 
> Email: [email protected] <mailto:[email protected]>
> 
>  
> 
> 
> 
> _______________________________________________
> Netdisco mailing list
> [email protected]
> https://sourceforge.net/p/netdisco/mailman/netdisco-users/
> 



--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to