Sponsored Content
Top Forums Shell Programming and Scripting Check value of load balance dynamically Post 302531182 by vivek1489 on Thursday 16th of June 2011 04:36:02 AM
Old 06-16-2011
bash-3.00$ prstat -a 1
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
25734 dsfad01 3782M 3535M cpu16 0 0 1:03:58 12% siebprocmw/7
20530 s2d0 2904M 2677M cpu19 0 0 1:10:19 12% db2sysc/1
10174 adcxy8b 4160K 3384K cpu18 40 0 0:00:18 6.4% prstat/1
2240 daemon 2864K 1680K sleep 60 -20 169:13:36 1.9% nfsd/7
5301 s2yb 3577M 3386M sleep 59 0 10:16:33 1.5% db2sysc/1
5356 s2yb 3582M 3395M sleep 59 0 4:30:53 1.2% db2sysc/1
10121 root 21M 9824K sleep 59 0 61:47:47 1.0% scopeux/1
5331 root 35M 21M sleep 59 0 32:53:23 0.5% irmulticol/1
2205 dsfad05 659M 486M sleep 59 0 4:41:45 0.5% java/88
10167 root 2008K 912K sleep 59 0 28:03:31 0.4% perf64/1
5330 root 17M 8208K sleep 59 0 26:54:32 0.4% iravcol/1
6316 s2yb 3578M 3387M sleep 59 0 6:27:00 0.3% db2sysc/1
2216 s2c8 2192M 2143M sleep 59 0 0:04:03 0.2% db2sysc/1
29522 dcrmd02 1130M 770M sleep 59 0 12:13:43 0.2% java/115
25763 dsfad01 406M 371M sleep 59 0 0:04:51 0.1% siebproc/3
1047 root 50M 23M sleep 59 -20 11:04:37 0.1% pdosd/42
2238 dsfad05 144M 111M sleep 29 10 1:04:49 0.1% pmserver/36
8216 dtaud02 1047M 774M sleep 59 0 7:56:17 0.1% java/132
8214 root 898M 656M sleep 59 0 9:30:52 0.1% java/112
14135 dtobd01 1448M 556M sleep 59 0 2:29:45 0.1% java/52
29813 davjd02 542M 327M sleep 59 0 2:56:21 0.1% java/88
2966 dsudd02 713M 436M sleep 59 0 3:48:10 0.1% java/88
5201 ddald02 570M 424M sleep 59 0 5:17:58 0.1% java/107
9486 root 387M 250M sleep 59 0 3:34:21 0.0% java/80
5082 root 383M 241M sleep 59 0 3:16:48 0.0% java/81
2203 dsfad05 292M 213M sleep 29 10 0:41:58 0.0% java/53
8215 root 395M 250M sleep 59 0 3:18:19 0.0% java/82
258 root 150M 15M sleep 59 0 3:44:42 0.0% nscd/43
10097 root 483M 298M sleep 59 0 3:05:52 0.0% java/79
4828 s2k8 2117M 2042M sleep 59 0 1:05:20 0.0% db2sysc/1
23488 s2yb 3572M 3491M sleep 59 0 2:14:19 0.0% db2sysc/1
23501 s2yb 3573M 3488M sleep 59 0 0:48:48 0.0% db2sysc/1
3869 ddsed01 2630M 964M sleep 59 0 0:08:37 0.0% java/44
6377 s2c8 2181M 2104M sleep 59 0 1:19:31 0.0% db2sysc/1
5739 s2d0 2888M 2810M sleep 49 0 2:30:41 0.0% db2sysc/1
8819 s2k8 2131M 2079M sleep 59 0 0:23:17 0.0% db2sysc/1
11905 ddsed01 2168M 572M sleep 59 0 0:27:41 0.0% java/40
8644 ddsed01 2171M 614M sleep 59 0 0:19:17 0.0% java/42
13408 dsfad05 169M 123M sleep 29 10 0:02:17 0.0% pmdtm/13
NPROC USERNAME SWAP RSS MEMORY TIME CPU
72 dsfad01 7969M 8400M 13% 3:21:30 13%
157 s2d0 6420M 4330M 6.6% 272:52:57 12%
11 adcxy8b 11M 18M 0.0% 0:00:18 6.4%
77 s2yb 4749M 3786M 5.8% 89:25:46 3.1%
120 root 3241M 3392M 5.2% 213:36:12 2.8%
7 daemon 11M 12M 0.0% 169:14:53 1.9%
11 dsfad05 1622M 1823M 2.8% 8:44:48 0.7%
201 s2c8 6326M 3542M 5.4% 30:03:56 0.3%
7 dcrmd02 2225M 1887M 2.9% 14:40:06 0.2%
8 dtobd01 1697M 1131M 1.7% 3:15:10 0.1%
1 dtaud02 787M 878M 1.3% 7:56:17 0.1%
8 ddsed01 6903M 2139M 3.3% 0:55:35 0.1%
3 davjd02 336M 390M 0.6% 2:56:22 0.1%
24 oraaev0t 940M 1027M 1.6% 1:27:56 0.1%
184 s2k8 5897M 3378M 5.2% 41:04:15 0.1%
Total: 964 processes, 12646 lwps, load averages: 3.07, 2.88, 2.99


