Re: load script at bootup
Narek Gharibyan wrote: 3. Is there a program, script or any way more appropriate to track the packet loss and ping availability.? You might try the APinger port in: ports/net/apinger I started using it a couple weeks ago to locate some connectivity problems, and it's impressive for a small simple utility. It has a startup script, if you wish to run it automatically. -R ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: load script at bootup
Hello, On Thu, 23 Aug 2007 13:59:37 -0500, Derek Ragona [EMAIL PROTECTED] wrote: At 01:48 PM 8/23/2007, Narek Gharibyan wrote: #!/bin/sh Ping -Dc 3600 xxx.xxx.xxx.xxx | tail -4 /root/stat date /root/stat echo === /root/stat I wrote this script for collecting ping statistic (after I email to a group the stat file). 1. how can I run this at startup Add your script to root's crontab. do a man on crontab for the exact syntax, but you can have it run @reboot then an interval. I also have a script that I want to start at boot time and I simply symlinked it to /usr/local/etc/rc.d/ It starts fine but now I wonder if maybe this is not the proper way to start up scripts? -- Zbigniew Szalbot www.slowo.pl www.lcwords.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: load script at bootup
Zbigniew Szalbot wrote: I also have a script that I want to start at boot time and I simply symlinked it to /usr/local/etc/rc.d/ It starts fine but now I wonder if maybe this is not the proper way to start up scripts? I don't think there's anything wrong with that solution, and I myself prefer it. (I symlink from a CVSed area). rc.d is very flexible and everything that happens at boot time is all in one (or two :-)) places. And you can run something every time the machine is shut down as well as when it's rebooted. Can't do that with cron :-) £0.02 --Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
load script at bootup
#!/bin/sh Ping -Dc 3600 xxx.xxx.xxx.xxx | tail -4 /root/stat date /root/stat echo === /root/stat I wrote this script for collecting ping statistic (after I email to a group the stat file). 1. how can I run this at startup 2. how can I restart this script after 3600 counts down 3. Is there a program, script or any way more appropriate to track the packet loss and ping availability.? Thank you in advance ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: load script at bootup
On Aug 23, 2007, at 1:48 PMAug 23, 2007, Narek Gharibyan wrote: #!/bin/sh Ping -Dc 3600 xxx.xxx.xxx.xxx | tail -4 /root/stat date / root/stat echo === /root/stat I wrote this script for collecting ping statistic (after I email to a group the stat file). 1. how can I run this at startup You can use cron with an entry similar to: @reboot /path/to/script.sh This will work as long as your script has the execute bit set for the user trying to run it. 2. how can I restart this script after 3600 counts down You can use something like sleep, or you can schedule, again using cron, the script to run every 3600 seconds. An entry such as: 0 * * * * /path/to/script.sh This will re-run your script every hour, on the hour. 3. Is there a program, script or any way more appropriate to track the packet loss and ping availability.? I would recommend using some nrpe module you write for nagios and/or cacti to monitor and even graph this information. Thank you in advance No problem! - Eric F Crist Secure Computing Networks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: load script at bootup
Take a look at SmokePing. We use it here to keep track of a mediocre internet connection. It graphs over time what your ping and latency was for any given target. http://oss.oetiker.ch/smokeping/ I'll let others address the starting at boot time, as I won't be able to describe it good. I will say that you should probably be looking at your /etc/rc.conf file. Make your script accessbile via a myscript_enable=YES call, and you're well on your way. -- S i x F e e t U p | Nowhere to go but open source Silicon Valley: +1 (650) 401-8579 x609 Midwest: +1 (317) 861-5948 x609 Toll-Free: 1-866-SIX-FEET mailto:[EMAIL PROTECTED] http://www.sixfeetup.com | Zope/Plone Custom Development Narek Gharibyan wrote: #!/bin/sh Ping -Dc 3600 xxx.xxx.xxx.xxx | tail -4 /root/stat date /root/stat echo === /root/stat I wrote this script for collecting ping statistic (after I email to a group the stat file). 1. how can I run this at startup 2. how can I restart this script after 3600 counts down 3. Is there a program, script or any way more appropriate to track the packet loss and ping availability.? Thank you in advance ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: load script at bootup
At 01:48 PM 8/23/2007, Narek Gharibyan wrote: #!/bin/sh Ping -Dc 3600 xxx.xxx.xxx.xxx | tail -4 /root/stat date /root/stat echo === /root/stat I wrote this script for collecting ping statistic (after I email to a group the stat file). 1. how can I run this at startup 2. how can I restart this script after 3600 counts down 3. Is there a program, script or any way more appropriate to track the packet loss and ping availability.? Thank you in advance Add your script to root's crontab. do a man on crontab for the exact syntax, but you can have it run @reboot then an interval. -Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: load script at bootup
On 24-Aug-07, at 12:18 AM, Narek Gharibyan wrote: #!/bin/sh Ping -Dc 3600 xxx.xxx.xxx.xxx | tail -4 /root/stat date / root/stat echo === /root/stat I wrote this script for collecting ping statistic (after I email to a group the stat file). 1. how can I run this at startup 2. how can I restart this script after 3600 counts down For 1 and 2, 'man cron', 'man crontab' 3. Is there a program, script or any way more appropriate to track the packet loss and ping availability.? You may write your own script which parses the output of ping using grep/awk/... regards, shantanoo