Originally Posted By: mlord
Code:
#!/bin/sh
while sleep 5 ; do
    apcaccess | awk '/^LINEV/{print strftime("%F %F", systime()) " " $3 >> "/tmp/line_voltages.txt"}'
done



Thanks Mark, but I have another question:

That only samples the instantaneous value; my power's more intermittently bad than that. Is there any way to sample continuously, but (say) log the min/max values from each 5 minute period?

I'm sure something can be done with judicious amounts of sed or awk or perl, but I dimly remember this being built-in with older apcupsd.
_________________________
-- roger