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
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 86471b8..41f581e 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -1875,16 +1875,21 @@
 void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
 {
 	if (nsvc->nsvci_is_valid)
-		vty_out(vty, "   NSVCI %05u: %s %s %s%s", nsvc->nsvci,
+		vty_out(vty, "   NSVCI %05u: %s %s %s %s since ", nsvc->nsvci,
 			osmo_fsm_inst_state_name(nsvc->fi),
 			nsvc->persistent ? "PERSIST" : "DYNAMIC",
-			gprs_ns2_ll_str(nsvc), VTY_NEWLINE);
+			gprs_ns2_ll_str(nsvc),
+			ns2_vc_is_unblocked(nsvc) ? "ALIVE" : "DEAD");
 	else
-		vty_out(vty, "   %s %s sig_weight=%u data_weight=%u %s%s",
+		vty_out(vty, "   %s %s sig_weight=%u data_weight=%u %s %s since ",
 			osmo_fsm_inst_state_name(nsvc->fi),
 			nsvc->persistent ? "PERSIST" : "DYNAMIC",
 			nsvc->sig_weight, nsvc->data_weight,
-			gprs_ns2_ll_str(nsvc), VTY_NEWLINE);
+			gprs_ns2_ll_str(nsvc),
+			ns2_vc_is_unblocked(nsvc) ? "ALIVE" : "DEAD");
+
+	vty_out_uptime(vty, &nsvc->ts_alive_change);
+	vty_out_newline(vty);
 
 	if (stats) {
 		vty_out_rate_ctr_group(vty, "    ", nsvc->ctrg);