It changes after one second
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

load Balance

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

How to read a dynamically changing file and load into Oracle?

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

Need help in wrting Load Script for a Load-Resume type of load.

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

Load balance

Hello anybody know how use Load balance in linux? Summer (2 Replies)
Discussion started by: summerpeh
2 Replies

5. UNIX for Dummies Questions & Answers

mv load balance files

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

Autosys: Check the jil load time

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

Balance the load of files across queues using shell script

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

Check load and action

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

Script fro file check and load the trail file

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
GMIRROR(8)						    BSD System Manager's Manual 						GMIRROR(8)

NAME
gmirror -- control utility for mirrored devices SYNOPSIS
gmirror label [-Fhnv] [-b balance] [-s slice] name prov ... gmirror clear [-v] prov ... gmirror configure [-adfFhnv] [-b balance] [-s slice] name gmirror configure [-v] -p priority name prov gmirror rebuild [-v] name prov ... gmirror resize [-v] [-s size] name gmirror insert [-hiv] [-p priority] name prov ... gmirror remove [-v] name prov ... gmirror activate [-v] name prov ... gmirror deactivate [-v] name prov ... gmirror destroy [-fv] name ... gmirror forget [-v] name ... gmirror stop [-fv] name ... gmirror dump prov ... gmirror list gmirror status gmirror load gmirror unload DESCRIPTION
The gmirror utility is used for mirror (RAID1) configurations. After a mirror's creation, all components are detected and configured auto- matically. All operations like failure detection, stale component detection, rebuild of stale components, etc. are also done automatically. The gmirror utility uses on-disk metadata (stored in the provider's last sector) to store all needed information. Since the last sector is used for this purpose, it is possible to place a root file system on a mirror. The first argument to gmirror indicates an action to be performed: label Create a mirror. The order of components is important, because a component's priority is based on its position (starting from 0 to 255). The component with the biggest priority is used by the prefer balance algorithm and is also used as a master component when resynchronization is needed, e.g. after a power failure when the device was open for writing. Additional options include: -b balance Specifies balance algorithm to use, one of: load Read from the component with the lowest load. This is the default balance algorithm. prefer Read from the component with the biggest priority. round-robin Use round-robin algorithm when choosing component to read. split Split read requests, which are bigger than or equal to slice size on N pieces, where N is the number of active components. -F Do not synchronize after a power failure or system crash. Assumes device is in consistent state. -h Hardcode providers' names in metadata. -n Turn off autosynchronization of stale components. -s slice When using the split balance algorithm and an I/O READ request is bigger than or equal to this value, the I/O request will be split into N pieces, where N is the number of active components. Defaults to 4096 bytes. clear Clear metadata on the given providers. configure Configure the given device. Additional options include: -a Turn on autosynchronization of stale components. -b balance Specifies balance algorithm to use. -d Do not hardcode providers' names in metadata. -f Synchronize device after a power failure or system crash. -F Do not synchronize after a power failure or system crash. Assumes device is in consistent state. -h Hardcode providers' names in metadata. -n Turn off autosynchronization of stale components. -p priority Specifies priority for the given component prov. -s slice Specifies slice size for split balance algorithm. rebuild Rebuild the given mirror components forcibly. If autosynchronization was not turned off for the given device, this command should be unnecessary. resize Change the size of the given mirror. Additional options include: -s size New size of the mirror is expressed in logical block numbers. This option can be omitted, then it will be automatically calculated to maximum available size. insert Add the given component(s) to the existing mirror. Additional options include: -h Hardcode providers' names in metadata. -i Mark component(s) as inactive immediately after insertion. -p priority Specifies priority of the given component(s). remove Remove the given component(s) from the mirror and clear metadata on it. activate Activate the given component(s), which were marked as inactive before. deactivate Mark the given component(s) as inactive, so it will not be automatically connected to the mirror. destroy Stop the given mirror and clear metadata on all its components. Additional options include: -f Stop the given mirror even if it is opened. forget Forget about components which are not connected. This command is useful when a disk has failed and cannot be reconnected, pre- venting the remove command from being used to remove it. stop Stop the given mirror. Additional options include: -f Stop the given mirror even if it is opened. dump Dump metadata stored on the given providers. list See geom(8). status See geom(8). load See geom(8). unload See geom(8). Additional options include: -v Be more verbose. EXIT STATUS
Exit status is 0 on success, and 1 if the command fails. EXAMPLES
Use 3 disks to setup a mirror. Choose split balance algorithm, split only requests which are bigger than or equal to 2kB. Create file sys- tem, mount it, then unmount it and stop device: gmirror label -v -b split -s 2048 data da0 da1 da2 newfs /dev/mirror/data mount /dev/mirror/data /mnt ... umount /mnt gmirror stop data gmirror unload Create a mirror on disk with valid data (note that the last sector of the disk will be overwritten). Add another disk to this mirror, so it will be synchronized with existing disk: gmirror label -v -b round-robin data da0 gmirror insert data da1 Create a mirror, but do not use automatic synchronization feature. Add another disk and rebuild it: gmirror label -v -n -b load data da0 da1 gmirror insert data da2 gmirror rebuild data da2 One disk failed. Replace it with a brand new one: gmirror forget data gmirror insert data da1 Create a mirror, deactivate one component, do the backup and connect it again. It will not be resynchronized, if there is no need to do so (there were no writes in the meantime): gmirror label data da0 da1 gmirror deactivate data da1 dd if=/dev/da1 of=/backup/data.img bs=1m gmirror activate data da1 NOTES
Doing kernel dumps to gmirror providers is possible, but some conditions have to be met. First of all, a kernel dump will go only to one component and gmirror always chooses the component with the highest priority. Reading a dump from the mirror on boot will only work if the prefer balance algorithm is used (that way gmirror will read only from the component with the highest priority). If you use a different bal- ance algorithm, you should add: gmirror configure -b prefer data to the /etc/rc.early script and: gmirror configure -b round-robin data to the /etc/rc.local script. The decision which component to choose for dumping is made when dumpon(8) is called. If on the next boot a component with a higher priority will be available, the prefer algorithm will choose to read from it and savecore(8) will find nothing. If on the next boot a component with the highest priority will be synchronized, the prefer balance algorithm will read from the next one, thus will find nothing there. SEE ALSO
geom(4), dumpon(8), geom(8), gvinum(8), mount(8), newfs(8), savecore(8), umount(8) HISTORY
The gmirror utility appeared in FreeBSD 5.3. AUTHORS
Pawel Jakub Dawidek <pjd@FreeBSD.org> BUGS
There should be a way to change a component's priority inside a running mirror. There should be a section with an implementation description. Documentation for sysctls kern.geom.mirror.* is missing. BSD
December 27, 2013 BSD
All times are GMT -4. The time now is 02:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy