06-16-2011
Check value of load balance dynamically
Hi All,
I want to check load balance(or CPU utilzation) on server dynamically based on that value i want to perform some operation .
Means if load balance is <10 then start server .
Am using prstat -a 1
commadn it is listing CPU utilzation/load balancing dynamically ..
How to take this value in variable continueslly an dperform operation??
thanks in Advance
---------- Post updated at 04:17 AM ---------- Previous update was at 02:01 AM ----------
Please help...urgentlyyy...
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Guys im trying to create a script that will load ballance 3 devices. Unix is still very alien to me having only been in this position for 3 months now. Not to mention the fact that i've been thrown in the deep end. Anyway so far i've managed to make a script that looks at all 4 devices and make a... (1 Reply)
Discussion started by: yorkyboy
1 Replies
2. Shell Programming and Scripting
I have a tab delimited file which has 27 character fields. The file needs to be loaded into an Oracle table. But the challenge is that everytime the file comes it may or may not have values in all 27 fields.
Column Definition of the 27 fields:
TYPE: Char (1)
NAME: Char (30)
CUSTOM_VAL: Char... (8 Replies)
Discussion started by: madhunk
8 Replies
3. 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
4. Linux
Hello
anybody know how use Load balance in linux?
Summer (2 Replies)
Discussion started by: summerpeh
2 Replies
5. UNIX for Dummies Questions & Answers
Ok so I have files that are going to land on /apps/, but I need to load balance them so I need to load balance them to four different folders.
The three file extensions I get are .mpe .mpd and mpf which will land here... /apps/ I can't move them until the mpf is there it triggers the next... (8 Replies)
Discussion started by: xgringo
8 Replies
6. UNIX for Advanced & Expert Users
Hi All,
I wanted to know what time the box jobs were loaded into a particular Autosys Instance.
Is there a autosys command to find out the above? (The timestamp at which a box was loaded)
I had loaded my JIL script without outputting it to the log file. (4 Replies)
Discussion started by: grep_me
4 Replies
7. Shell Programming and Scripting
Hi,
I need to balance the load to be processed by the system using shell script.
The scenario is like below:
Suppose there are some files in a directory:
-rw-rw-r-- 1 usr usrgrp 456432306 Oct 23 07:53 abc_queue_q1
-rw-rw-r-- 1 usr usrgrp 4123934 Oct 23 07:53... (1 Reply)
Discussion started by: vsachan
1 Replies
8. Shell Programming and Scripting
Hey everyone
can you check this script logic ?
it has to restart webservice if found server load is higher than X,
also i have put it in crontab to run every one minute
#!/bin/bash
loadavg=$(uptime | awk -F "." '{ print $1 }' | awk -F ":" '{ print $5 }')
if ; then
pkill -9 httpd
service... (7 Replies)
Discussion started by: nimafire
7 Replies
9. Shell Programming and Scripting
Hi,
Im going to use shell script for load the data into DB.
First i need to read the trail file(csv file has two columns with comma separated ) like file name trail1024(last 4 digitsMMDD).
In this trail file 27 entries will have like below,I need to read first csv file name and get the 4... (1 Reply)
Discussion started by: krajasekhar.v
1 Replies
LEARN ABOUT OSX
dbix::class::storage::dbi::replicated::balancer
DBIx::Class::Storage::DBI::Replicated::Balancer(3) User Contributed Perl Documentation DBIx::Class::Storage::DBI::Replicated::Balancer(3)
NAME
DBIx::Class::Storage::DBI::Replicated::Balancer - A Software Load Balancer
SYNOPSIS
This role is used internally by DBIx::Class::Storage::DBI::Replicated.
DESCRIPTION
Given a pool (DBIx::Class::Storage::DBI::Replicated::Pool) of replicated database's (DBIx::Class::Storage::DBI::Replicated::Replicant),
defines a method by which query load can be spread out across each replicant in the pool.
ATTRIBUTES
This class defines the following attributes.
auto_validate_every ($seconds)
If auto_validate has some sort of value, run "validate_replicants" in DBIx::Class::Storage::DBI::Replicated::Pool every $seconds. Be
careful with this, because if you set it to 0 you will end up validating every query.
master
The DBIx::Class::Storage::DBI object that is the master database all the replicants are trying to follow. The balancer needs to know it
since it's the ultimate fallback.
pool
The DBIx::Class::Storage::DBI::Replicated::Pool object that we are trying to balance.
current_replicant
Replicant storages (slaves) handle all read only traffic. The assumption is that your database will become readbound well before it
becomes write bound and that being able to spread your read only traffic around to multiple databases is going to help you to scale
traffic.
This attribute returns the next slave to handle a read request. Your "pool" attribute has methods to help you shuffle through all the
available replicants via its balancer object.
METHODS
This class defines the following methods.
_build_current_replicant
Lazy builder for the "current_replicant_storage" attribute.
next_storage
This method should be defined in the class which consumes this role.
Given a pool object, return the next replicant that will serve queries. The default behavior is to grab the first replicant it finds but
you can write your own subclasses of DBIx::Class::Storage::DBI::Replicated::Balancer to support other balance systems.
This returns from the pool of active replicants. If there are no active replicants, then you should have it return the master as an
ultimate fallback.
around: next_storage
Advice on next storage to add the autovalidation. We have this broken out so that it's easier to break out the auto validation into a
role.
This also returns the master in the case that none of the replicants are active or just just forgot to create them :)
increment_storage
Rolls the Storage to whatever is next in the queue, as defined by the Balancer.
around: select
Advice on the select attribute. Each time we use a replicant we need to change it via the storage pool algorithm. That way we are
spreading the load evenly (hopefully) across existing capacity.
around: select_single
Advice on the select_single attribute. Each time we use a replicant we need to change it via the storage pool algorithm. That way we are
spreading the load evenly (hopefully) across existing capacity.
before: columns_info_for
Advice on the current_replicant_storage attribute. Each time we use a replicant we need to change it via the storage pool algorithm. That
way we are spreading the load evenly (hopefully) across existing capacity.
_get_forced_pool ($name)
Given an identifier, find the most correct storage object to handle the query.
AUTHOR
John Napiorkowski <jjnapiork@cpan.org>
LICENSE
You may distribute this code under the same terms as Perl itself.
perl v5.16.2 2012-08-16 DBIx::Class::Storage::DBI::Replicated::Balancer(3)