[Linux-HA] heartbeat reporting utility

Dejan Muhamedagic dejanmm at fastmail.fm
Mon Oct 1 10:57:36 MDT 2007


Hi,

On Mon, Oct 01, 2007 at 04:27:19PM +0200, Robert Lindgren wrote:
> My ha-log contains logs lines like:
> cib[3992]: 2007/10/01_15:13:49 info: cib_stats: Processed 4 operations
> (12500.00us average, 0% utilization) in the last 10min
> 
> Which makes the perl function to return garbage.

That is probably what it looks like when Heartbeat logs directly
to files. Nuisance. Either we change the log format to look like
syslog output or I'll have to support that format too.


> +++ l='cib[3992]: 2007/10/01_01:53:56 info:'
> +++ str2time 'cib[3992]: 2007/10/01_01:53:56 info:'
> +++ perl -e '$time='\''cib[3992]: 2007/10/01_01:53:56 info:'\'';' -e '
>         eval "use Date::Parse";
>         if (!$@) {
>                 print str2time($time);
>         } else {
>                 eval "use Date::Manip";
>                 if (!$@) {
>                         print UnixDate(ParseDateString($time), "%s");
>                 }
>         }
>         '
> ++ tmid=
> ++ '[' -gt 1191243600 ']'
> /usr/share/heartbeat/utillib.sh: line 145: [: -gt: unary operator expected
> ++ '[' -lt 1191243600 ']'
> /usr/share/heartbeat/utillib.sh: line 147: [: -lt: unary operator expected
> 
> 
> Not sure why my logs look like this, is there something I can change?

If you use syslog, it should work.

Thanks for reporting this. I'll fix it as soon as possible.

Dejan

> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems



More information about the Linux-HA mailing list