Dear Yuri,
              Yes I have google on it. Where I can run it using this method
./myapp > /dev/null 2 & 1 & . The problem now I am worried is that incase
it crash how to restart ? Secondly once I restart the machine how to start
this automatically ? Which part is this of the script "The comment out part
of the script contains an example of background. ". Are you referring to
the original pfcount.c. Thank you.

Regards,
Frwa.



On Mon, Aug 19, 2013 at 1:23 PM, Francalacci Yuri <[email protected]> wrote:

> It is not using Cron nor init.d
> It is your process that should be sent in background.
> The comment out part of the script contains an example of background.
> Yuri
>
> Sent from my iPhone
>
> Il giorno 19/ago/2013, alle ore 06:46, frwa onto <[email protected]> ha
> scritto:
>
> Dear Yuri,
>                 I am confuse here when you say background is it via crond
> or /etc/init.d. Hope you can engligthen here.
>
> Regards,
> Frwa.
>
> On Monday, August 19, 2013, Yuri Francalacci <[email protected]> wrote:
> > 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"> >             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
> >
>
> _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
>
> _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
>
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to