LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Run IPVSADM From Cron

To: LinuxVirtualServer.org users mailing list. <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Run IPVSADM From Cron
From: Jason Ledford <jledford@xxxxxxxxxxxx>
Date: Wed, 13 Feb 2008 08:37:16 -0500
This is my script now:
#!/bin/bash
cat /usr/src/ha/ipvsmessage > /var/www/active/index.html
date >> /var/www/active/index.html
echo "<br>" >> /var/www/active/index.html
/sbin/ipvsadm > /usr/src/ha/ipvshtml.tmp
/bin/sed -e s/$/\<br\>/ /usr/src/ha/ipvshtml.tmp >> /var/www/active/index.html

And everything works except the ipvsadm part, it creates the file ipvshtml.tmp 
but the file is blank.

Thanks for your help.

-----Original Message-----
From: lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx 
[mailto:lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Joseph Mack NA3T
Sent: Wednesday, February 13, 2008 8:08 AM
To: LinuxVirtualServer.org users mailing list.
Subject: Re: [lvs-users] Run IPVSADM From Cron

On Tue, 12 Feb 2008, Jason Ledford wrote:

> /sbin/ipvsadm | sed -e s/$/\<br\>/ > /var/www/active/index.html
>
> I am trying to run this to create a web page that can be
> checked to see what director is active and show the
> routing table.  The script runs just fine if I execute it.
> But when cron runs everything in the script runs except
> the ipvsadm part, it just seems to not do anything.

cron has the PATH=/bin:/usr/bin and all directories for
files have to be explicite. Is sed in cron's PATH? Break the
ipvsadm line up. What if you do

# /sbin/ipvsadm | logger

Joe
--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



<Prev in Thread] Current Thread [Next in Thread>