To the original poster - you are doing some strange stuff here.
Normally to make sure your perl script always ran, you would run it like this:
PHP Code:
while true; do perl myscript.pl ; echo restarting; done > out.log
Add a & to run it in the background.
The "pidof perl" is dangerous since you might have many perl scripts running on the system. You'd be better off with something like this in your perl script:
Hi,
I am writing a shell script (ksh, solaris 5.8).
Script is X.sh
variables declared:
LOGFILE=X.log
the script is removing a file:
/usr/bin/rm "$DUMP_FILE1".Z >> $LOGFILE
If I kick off the script from the command line as follows:
./X.sh > X.con 2<& 1 (1 Reply)
Hi all,
I wish to have a script running even if my session is disconnected.
I've tried calling another session within it and using sudo to a different user, but it didn't work - as it was expected to do so :rolleyes:
I guess I'll have to work with "nohup" command, right ?
trying with the... (4 Replies)
Hi,
I am executing a OWB mapping from a shell script like this
$OWB_SQLPLUS MY_WAREHOUSE plsql MY_MAPPING "," ","
I want to log this mapping execution process into a file.
Please let me know if this will work:
$OWB_SQLPLUS MY_WAREHOUSE plsql MY_MAPPING "," "," >> LOGFIL.log
I will... (1 Reply)
Hi,
I have a shell script where I log on to sqlplus like this
log()
{
sqlplus -s scott/tiger <<!
select count(*) from EMP;
!
}
log
Here I have hardcoded/used the username : scott and password : tiger directly to log on to SQLPLUS. If i have my log in information in my profile file... (2 Replies)
Hi ALL,
Is there any way, to login into a website using Shell/Perl command/script?
I am struggling on this from quite sometime but with no luck. Can you guys help, please?
My sole purpose is to login a website (Which requires Username and Password) and then extract some information from... (3 Replies)
Hello
I wrote a nice Perl script that is intended to find and copy some files when getting a TERM signal. Now I wanted to make a shell script that starts/restarts the Perl script if it crashes/ends because of errors and make a log of all output the Perl Script gives. The problem is that it won't... (1 Reply)
Hi All,
Sorry if it is a duplicate post. I have not got any reference about this anywhere.
I looked at the posts described in SSH - Passing Unix login passwords through shell scripts - Linux / UNIX Forum and it helped me till the point to connect to the host and executing the basic commands.... (3 Replies)
Hi All,
I am preparing a script which executes following things:
1) Logs into 8 cluster one by one.
2) After logging into each cluster,it prints the cluster name & then exit from that cluster.
3) Then it logs to next cluster & peform the same task.
Here is what i have written :
for... (8 Replies)
Bash on Oracle Linux 6.3
I have a shell script whose output I want to redict to a log file. So, I can simply redirect the output as shown below.
# cat myscript.sh
#### I actually want some logging mechanism here which will redirect the output to a log file
echo 'hello world'
#... (3 Replies)
Discussion started by: John K
3 Replies
LEARN ABOUT DEBIAN
speedy_backend
SPEEDY_BACKEND(1p)SPEEDY_BACKEND(1p)NAME
speedy_backend - the backend process for a persistent Perl interpreter
SYNOPSIS
none ; this program is not meant to be called directly.
DESCRIPTION
speedy, short for SpeedyCGI, is a way to run perl scripts persistently, which can make them run much more quickly.
After the script is initially run, instead of exiting, the perl interpreter is kept running inside a backend process, speedy_backend. Dur-
ing subsequent runs, this interpreter is used to handle new executions instead of starting a new perl interpreter each time. A very fast
frontend program, speedy, written in C, is executed for each request. This fast frontend then contacts the persistent Perl process, which
is usually already running, to do the work and return the results.
Each perl script runs in its own Unix process, so one perl script can't interfere with another. Command line options can also be used to
deal with programs that have memory leaks or other problems that might keep them from otherwise running persistently.
The speedy front end connects to the back end process, speedy_backend, via a Unix socket in /tmp. A queue is kept in a shared file in /tmp
that holds an entry for each process. In that queue are the pids of the perl processes waiting for connections. The frontend pulls a
process out of this queue, connects to its socket, sends over the environment and argv, and then uses this socket for stdin/stdout to the
perl process.
FILES
/tmp/speedy* A unix socket used to connect to the frontend process.
AUTHOR
Sam Horrocks
http://daemoninc.com
sam@daemoninc.com
NOTES
This manual page was created by Niko Tyni <ntyni@iki.fi> for Debian GNU/Linux, because the original program does not have one. It is based
on the original and more complete CGI::SpeedyCGI(3pm) manual page.
SEE ALSO perl(1), CGI::SpeedyCGI(3pm), speedy(1)SPEEDY_BACKEND(1p)