Hi all,

I've got webmin running on linux and I'm trying to get the APC modules
working with the latest version of powerchute for linux.

I've gotten to the point where it reads the values of the data file into a
bunch of strings which outputs to the page. Problem is that when the split
command runs, it grabs all the data into the first string..

Here's a sample data file...
11/07/00,20:18:20,243.1,252.2,247.0,55.05,50.00,005.2,036.4,     ,
11/07/00,20:28:20,244.4,250.9,247.0,55.05,50.00,005.2,036.4,     ,
11/07/00,20:38:20,245.7,250.9,249.6,55.05,50.00,005.2,036.4,     ,
11/07/00,20:48:20,245.7,252.2,248.3,55.05,50.00,005.2,036.4,     ,
11/07/00,20:58:20,247.0,252.2,249.6,55.05,50.00,005.2,036.4,     ,

Here's a cut out of the program...
# originally was
#
($d1,$vendor,$bload,$lvmin,$lvmax,$uload,$freq,$lv,$outv,$utemp,$bv)=split;
# now is, according to the patch for apcupsd v3.6.2 (by Michael Siebecker
<michael.siebec
[EMAIL PROTECTED]>)
($d1,$lv,$lvmax,$lvmin,$freq,$outv,$uload,$bv,$bload,$utemp)=split;
                # combine and change this conditions as far as you like
                if ($lv < $config{"min_lv"} )  { $tc="bgcolor=yellow"};
                if ($lv > $config{"max_lv"} )  { $tc="bgcolor=purple"}

All the data is going into $d1 but why? any ideas where I should fix this?

thanks,
George.

PS: going to sleep now..


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to