Skip to content

Commit

Permalink
Merge pull request #176 from KaushikMalapati/pvlist
Browse files Browse the repository at this point in the history
Pvlist
  • Loading branch information
KaushikMalapati authored Mar 18, 2024
2 parents f92d08a + 61945b6 commit e7894bb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ usage: ioctool &lt;ioc&gt;|&lt;pv&gt; [option]<br/>
archive : opens the most recent archive file in less <br/>
log : opens the most recent log file in less<br/>
telnet : starts a telnet session with the ioc<br/>
pvs : opens the IOC.pvlist file in less<br/>
</td>
</tr>

Expand Down
13 changes: 12 additions & 1 deletion scripts/ioctool
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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=/cds/data/iocData/"${NAME}"/iocInfo/IOC.pvlist
if [ -f "$pvlistfile" ]; then
less "$pvlistfile"
else
echo "$pvlistfile could not be found." >&2
fi
fi

0 comments on commit e7894bb

Please sign in to comment.