monitor active ethernetports

I’m looking for a script that gives me the total number of all active ethernet ports in a CRS328. Of course, it would be best if I could include that as part of the dude. Does anyone have any ideas about this?

Thx
dingsingo

I dont have any experience with the Dude-Server , so i cant help you


But here is a Basic Script to print the number of active Ports.


# Active Interface Count
:local AIC 0
:foreach i in=[interface ethernet find where running=yes] do={:set $AIC ($AIC + 1)}
:put message="Active Interface = $AIC"