From ca5ce0d84966c998e353b606a7054f8bc8366cae Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sun, 5 Sep 2021 23:15:56 +0200 Subject: ns2: nsvc: add a uptime/downtime to track the last state change To show adminstrator the last state change of a nsvc add a timestamp and show it on the vty > show ns nsei 1234 NSEI 01234: UDP, DEAD since 0d 0h 1m 42s [...] 4 NS-VC: UNBLOCKED DYNAMIC sig_weight=1 data_weight=1 udp)[127.0.0.1]:22000<>[127.0.0.1]:23001 ALIVE since 0d 0h 0m 1s UNBLOCKED DYNAMIC sig_weight=2 data_weight=2 udp)[127.0.0.1]:22000<>[127.0.0.1]:23000 ALIVE since 0d 0h 0m 1s UNBLOCKED DYNAMIC sig_weight=2 data_weight=2 udp)[127.0.0.1]:22001<>[127.0.0.1]:23000 ALIVE since 0d 0h 0m 1s UNBLOCKED DYNAMIC sig_weight=1 data_weight=1 udp)[127.0.0.1]:22001<>[127.0.0.1]:23001 ALIVE since 0d 0h 0m 1s Related: OS#5028 Change-Id: Ie3a039a209869295afa5feda39297cee81fedf22 --- tests/gb/gprs_ns2_vty.vty | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/gb') diff --git a/tests/gb/gprs_ns2_vty.vty b/tests/gb/gprs_ns2_vty.vty index 35bee1e9..4be10d55 100644 --- a/tests/gb/gprs_ns2_vty.vty +++ b/tests/gb/gprs_ns2_vty.vty @@ -40,11 +40,11 @@ OsmoNSdummy(config-ns-nse)# end OsmoNSdummy# show ns NSEI 01234: UDP, DEAD since 0d 0h 0m 0s 1 NS-VC: - RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 + RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 DEAD since 0d 0h 0m 0s UDP bind: 127.0.0.14:42999 DSCP: 0 Priority: 0 IP-SNS signalling weight: 1 data weight: 1 1 NS-VC: - RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 + RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 DEAD since 0d 0h 0m 0s OsmoNSdummy# configure terminal OsmoNSdummy(config)# ns OsmoNSdummy(config-ns)# nse 1234 @@ -54,15 +54,15 @@ OsmoNSdummy(config-ns-nse)# end OsmoNSdummy# show ns NSEI 01234: UDP, DEAD since 0d 0h 0m 0s 3 NS-VC: - RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 - RECOVERING PERSIST sig_weight=0 data_weight=9 udp)[127.0.0.14]:42999<>[127.0.0.16]:9496 - RECOVERING PERSIST sig_weight=0 data_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]:9496 + RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 DEAD since 0d 0h 0m 0s + RECOVERING PERSIST sig_weight=0 data_weight=9 udp)[127.0.0.14]:42999<>[127.0.0.16]:9496 DEAD since 0d 0h 0m 0s + RECOVERING PERSIST sig_weight=0 data_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]:9496 DEAD since 0d 0h 0m 0s UDP bind: 127.0.0.14:42999 DSCP: 0 Priority: 0 IP-SNS signalling weight: 1 data weight: 1 3 NS-VC: - RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 - RECOVERING PERSIST sig_weight=0 data_weight=9 udp)[127.0.0.14]:42999<>[127.0.0.16]:9496 - RECOVERING PERSIST sig_weight=0 data_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]:9496 + RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 DEAD since 0d 0h 0m 0s + RECOVERING PERSIST sig_weight=0 data_weight=9 udp)[127.0.0.14]:42999<>[127.0.0.16]:9496 DEAD since 0d 0h 0m 0s + RECOVERING PERSIST sig_weight=0 data_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]:9496 DEAD since 0d 0h 0m 0s OsmoNSdummy# configure terminal OsmoNSdummy(config)# ns OsmoNSdummy(config-ns)# nse 1234 -- cgit v1.2.3