I wrote a perl script to run in a terminal window and track current,
as well as maximum (absolute value) values of f-error.
It is very easy to understand. It tries to format it nicely for easy
understanding. You need about 90 character wide terminal so that the
text stays on one line.
Here it is.
- Igor
=======================================================================
#!/usr/bin/perl
#######################################################################
# This script watches following errors on X, Y and Z and reports their
# values and maximums attained. The --delay argument specifies how much
# to sleep between checks, default 0.1 sec.
# Copyright (C) Igor Chudov, 2010.
# Released under the terms of the GNU Public License, Version 3.
#######################################################################
use strict;
use warnings;
use Getopt::Long;
use Time::HiRes qw( sleep );
my $delay = 0.1;
GetOptions(
"delay=f" => \$delay,
);
print "Delay=$delay.\n";
sub Get {
my ($name) = @_;
my $val = `halcmd getp $name 2> /dev/null`;
chomp $val;
$val ||= 0;
return $val;
}
my ($maxe0, $maxe1, $maxe2) = (0, 0, 0);
my $i = 0;
while ( 1 ) {
my $e0 = Get( "axis.0.f-error" );
my $e1 = Get( "axis.1.f-error" );
my $e2 = Get( "axis.2.f-error" );
$maxe0 = abs( $e0 ) if abs( $e0 ) > $maxe0;
$maxe1 = abs( $e1 ) if abs( $e1 ) > $maxe1;
$maxe2 = abs( $e2 ) if abs( $e2 ) > $maxe2;
my $s = sprintf( "X: %.5f(%.5f) Y: %.5f(%.5f) Z: %.5f(%.5f)
%09d",
$e0, $maxe0,
$e1, $maxe1,
$e2, $maxe2,
$i,
);
print "\r$s";
sleep $delay;
$i++;
}
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users