On 8/15/07, Michael Schwartzkopff <[EMAIL PROTECTED]> wrote: > Am Mittwoch, 15. August 2007 10:52 schrieb Andrew Beekhof: > > On 8/15/07, Christian Rishøj <[EMAIL PROTECTED]> wrote: > > > On 8/14/07, Michael Schwartzkopff <[EMAIL PROTECTED]> wrote: > > > > is it possbile to monitor the CPU load constantly and to move resources > > > > to another node or declare on node dead if the load exceeds some level? > > > > Or if the HDD space is too low. > > > > How can this be done? > > > > Can I use the Sysinfo RA for this purposes? > > > > > > You could have a cronjob which would check the system load, translate > > > it to some score and update an attribute in the CIB accordingly. Then > > > use this score in some place constraint (in combination with a value > > > for resource_stickiness), letting resources move away from their > > > current node if the load score is above some threshold. > > > > > > For updating attributes in the CIB from a script, use this command: > > > > > > attrd_updater -n your_attribute -v some_value > > > > spot on > > the other suggestion of using monit would also work > > Hi, > > I would like to stick to sysinfo since this is in the frame of heartbeat. I > have a cloe resource of sysinfo so that on every node one resource is > running. The sib section for one node is: > > <nvpair > id="status-c624d6ab-eef3-413e-902d-89f53655afc7-probe_complete" > name="probe_complete" value="true"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-arch" > name="arch" value="i686"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-os" > name="os" value="Linux-2.6.18-4-xen-686"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-free_swap" > name="free_swap" value="150"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-cpu_info" > name="cpu_info" value="Intel(R) Celeron(R) CPU 1.70GHz"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-cpu_speed" > name="cpu_speed" value="4303.76"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-cpu_cores" > name="cpu_cores" value="1"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-cpu_load" > name="cpu_load" value="0"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-ram_total" > name="ram_total" value="150"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-ram_free" > name="ram_free" value="50"/> > <nvpair id="status-c624d6ab-eef3-413e-902d-89f53655afc7-root_free" > name="root_free" value="1.1"/> > > Yes, id did configure with the gui ... > > How can I do a placement constraint so that the webserver is running on the > node that has a cpu_load <= 2 (or root_free >=1 [GB])? Any hint what i should > put into the constraints section? > > <constraints> > <rsc_location id="place_apache" rsc="sysinfo"> > <rule id="prefered_place_apache" score="100"> > <expression attribute="root_free" > id="dcb4c245-ed75-491b-b6d1-6ad46a0aea4e" operation="gte" value="1"/> > </rule> > </rsc_location> > </constraints> > > does not seem to do the job. How to check an attribute for a specific host?
a specific host? any host matching that condition will have 100 added to its original score. depending on what other constraints you have (and which nodes have < 1Gb free) this may not have any effect yet. _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
