On Thu, 3 Jun 1999, Kevin Jaget wrote:
> On Thu, 03 Jun 1999 17:58:34 +0200, you wrote:
>
> >On Thu, 3 Jun 1999 12:03:25 +0200, [EMAIL PROTECTED] wrote:
> >
> > >Now I can start mprime remotely through telnet - which works fine.
> > >But as soon as I quit the particular telnet-session - mprime quits
> > >too.
> > >Anybody can give me a hint how do keep mprime running?
> >
> >Sure..
> >I run mprime remotely on a server by using a simple
> >"./mprime > /dev/null &" command. The "> /dev/null" suppresses output and
> >the "&" makes MPrime run in the background. If you want output in a file
> >simply replace "/dev/null" with the filename.
>
> You might also want to look at the nohup and nice commands,
> depending on what exactly you are trying to do. If you've got root
> access (and the permission on the box's owner) you can also set
> mprime up to start when the system boots by modifying the init files
> in /etc/rc.d.
On the other hand, if you do not have root access or do not want to fool
around with init files (always dangerous), you can start mprime via cron
as a normal user: this is what I do and here is my script file which is
called every hour via cron. See the crontab command.
#!/bin/tcsh
set mersenne=`ps aux | grep -v grep | grep nicolau | grep mprime | wc -l`
if ( $mersenne == 0 ) then
echo "No mprime program running! Program will be initialized..."
pushd ~/mprime >& /dev/null
nice +19 ./mprime >& /dev/null &
popd >& /dev/null
else
if ( $mersenne > 5 ) then
echo $mersenne "mprime programs running!"
endif
endif
The variable "mersenne" counts the number of processes called mprime
run by nicolau; make sure your script is *not* called mprime_init
or it will count the script itself!
You must of course substitute your login where "nicolau" is.
You may also want to add parameters to mprime, or change the path
where mprime is located, or change the level of niceness.
http://www.mat.puc-rio.br/~nicolau
________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm