Operating System - HP-UX
1752728 Members
5858 Online
108789 Solutions
New Discussion юеВ

Re: queue (FIFO) execution in HP UX

 
SOLVED
Go to solution
w ko
Occasional Contributor

queue (FIFO) execution in HP UX

Hello,

i was wondering if you could assist me in the following situation:

i am trying to queue a group execution commands (same command but different parameters) submited from an openVMS system to a Unix system (HP UX). The commands should run in sequence; the next starts after prev finish. The commands are submitted in random order at any time.

So far the only option i see is writing a solution from scratch. generally speaking, this solution will involve copying the command as they come in from the openVms server into a file and having another process check this file for the next command insuring the commands are executed in FIFO order. the process will check the file continously or within specified constraint

this said, i was wondering if there are any unix commands that can do similar function or could help in this case?
8 REPLIES 8
Mel Burslan
Honored Contributor

Re: queue (FIFO) execution in HP UX

There is no operating system provided job scheduling tool like OpenVMS' scheduler, on hpux or any other unix platform for that matter. There are add on products but they are usually expensive and come with their own rules of implementation. If your VMS server is going to make a request to the UNIX side, it had better wait for the first request to finish before submitting the second one if the sequential output is desired. Or, as you have indicated, you can build the intelligence, using a script on the hpux side, yourself
________________________________
UNIX because I majored in cryptology...
Steven E. Protter
Exalted Contributor

Re: queue (FIFO) execution in HP UX

Shalom,

I agree this is something you will have to build yourself.

If you do, you might be able to sell it.

There are some commercial job schedulers out there but I don't think they meet this specific need.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven Schweda
Honored Contributor

Re: queue (FIFO) execution in HP UX

VMS has queues. Why not do the queuing
there? It should be relatively easy to rig
a VMS batch queue to manage the jobs, and
use RSH (or SSH, or something) to get the
jobs (commands) run on the HP-UX system.
w ko
Occasional Contributor

Re: queue (FIFO) execution in HP UX

Hello,

Thank you all for the quick response.

i actually found a command called mkfifo that might be helpful. are you familiar with this command?

thank you
James R. Ferguson
Acclaimed Contributor
Solution

Re: queue (FIFO) execution in HP UX

Hi:

Yes, 'mkfifo()' makes a named pipe or "first-in-first-out" file. Data that is written into the pipe is buffered and read back in the same order as it was written.

One process should open the pipe for reading while a second process should open the pipe for writing. In this fashion, you will achieve a synchronization of read/write activity in FIFO order.

Regards!

...JRF...
w ko
Occasional Contributor

Re: queue (FIFO) execution in HP UX

Hello,

is there a way using mkfifo to insure the process run in FIFO but one after another. ie the next command runs only after the prev has completed.

thank you
Dennis Handly
Acclaimed Contributor

Re: queue (FIFO) execution in HP UX

>Is there a way using mkfifo to insure the process run in FIFO but one after another.

Only what you invent. A FIFO, a pipe, only serializes data. You could write into the pipe the name of the script to execute.
The reader could simply read the script name, then execute it, then remove the file.

I suppose you can use batch(1), and set the queue size to 1. See queuedefs(4).
w ko
Occasional Contributor

Re: queue (FIFO) execution in HP UX

Thank you all for the reponses,

i actually found an easy way of doing this. bascially instead of passing the command to pipe file i just pass the command string and then i have another deamon process reading and executing the strings one at a time.

thanks