Execute jobs on remote clients - Intersystems Cache

245 views
Skip to first unread message

Tommy Martin

unread,
Aug 18, 2011, 8:37:53 AM8/18/11
to Hardhats
Can anyone help me with this problem?

For reasons of systems management, I want to be able to run a program
on other Cache clients in my client/server network. For example, I am
on node SRVA01 and I want a complete system status of SRVA02 and
SRVA03 along with SRVA01. It would be a custom routine to write it to
a global so no output device is needed.

The only viable thing I have come up with is attempting to use the JOB
command with this syntax shown below. Currently I am using a VMS
system, soon to go to Linux but the same syntax should work both ways.
The ^^ reference is an implied namespace which Cache should match to
%SYS on A03.

J ^ROUTINENAME["^^_$1$DGA300:[CACHESYS.XXXA03.MGR]"]

But it gives me <UNKNOWN ERROR> .

Yes, I have run it by Intersystems but no resolution as yet.

Does anyone know how to run programs on remote systems in Cache?

Thanks.

Tommy Martin

David Whitten

unread,
Aug 18, 2011, 10:23:36 PM8/18/11
to hard...@googlegroups.com
Can you try it with a namespace in quotes ?
i.e. JOB LABEL^ROUTINE["VAH,RRR"] or something like that?



Chris U

unread,
Aug 19, 2011, 6:36:19 AM8/19/11
to hard...@googlegroups.com
Just for clarification - from VA01 you actually want to instruct VA02 to execute the process on/from VA02?

Did other M implementations have this feature?

drew einhorn

unread,
Aug 19, 2011, 8:23:42 AM8/19/11
to hard...@googlegroups.com
This suggestion is not the way he wants to do it,

And I don't have all the detsils.

But if his need is immediate, this may get him to a stopgap solution.

Every OS has a option for getting remote command line access to the OS.

For, linux/unix it's ssh.  Not sure about VMS, but I'd be very surprised if there
was not something with a client available for whatever OS he's coming from.

Once he has a OS command line on the remote system.
I'm sure there is a command to get a local M command line on the remote system.
The he can execute commands/scriptx on the remote system.

The detals will vary depending on the operationg systems and M implementations
on the systems involved.
 
--
Drew Einhorn

"You can see a lot by just looking."
  --  Yogi Berra

OldMster

unread,
Aug 19, 2011, 1:25:29 PM8/19/11
to hard...@googlegroups.com
I don't believe the remote job start options in Cache work unless the two systems (originator and target) are both running Cache's ECP networking, and are on the same Cache License.
Mark

David Whitten

unread,
Aug 19, 2011, 2:23:25 PM8/19/11
to hard...@googlegroups.com
On Fri, Aug 19, 2011 at 5:36 AM, Chris U <chris....@gmail.com> wrote:
Just for clarification - from VA01 you actually want to instruct VA02 to execute the process on/from VA02?

Did other M implementations have this feature?

This has been a MUMPS feature at least since the networked PDP-11 days.
It has been non-standard, but several implementations have provided it.

David

Benjamin Irwin

unread,
Aug 19, 2011, 3:15:31 PM8/19/11
to Hardhats
I am not sure if this is a helpful piece to the issue, I hope it
helps.

On a UNIX and VMS system the following command at a prompt will start
a CACHE session, run the routine, and exit.

Once at this point, then you could use the remote capabilities of the
OS.


$ csession CACHE ALL^%SS


Cache System Status: 3:11 pm 19 Aug 2011
Process Device Namespace Routine CPU,Glob Pr User/
Location
19373 CONTROL 0,0 -4
19374 WRTDMN 11,3 -3
19375 GARCOL 0,0 -2
19376 JRNDMN 1977,0 0


Benjamin Irwin

unread,
Aug 19, 2011, 5:13:42 PM8/19/11
to Hardhats
Another option that has worked for me in the past is to use Cache
Server Pages on multiple systems, then combine them into a single web
page for total system wide monitoring. The CSP and PHP routines below
are a demo of what can be done. This has worked in the past with D
ALL^%SS on VMS, but I can't seem to get it to work correctly on the
Apple right now.

Normally D ALL^%SS will provide a full system status without page
breaks, D THIS^%SS will provide just the namespace(UCI) that you are
current in.

The following CSP (Cache Server Page) will display the Cache Version
for a single system. If this is placed on all three systems, then via
a web browser you can look at all three systems.
----------------------------
<html>
<head>
<title>Testing Apple CSPs</title>
</head>
<body>
<pre>
<script language="Cache" runat="server">
W $ZVERSION
</script>
</pre>
</body>
</html>
----------------------------

The following web page uses inline frames to display all three systems
together in a single web page.
----------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=x-mac-
roman">
<title>Cache Versions</title>
</head>
<body>
<iframe src="http://localhost:57772/csp/user/first.csp" height="30%"
width="100%"></iframe>
<hr>
<iframe src="http://localhost:57772/csp/user/first.csp" height="30%"
width="100%"></iframe>
<hr>
<iframe src="http://localhost:57772/csp/user/first.csp" height="30%"
width="100%"></iframe>
</body>
</html>


Nancy Anthracite

unread,
Aug 20, 2011, 9:05:30 AM8/20/11
to hard...@googlegroups.com
I just discovered Windows "Powershell" when I was hunting for something that
could let me use a grep like command from a command line in Windows. This was
the first time I knew it existed as I generally only use Windows to a very
limited degree. It is under Accessories.

From a brief read of the Wiki page about Powershell, I wonder if you could use
it to remotely administer VistA on Cache from the command line.


--
Nancy Anthracite

rtweed

unread,
Aug 20, 2011, 9:40:59 AM8/20/11
to Hardhats
Check out the remoteFunction in M/Wire (http://www.mgateway.com/
mwire.html)

Alternatively, wrap the function you want to invoke on the remote
system as a web service - EWD can make this very easy for you

Rob

Chris

unread,
Aug 23, 2011, 5:42:44 AM8/23/11
to Hardhats
Tommy,

Did you get your problem solved? I'm interested in the solution you
were looking for...

On a side note; you could run a job in the background - simulate cron
and write your updates to a global. On a remote system, create a
shadow server or remotely mount the database and read the data from
the global. If you shadow, you get DR and system status in one.

David Shull

unread,
Aug 23, 2011, 9:01:02 AM8/23/11
to hard...@googlegroups.com

You could also consider using "rsh" to invoke a command on a remote
computer, the command being a "csession" to invoke cache to execute a
routine.

Tommy,

--

Reply all
Reply to author
Forward
0 new messages