From b61743eff8a35a08e8078a7f055ceb27c161954a Mon Sep 17 00:00:00 2001 From: Kaushik Malapati Date: Mon, 18 Mar 2024 10:19:57 -0700 Subject: [PATCH 1/3] Added option to view an ioc's pvlist in ioctool --- scripts/ioctool | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/ioctool b/scripts/ioctool index 79db7870..2db914bf 100755 --- a/scripts/ioctool +++ b/scripts/ioctool @@ -131,7 +131,8 @@ data : returns the path of the appropriate iocData directory if it exists autosave : opens the most recent autosave file in less archive : opens the most recent archive file in less log : opens the most recent log file in less -telnet : starts a telnet session with the ioc +telnet : starts a telnet session with the ioc +pvs : opens the IOC.pvlist file in less EOF } @@ -304,4 +305,14 @@ elif [ "$CMD" == "telnet" ]; then PORT=$(echo "$INFO" | sed -n "s/^.*port: \(\S*\),.*$/\1/p") echo "$HOST":"$PORT" telnet "$HOST" "$PORT" + +################################################################# + +elif [ "$CMD" == "pvs" ]; then + pvlistfile=/reg/d/iocData/"${NAME}"/iocInfo/IOC.pvlist + if [ -f "$pvlistfile" ]; then + less "$pvlistfile" + else + echo "$pvlistfile could not be found." >&2 + fi fi From 76b17ea2c0e51b21116a8325ba37bb988e78a5c2 Mon Sep 17 00:00:00 2001 From: Kaushik Malapati Date: Mon, 18 Mar 2024 10:22:42 -0700 Subject: [PATCH 2/3] Updating readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d0af553e..a6ae291f 100644 --- a/README.md +++ b/README.md @@ -306,6 +306,7 @@ usage: ioctool <ioc>|<pv> [option]
archive : opens the most recent archive file in less
log : opens the most recent log file in less
telnet : starts a telnet session with the ioc
+ pvs : opens the IOC.pvlist file in less
From 61945b68dc40521057dfdfccc56b6ad4cadeb754 Mon Sep 17 00:00:00 2001 From: Kaushik Malapati Date: Mon, 18 Mar 2024 10:59:50 -0700 Subject: [PATCH 3/3] Changed reg path to cds path --- scripts/ioctool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ioctool b/scripts/ioctool index 2db914bf..78f71e7d 100755 --- a/scripts/ioctool +++ b/scripts/ioctool @@ -309,7 +309,7 @@ elif [ "$CMD" == "telnet" ]; then ################################################################# elif [ "$CMD" == "pvs" ]; then - pvlistfile=/reg/d/iocData/"${NAME}"/iocInfo/IOC.pvlist + pvlistfile=/cds/data/iocData/"${NAME}"/iocInfo/IOC.pvlist if [ -f "$pvlistfile" ]; then less "$pvlistfile" else