General
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find mem size and cpu details using command line

dhanish
Regular Advisor

How to find mem size and cpu details using command line

Hi ,
i want to find the physical Ram size ,CPU Details using command line.Can anybody help.

thnks
Never Say Die
8 REPLIES
Thierry Poels_1
Honored Contributor

Re: How to find mem size and cpu details using command line

Hi,

memory:
grep Physical /var/adm/syslog/syslog.log



cpu speed in Mhz:

HZ=`echo itick_per_tick/D | adb -k /stand/vmunix /dev/kmem|tail -1|cut -f2`
((MHZ=$HZ/10000))
echo $MHZ


regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Robin Wakefield
Honored Contributor

Re: How to find mem size and cpu details using command line

Hi,

If your syslog doesn't show it, try:

dmesg | grep Physical

or else use cstm.

Rgds, Robin
dhanish
Regular Advisor

Re: How to find mem size and cpu details using command line

Is there any command to find that as my grep Physical dmesg is not working.

Never Say Die
Stefan Farrelly
Honored Contributor

Re: How to find mem size and cpu details using command line

Heres a couple of scripts to do the job (must run as root);

1. memory.sh


#!/bin/ksh
if [ `uname -r` = "B.11.00" ]
then
echo "phys_mem_pages/D" | adb /stand/vmunix /dev/kmem|grep phys|tail -1|awk '{print $2/256 " MB"}'
else
echo "physmem/D" | adb /stand/vmunix /dev/kmem|grep phys|tail -1|awk '{print "Memory size = " $2 / 256 " Megabytes"}'
fi


2. cpuspeed.sh


let SPEED=`echo "itick_per_tick/D" | adb /stand/vmunix /dev/kmem|grep itick|tail -1|awk '{print $2}'`
if [ $SPEED -lt 0 ];then
echo "/stand/vmunix doesnt match running kernel, trying /stand/vmunix.prev"
let SPEED=`echo "itick_per_tick/D" | adb /stand/vmunix.prev /dev/kmem|grep itick|tail -1|awk '{print $2}'`
let SPEED=$SPEED/10000
if [ $SPEED -lt 0 ];then
echo "/stand/vmunix.prev doesnt match running kernel either, exiting"
exit 1
fi
else
let SPEED=$SPEED/10000
fi
echo "CPU Speed = $SPEED Mhz"

Im from Palmerston North, New Zealand, but somehow ended up in London...
dhanish
Regular Advisor

Re: How to find mem size and cpu details using command line

Thanks I will try this ..SO HP does not give any single command to find that.

Never Say Die
Thierry Poels_1
Honored Contributor

Re: How to find mem size and cpu details using command line

Hi,

http://come.to/cfg2html

the script on this site will generate a report of your server in text and html format; and it will probably contain more info than you ever want to see ;)

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Robin Wakefield
Honored Contributor

Re: How to find mem size and cpu details using command line

Hi,

To use cstm to determine the memory installed:

create a file containing:

scl type memory
il
done
quit
ok

then run:

cstm -f your-filename | grep "Total Physical"

Rgds, Robin.
Sanjay_6
Honored Contributor

Re: How to find mem size and cpu details using command line