9 More Discussions You Might Find Interesting
1. Linux
Hello Guys,
Hope you all doing well . :)
I was checking load balance command (uptime)on VM server and got below output.
# uptime
07:08:40 up 52 min, 2 users,a load average: 0.45, 0.11, 0.03
A :How we can calculate load average?
Thank you in advance !!
Cheers:)
Dont forget... (1 Reply)
Discussion started by: Nats
1 Replies
2. UNIX for Advanced & Expert Users
I have a requirement where i need to restrict users into reusing the first 3 exec machine they are using so as to reduce license usage of our tools.
So, lets say that at any instant an user is using 3 machine - mac1,mac2,mac3. Now if he is going to run a new job, he is expected to re-use one of... (1 Reply)
Discussion started by: animesharma
1 Replies
3. Shell Programming and Scripting
Hi There!
I'm writing this LSF script to make it easier to send jobs to a cluster when varying certain parameters. At one point I'd like to do something like:
set NPROC = 10
and later on call BSUB using something like:
#BSUB -n $NPROC
unfortunately for me, this throws an error:
... (4 Replies)
Discussion started by: lrayo
4 Replies
4. Shell Programming and Scripting
Hi All,
I have a XML file : System.xml in which I want to update the license tag with the new data from file licence.xml.
The content of files is in following format:
System.xml:
<?xml version="1.0"?>
<!DOCTYPE Configuration SYSTEM "SystemVariables.dtd">
<usageConfiguration... (2 Replies)
Discussion started by: Pramod_T
2 Replies
5. Solaris
Friends
I have noticed that the Sun Fire v490 server with Solaris9 OS in my office, is showing a load of 12.50 during peak time and the CPU showing a max of 75% and an average of 60%.
The Application running in this machine hung last month(For reasons unknown) and is running fine after... (5 Replies)
Discussion started by: Renjesh
5 Replies
6. Shell Programming and Scripting
Hi Folks,
I want to see the proper status of a low performance server. I tried using top command but it doesn't give all the details.
Any help in this regard would be appreciated.
Regards,
Sagar (1 Reply)
Discussion started by: sagarjani
1 Replies
7. Shell Programming and Scripting
I have written a script which checks server load and emails me.
I am running into the error:
./load_alert.sh: line 8: ; then
printf "WARNING - cpu load high in xyz server"
fi (2 Replies)
Discussion started by: vsmurali
2 Replies
8. Solaris
Hey guys,
I was task to look at a couple DNS servers for a co worker, Now they are running Solaris 2.6 on some Ultra 10 systems. How can I check the kind of load these systems are taking, I know that I can look at the network size and how many zones these servers are SOA of, but I looking in a... (3 Replies)
Discussion started by: aojmoj
3 Replies
9. Shell Programming and Scripting
hi all
need your help.
I am wrting a script that will load data into the table.
then on another load will append the data into the existing table.
Regards
Ankit (1 Reply)
Discussion started by: ankitgupta
1 Replies
Statistics::Basic::LeastSquareFit(3pm) User Contributed Perl Documentation Statistics::Basic::LeastSquareFit(3pm)
NAME
Statistics::Basic::LeastSquareFit - find the least square fit for two lists
SYNOPSIS
A machine to calculate the Least Square Fit of given vectors x and y.
The module returns the alpha and beta filling this formula:
$y = $beta * $x + $alpha
for a given set of x and y co-ordinate pairs.
Say you have the set of Cartesian coordinates:
my @points = ( [1,1], [2,2], [3,3], [4,4] );
The simplest way to find the LSF is as follows:
my $lsf = lsf()->set_size(int @points);
$lsf->insert(@$_) for @points;
Or this way:
my $xv = vector( map {$_->[0]} @points );
my $yv = vector( map {$_->[1]} @points );
my $lsf = lsf($xv, $yv);
And then either query the values or print them like so:
print "The LSF for $xv and $yv: $lsf
";
my ($yint, $slope) =
my ($alpha, $beta) = $lsf->query;
LSF is meant for finding a line of best fit. $beta is the slope of the line and $alpha is the y-offset. Suppose you want to draw the
line. Use these to calculate the "x" for a given "y" or vice versa:
my $y = $lsf->y_given_x( 7 );
my $x = $lsf->x_given_y( 7 );
(Note that "x_given_y()" can sometimes produce a divide-by-zero error since it has to divide by the $beta.)
Create a 20 point "moving" LSF like so:
use Statistics::Basic qw(:all nofill);
my $sth = $dbh->prepare("select x,y from points where something");
my $len = 20;
my $lsf = lsf()->set_size($len);
$sth->execute or die $dbh->errstr;
$sth->bind_columns( my ($x, $y) ) or die $dbh->errstr;
my $count = $len;
while( $sth->fetch ) {
$lsf->insert( $x, $y );
if( defined( my ($yint, $slope) = $lsf->query ) {
print "LSF: y= $slope*x + $yint
";
}
# This would also work:
# print "$lsf
" if $lsf->query_filled;
}
METHODS
This list of methods skips the methods inherited from Statistics::Basic::_TwoVectorBase (things like insert(), and ginsert()).
new()
Create a new Statistics::Basic::LeastSquareFit object. This function takes two arguments -- which can either be arrayrefs or
Statistics::Basic::Vector objects. This function is called when the leastsquarefirt() shortcut-function is called.
query()
LSF is meant for finding a line of best fit. $beta is the slope of the line and $alpha is the y-offset.
my ($alpha, $beta) = $lsf->query;
y_given_x()
Automatically calculate the y-value on the line for a given x-value.
my $y = $lsf->y_given_x( 7 );
x_given_y()
Automatically calculate the x-value on the line for a given y-value.
my $x = $lsf->x_given_y( 7 );
"x_given_y()" can sometimes produce a divide-by-zero error since it has to divide by the $beta. This might be helpful:
if( defined( my $x = eval { $lsf->x_given_y(7) } ) ) {
warn "there is no x value for 7";
} else {
print "x (given y=7): $x
";
}
query_vector1()
Return the Statistics::Basic::Vector for the first vector used in the computation of alpha and beta.
query_vector2()
Return the Statistics::Basic::Vector object for the second vector used in the computation of alpha and beta.
query_mean1()
Returns the Statistics::Basic::Mean object for the first vector used in the computation of alpha and beta.
query_variance1()
Returns the Statistics::Basic::Variance object for the first vector used in the computation of alpha and beta.
query_covariance()
Returns the Statistics::Basic::Covariance object used in the computation of alpha and beta.
OVERLOADS
This object is overloaded. It tries to return an appropriate string for the calculation, but raises an error in numeric context.
In boolean context, this object is always true (even when empty).
AUTHOR
Paul Miller "<jettero@cpan.org>"
COPYRIGHT
Copyright 2012 Paul Miller -- Licensed under the LGPL
SEE ALSO
perl(1), Statistics::Basic, Statistics::Basic::_TwoVectorBase, Statistics::Basic::Vector
perl v5.14.2 2012-01-23 Statistics::Basic::LeastSquareFit(3pm)