Scripts to monitor IBM i

Matthew Roessner
Matthew Roessner used Ask the Experts™
on
One of our developers has asked that we run a script that they wrote every 3-5 minutes on our iSeries.  The script is set up to see if a particular port is open - and if it isn't, then to start their application.

The script is a .sh (monitor.sh) file located in the IFS.

Is there any easy way to do this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
VP Technology / Senior Consultant
Commented:
Assuming this is a QShell script, it is fairly expensive in terms of resources to submit a new job every 3-5 minutes, and even more so with a job that starts a QShell session.  So submitting a new job each time may not be desirable.
 
Perhaps you can submit the job once, and set it up to loop with a QShell "sleep" at the end of the script.  "sleep" is the QShell equivalent of DLYJOB.

To execute the script from the command line, from CL, or from the jobs scheduler:

QSH CMD(\path\to\script\monitor.sh)

- Gary

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start Today