Editing
Scanco Administration
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Action commands=== ====Send a message to terminals==== <pre> $ reply /all "Merry Christmas to Bone Imaging Lab!" Reply received on SCEVA2 from user XTREMECT2 at _SCEVA2$FTA8473: 09:21:58 Merry Christmas to Bone Imaging Lab! 4 terminals have been notified on SCEVA2. $ 1 terminal has been notified on SCSRV2. $ 1 terminal has been notified on SC3309. $ 3 terminals have been notified on SCEVA1. $ </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====<code>mcr</code> vs <code>run</code> command==== The command <code>mcr</code> is the same as <code>run</code>, but only with mcr you can hand over 'in-line' parameters to an .exe file: <pre>$ run ut:ctheader.exe c000124.isq</pre> does not work, but you have to say <pre>$ mcr ut:ctheader.exe c000124.isq</pre> But funnily if you define a symbol in <code>microct_setup_user.com</code> (or <code>login.com</code>), <pre>$ ctheader :== $ut:ctheader.exe</pre> with just neither run nor mcr, but the 'funny' $ sign, then you can also hand over the ISQ name in-line. Small detail with big effect... [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Using fda, pipe and search==== The <code>fda</code> (file do all) command in conjunction with <code>sys$pipe</code> and <code>search</code> can be quite helpful. Generally, use <code>fda</code> if you want to have a wildcard to capture many files in one command line, otherwise simply use <code>sys$pipe</code> and <code>search</code>. It's easiest to simply see examples. In this case, read the ISQ headers and use <code>...</code> to include all subdirectories: $ fda ctheader dk0:[microct.data.0001234...]*.isq Here we include all AIM files, no matter whether it's a C1234567.AIM or C1234567_SEG.AIM or whatever else: $ fda "aix -l" dk0:[microct.data.0001234.00005678]*.aim Note the use of double-quotes around the target of the <code>fda</code> command when there are more than one strings in the command. In this example we ensure the filename is exactly 8 characters using "%" instead of "*": $ fda aix dk0:[microct.data...]C%%%%%%%.AIM [[Image:Bones2.jpg|20px]] <b>Warning! </b> It's a good practise to always test your wildcard usage with <code>dir</code> before applying a large command: $ dir dk0:[xxx...]*.aim Combine <code>fda</code> with <code>sys$pipe</code> and <code>search</code>: $ pipe fda "aix -l" dk0:[microct...]*.aim | search sys$pipe "Slope" And you can redirect the output into a file: $ fda/output=sys$scratch:all_headers.log aix dk0:[microct...]*.aim $ pipe fda type *.log | search sys$pipe "BV/TV" /output=BVTV.txt $ pipe fda/output=sys$scratch:zscan.txt "aix -l" C%%%%%%%.AIM | search sys$pipe "Original Creation-Date","Index Patient","Index Measurement","Patient Name","Site","Time" Again, if the command consists of multiple words with spaces between (e.g. mcr ut:xxx.exe), then enclose the command in double-quotes. $ fda "mcr ut:uct_ext_header_display" dk0:[microct...]*.isq Grab more than one line using <code>pipe</code> and <code>search</code> command: $ pipe aix *.aim | search sys$pipe "dim", "pos", "name" Some common examples I use, without <code>fda</code>, are: pipe aix -l D0013580.AIM | search sys$pipe "Original file","Index Patient","Index Measurement","Patient Name","Site","Time" pipe ctheader D0013580.ISQ | search sys$pipe "Patient Name","Patient Index","Measurement Index","Creation Date","Site" [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Putting multiple commands on a single line==== The key is to use the <code>PIPE</code> command. Basically separate all commands with ; <pre> $ pipe cd DISK2:[XTREMECT2.DATA.00003089.00016318] ; dir </pre> It has also some nice features of passing input and output along to the next command (see help), eg if you want to see the integration time of a certain scan : <pre> $ pipe ctheader C0014998.ISQ | search sys$pipe "Sampletime" Sampletime : 900000 [Β΅s] </pre> You can even submit a multi-line command to a remote computer using SSH: <pre> $ ssh -p22 -c 3des-cbc -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-dss microct@12.618.196.561 'commands.txt' </pre> where 'commands.txt' can be replaced by 'pipe cd DISK2:[XTREMECT2.DATA.00003089.00016318] ; dir' [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Make commands available to all users with symbols or paths==== DCL$PATH is one way to do that, WE don't use it... <pre> $ def dcl$path disk1:[microct.main],disk1:[microct.util] </pre> then, if you type <code> $ uct_t </code> it will first try to <code> $ @uct_t.com </code> and then <code> $ r uct_t.exe </code> however, we usually define it by giving full path: <pre> $ progx :== $disk1:[microct.main]progx.exe $ com_proc_x :== @disk1:[microct.main]procedure.com </pre> then, you can just type the shortcut ('symbol' in VMS language) We use the 'cd' to set the default path, you may also use this in your command procedure: <code>proc.com</code>: <pre> $ cd 'p1' $ dir *.*/size $ define COM disk1:[microct.commands] $ p :== @COM:PROC.COM </pre> these both go into <code>login.com</code>, but see the Wiki entry above to confirm exactly where... then, you can just type: <pre> $ p disk4:[microct.data.0000007.000009]*.ISQ </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Stopping disconnected sessions==== As <code>system</code> user you can check if there are any disconnected sessions, with <code>$ show user/full</code>: <pre> $ sh user/full OpenVMS User Processes at 5-JUN-2021 03:14:06.45 Total number of users = 2, number of processes = 7 Username Process Name PID Terminal MICROCT DECW$MWM 00000EA4 MBA6597: (disconnected) MICROCT DECW$SESSION 00000EA2 MICROCT VUE$MICROCT_3 00000EA6 MBA6601: (disconnected) MICROCT VUE$MICROCT_4 00000EA7 (subprocess of 00000EA2) MICROCT VUE$MICROCT_5 0000289E (subprocess of 00000EA2) MICROCT _FTA24: 00012284 FTA24: SYSTEM _FTA30: 000129DC FTA30: </pre> and kill any as follows: <pre> $ stop/id=00000EA4 $ stop/id=00000EA6 </pre> There may also be FTP connections that aren't closed properly. You can check for open FTP connection with this: <pre> $ sh sys/proc=tcpip$ftp* OpenVMS V8.3-1H1 on node SC4209 5-JUN-2021 03:12:53.14 Uptime 73 13:39:10 Pid Process Name State Pri I/O CPU Page flts Pages 00000426 TCPIP$FTP_1 LEF 9 786428 0 00:00:12.51 1089 751 N 000129E0 TCPIP$FTPC00046 HIB 4 106 0 00:00:00.03 431 353 N </pre> and again kill any with: <pre> $ stop/id=000129E0 </pre> But <b>DO NOT</b> kill the <code>TCPIP$FTP_1</code> as this is the actual FTP server process. Remember, in a cluster there will almost always be other open sessions which have their DECW$SM.LOG files locked. You don't need to delete them all! [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']]
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information