Monitor a dos console perl program running

M

Maverick Ieong

Hi,
I have a perl script (script name: doingwork.bat) that doing some
work that take about 3-4 hour easily on the DOS console. Say output on
the dos console, like below..
c:\>doingwork.bat
== Build Working 1/10000
Build 1 == done.
Build 2 == done.
....
....

Is that a way allow other people to see what doingwork.bat progress
have done from IE? I know using netmeeting can do it, but I just want
to connect the machine say..
http://mymachine.somedomain.com/doingwork.bat will tell me the above
progress from IE. Do I need to make the above script as CGI script or
how should I do it?

TIA.

Regards,
Mav
 
D

dan baker

Hi,
I have a perl script (script name: doingwork.bat) that doing some
work that take about 3-4 hour easily on the DOS console. Say output on
the dos console, like below..
c:\>doingwork.bat
== Build Working 1/10000
Build 1 == done.
Build 2 == done.
...
...

Is that a way allow other people to see what doingwork.bat progress
have done from IE? I know using netmeeting can do it, but I just want
to connect the machine say..
http://mymachine.somedomain.com/doingwork.bat will tell me the above
progress from IE. Do I need to make the above script as CGI script or
how should I do it?
------------------------------------

you are using a DOS machine for a web server? scarey!

its a little hard to tell exactly what you want... to initiate a
script on a web server, it'll have to be in the cgi-bin dir,
executable, and follow whatever naming convension your host defines.
You also need to protect it so that unknown users cant start it up!

If you are running a process on your local PC and just wanting to
display status in a "public" place, that is possible too...

anyway, one approach would be to have your script overwrite or append
to a file somwhere in your loop with "reasonable" frequency which is
either a plain HTML file, or included as a text file in a .shtml file
if your server can handle that. If the HTML has a meta-refresh in the
header, you can make it reload itself periodically, like maybe avery
minute, and display any new status updates. Not "real-time", but
probably close enough.

this is dead simple if the script is running on the server. If the
script is running on some offline machine, you'll have to add steps to
upload the status file to your webserver.

d
 
M

mluvw47

dan said:
(e-mail address removed) (Maverick Ieong) wrote in message

you are using a DOS machine for a web server? scarey!

its a little hard to tell exactly what you want... to initiate a
script on a web server, it'll have to be in the cgi-bin dir,
executable, and follow whatever naming convension your host defines.
You also need to protect it so that unknown users cant start it up!

If you are running a process on your local PC and just wanting to
display status in a "public" place, that is possible too...

anyway, one approach would be to have your script overwrite or append
to a file somwhere in your loop with "reasonable" frequency which is
either a plain HTML file, or included as a text file in a .shtml file
if your server can handle that. If the HTML has a meta-refresh in the
header, you can make it reload itself periodically, like maybe avery
minute, and display any new status updates. Not "real-time", but
probably close enough.

this is dead simple if the script is running on the server. If the
script is running on some offline machine, you'll have to add steps to
upload the status file to your webserver.

d

Thanks D, that is pretty helpful. That script doingwork.bat is
current running on an
XP,(and doesn't have apache or any other webserver install). the
doingwork.bat is
written in perl, and right now the output detail is only on that
machine screen, call this (machine A).
(Machine A) does have internet access and belong to same network.

What I tried to do is when the owner of machine A start the
doingwork.bat,
that will output what see from the machine A into a html, so others can
see what is going on by connect to
let say :http://machineA.domain/cgi-bin/doingwork

In this case, do I need to install apache on machien A? and convert
the doingwork.bat into doingwork.cgi?
Or do I need to write another cgi program as a wrapper to read whatever
doingwork.bat output?

TIA,

Regards,
Mav
 
M

mluvw47

dan said:
(e-mail address removed) (Maverick Ieong) wrote in message

you are using a DOS machine for a web server? scarey!

its a little hard to tell exactly what you want... to initiate a
script on a web server, it'll have to be in the cgi-bin dir,
executable, and follow whatever naming convension your host defines.
You also need to protect it so that unknown users cant start it up!

If you are running a process on your local PC and just wanting to
display status in a "public" place, that is possible too...

anyway, one approach would be to have your script overwrite or append
to a file somwhere in your loop with "reasonable" frequency which is
either a plain HTML file, or included as a text file in a .shtml file
if your server can handle that. If the HTML has a meta-refresh in the
header, you can make it reload itself periodically, like maybe avery
minute, and display any new status updates. Not "real-time", but
probably close enough.

this is dead simple if the script is running on the server. If the
script is running on some offline machine, you'll have to add steps to
upload the status file to your webserver.

d

Thanks D, that is pretty helpful. That script doingwork.bat is
current running on an
XP,(and doesn't have apache or any other webserver install). the
doingwork.bat is
written in perl, and right now the output detail is only on that
machine screen, call this (machine A).
(Machine A) does have internet access and belong to same network.

What I tried to do is when the owner of machine A start the
doingwork.bat,
that will output what see from the machine A into a html, so others can
see what is going on by connect to
let say :http://machineA.domain/cgi-bin/doingwork

In this case, do I need to install apache on machien A? and convert
the doingwork.bat into doingwork.cgi?
Or do I need to write another cgi program as a wrapper to read whatever
doingwork.bat output?

TIA,

Regards,
Mav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top