Re: Best way to scan processes on remote nodes



shofu_au@xxxxxxxxxxxx wrote:

I have four non-clustered VMS (8.2) systems on which users can run
process. I want to limit the users to only running one instance of
there program on a single node at a time.

The user login in via a captive account so I would like to in DCL via
the login.com that they execute return information to thm saying that
there are already running their program on the other node.

The users sometimes forget they were using node X previous.

Users do that. How are these folks connected in? DECnet? Are the DECnet or LAT or IP connections not dropping some how? (That should cause the processes to exit, of course.)

Each program sets a unique process name prefix.

There is no such thing as a unique process name, unfortunately. Process names are only usually unique within a particular UIC group, but the process names are most definitely not unique across UIC groups.

What is the best way to achieve this?

The best way -- by far -- is to cluster the four nodes. Then you can use direct system service calls, or you can use existing UAF settings for the user. But if clustering the nodes is not available or not feasible here, you'll be using some of your own code.

DECnet proxies are setup and available.

I am after a clean way to do this that does not use temporary files.

DCL task-to-task connections can provide this, though you'll end up raising a connection to each host, and running a server process, and retrieving and processing the results, or the inability to connect to the host. There are examples of DCL task-to-task around, including in on the Freeware and at the old OpenVMS Ask The Wizard area.

My current approach executes a procedure on the remote machine and
captures the output from show process "name" and read it back in and
process it. There must be a better way to do this? Any lexical
function that allow me to scan for processes on non-clustered remote
nodes.

f$context and f$pid can provide this mechanism for you.

Can I use a system service to do this via C?

Yes. sys$process_scan and sys$getjpi[w], or just a wild-carded sys$getjpi[w], can provide this. If you have C code, you can maintain connections to a remote server, and basically roll your own directory server.

A little further afield here, you could look at using LDAP for this sort of thing, or otherwise maintaining a count in a distributed environment. (Cleaning up after a node failure gets interesting here, however -- with a cluster, you can use locks to coordinate and clean up after a failure.) Or you could establish a connection into a CGI script via a web server on each of the hosts, and look for the user that way.

I'd be tempted to look at one of the available terminal timeout programs, also known as idle process killers or such, too. Using one of these, you can conceivably even have these connect together to locate these wandering and forgetful users. But a generic timeout tool will eventually clear up stale logins, too.


.



Relevant Pages

  • Re: Why is my Exch srvr spamming people?
    ... so if you've ruled out open relays--how about an internal host that's ... these 400 connections may not be the actual source. ... and a client PC can send over TCP port 25 to another server on the ... "Rene Frenger" wrote: ...
    (microsoft.public.exchange.admin)
  • Re: Server resource and open database connections
    ... > If a host suggests poor performance is possibly due to 'open database' ... > connections and Im fairly sure that Ive closed everything - what is ... to close AND DESTROY all ADO objects has caused intermittent server hangs. ...
    (microsoft.public.inetserver.asp.db)
  • Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3
    ... Btw, host machine runs 100% too, so it is possible that client side is ... PORT = Target host port ... NCON = Number of connections to the server ... NACTIVE = Number of active connections ...
    (Linux-Kernel)
  • Re: Cant send outbound mail, Server Error: 476
    ... should have the answer to the canned response "'476 connections from your ... > An unknown error was returned from the SMTP server. ... > Response: '476 connections from your host are denied', Port: 25, ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: SBS 2003 IIS BASED SERVICES FAIL INTERMITTENTLY
    ... If I read your post correctly, you have a switch where the SBS ... Run DHCP server on your SBS, and set all client machine nics to dynamic. ... Once you have your nics configured, run the Connect to the Internet wizard, ... QUESTION1 - what is REFUSING CONNECTIONS? ...
    (microsoft.public.windows.server.sbs)