Put your app in background using & and taking care about stdin/out/err.
Y
On 18/ago/2013, at 11:41, frwa onto <[email protected]> wrote:

> Dear Yuri,
>                 Whats your best idea to run the application using which 
> method maybe I can try? Thank you.
> 
> On Saturday, August 17, 2013, frwa onto <[email protected]> wrote:
> > Any idea how to run the app in the background? What I need is that is 
> > should able to be monitor so incase it crash should be able to be restart 
> > by other app like monit etc.
> >
> > On Sat, Aug 17, 2013 at 6:51 AM, Francalacci Yuri <[email protected]> wrote:
> >
> > What about run you app in background?
> > Yuri
> > Sent from my iPhone
> > Il giorno 16/ago/2013, alle ore 06:59, frwa onto <[email protected]> ha 
> > scritto:
> >
> > Yes the script is suppose to be ever running for capture purposes and not 
> > exiting. That is why I move to this method where later I can use tools like 
> > monit to monitor and restart incase its down. But I am stuck now as I cant 
> > load my os. I run on separate shell this test. So I can always open up 
> > another terminal for it.
> >
> > On Fri, Aug 16, 2013 at 4:11 AM, Francalacci Yuri <[email protected]> wrote:
> >
> > I suppose your script is never exiting. Do you have the shell available 
> > after running the script?
> > Y
> >
> >
> >
> > Sent from Android
> >
> > frwa onto <[email protected]> ha scritto:
> >
> > Dear Yuri,
> >               First I had to remove the script else I cant boot. Next upon 
> > loading I re insert the script and running it accordingly from the 
> > /etc/init.d and its works perfectly fine no issues. During os load this 
> > what I can see
> > Starting crond [Ok]
> > Starting atd    [Ok]
> > Below it I can see read it says 
> > Capturing from eth0 .......
> >
> >
> > On Thu, Aug 15, 2013 at 6:42 PM, Francalacci Yuri <[email protected]> wrote:
> >
> > Start the system without the script. Once booted, run the script 
> > (/etc/init.d/yourscript start) from the command line and check where it 
> > stops.
> > Yuri
> >
> >
> >
> > Sent from Android
> >
> > frwa onto <[email protected]> ha scritto:
> >
> > Dear All,
> >             We have the pfcount to run as system script where below is the 
> > skeleton we use to set it. The problem during the loading of the os we 
> > notice after the crond is loaded this service is load and it shows the 
> > packet start to capture but never able to load the full os and restart 
> > there after. How to run it as script without any issue to the os ?
> >
> > #!/bin/bash
> > # chkconfig: 2345 95 05
> > # myapp daemon
> > # description: myapp daemon
> > # processname: myapp
> >
> > DAEMON_PATH="/usr/local/bin/"
> > DAEMON=myap1.c
> > #DAEMONOPTS="-my opts"
> > NAME=myap1.c
> > DESC="my packet capture"
> >
> > PIDFILE=/var/run/$NAME.pid
> > SCRIPTNAME=/etc/init.d/$NAME
> >
> > case "$1" in
> > start)
> >     printf "%-50s" "Starting $NAME..."
> >     insmod /usr/local/pfring/kernel/pf_ring.ko
> >     /usr/local/bin/myap1.c
> >     #cd $DAEMON_PATH
> >     #PID=`$DAEMON > /dev/null 2>&1 & echo $!`
> >     #echo "Saving PID" $PID " to " $PIDFILE
> >     #    if [ -z $PID ]; then
> >     #        printf "%s\n" "Fail"
> >     #    else
> >     #        echo $PID > $PIDFILE
> >     #        printf "%s\n" "Ok"
> >     #    fi
> > ;;
> > status)
> >         printf "%-50s" "Checking $NAME..."
> >         if [ -f $PIDFILE ]; then
> >             PID=`cat $PIDFILE`
> >             if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
> >                 printf "%s\n" "Process dead but pidfile exists"
> >             else _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc

###############################################
Yuri Francalacci   -   [email protected]   -   http://www.ntop.org
"Simplicity is the ultimate sophistication" - Leonardo da Vinci
###############################################







_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to