On Mon, Feb 12, 2007 at 09:10:52PM -0400, James Mackinnon wrote: > Hi All > > Hate to ask something that might be a simple answer but I am trying to find > how it is best / easiest to get the CPU usage of a BSD 4.0 box. > > I only need the result and not a bunch of other data as I want to store the > result in a mysql db. > > Basically i'm just looking for either the idle number or the % used > > I have tried with a few different options, but using SNMP (net-snmp 5x) I > can't find the actual % used or idle > > any help or suggestions would be ideal. I'm also working on finding the free > memory and some other stuff. I don't want to use MRTG at this point as we are > building a custom management system for custom purposes.
vmstat(8) should give you what you're asking for. There's more, of course, but it will be trivial to parse out what you want. -- Darrin Chandler | Phoenix BSD Users Group [EMAIL PROTECTED] | http://bsd.phoenix.az.us/ http://www.stilyagin.com/darrin/ |

