Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2001 15:36:17 -0400 (EDT)
From:      Marius <marius@mail.communityconnect.com>
To:        questions@FreeBSD.org
Subject:   getting cpu info 
Message-ID:  <Pine.BSF.4.21.0107301451590.8918-100000@utterlux.hq.communitconnect.com>

next in thread | raw e-mail | index | archive | help

I am trying to audit our company's network of *nix machines to find
candidates for replacement for newer faster models.  I basically want
write a script that logs in, executes some commands, and saves the
appropriate info.  Perl is certainly up to the task, so that isn't a
problem.  I'm just not sure how to grab the appropriate cpu info from our 
FreeBSD machines.  Linux has `cat /proc/cpuinfo` but I can't think 
of anything similar in FreeBSD.

I am most of the way there, I have everything I need except the speed of
the cpu(s) in MHz. Anybody know a quick and easy way to grab the cpu speed
on a machine without rebooting it?  I can do a lot with sysctl
to get memory resources and the number of cpu's, but a listing for
speed has thus far eluded me. 

# sysctl hw.physmem
# sysctl hw.ncpu

Tell me most of what I want to know, but hw.model is not specific enough
for my purposes.  Am I overlooking a sysctl variable, or is there some
other utility I could use?  Anyone have a suggestion?

Obviously this stuff would be in the boot messages of these machines, but
these machines are in production, and I would rather not reboot them.  And
because of that 'darned' stability that FreeBSD has, the boot messages
have long ago been wiped out of dmesg.yesterday and dmesg.today. ;)

Any pointers would be appreciated.  Please cc: me, as I am subscribed to
stable, but not questions.  

---------------------------------------------------------------
-Marius M. Rex

"Do not try to solve all life's problems at once -- learn to
dread each day as it comes."
                -- Donald Kaul




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107301451590.8918-100000>