Re: [Linux-HA] pacemaker/HealthCPU

2011-02-04 Thread Lars Ellenberg
On Thu, Feb 03, 2011 at 01:09:04PM +0100, Michael Schwartzkopff wrote: > On Thursday 03 February 2011 12:35:34 Ulrich Windl wrote: > > Hi! > > > > I'm starting to explore Linux-HA. Examining one of the monitors, I think > > things could be made much more efficient. For example: To get the percent

Re: [Linux-HA] pacemaker/HealthCPU

2011-02-03 Thread Soffen, Matthew
-ha.org [mailto:linux-ha-boun...@lists.linux-ha.org] On Behalf Of Michael Schwartzkopff Sent: Thursday, February 03, 2011 7:09 AM To: General Linux-HA mailing list Subject: Re: [Linux-HA] pacemaker/HealthCPU On Thursday 03 February 2011 12:35:34 Ulrich Windl wrote: > Hi! > > I'm start

Re: [Linux-HA] pacemaker/HealthCPU

2011-02-03 Thread Michael Schwartzkopff
On Thursday 03 February 2011 12:35:34 Ulrich Windl wrote: > Hi! > > I'm starting to explore Linux-HA. Examining one of the monitors, I think > things could be made much more efficient. For example: To get the percent > of idle CPU the monitor uses 4 processes: top -b -n2 | grep Cpu | tail -1 > | a

Re: [Linux-HA] pacemaker/HealthCPU

2011-02-03 Thread Michael Schwartzkopff
On Thursday 03 February 2011 12:35:34 Ulrich Windl wrote: > Hi! > > I'm starting to explore Linux-HA. Examining one of the monitors, I think > things could be made much more efficient. For example: To get the percent > of idle CPU the monitor uses 4 processes: top -b -n2 | grep Cpu | tail -1 > | a

[Linux-HA] pacemaker/HealthCPU

2011-02-03 Thread Ulrich Windl
Hi! I'm starting to explore Linux-HA. Examining one of the monitors, I think things could be made much more efficient. For example: To get the percent of idle CPU the monitor uses 4 processes: top -b -n2 | grep Cpu | tail -1 | awk -F",|\.[0-9]%id" '{ print $4 }' However awk can do the effect of