1834299 Members
2442 Online
110066 Solutions
New Discussion

mem : Command not found

 
SOLVED
Go to solution
Kevin_194
Advisor

mem : Command not found

Hi,

how can I see how big is the Main Memory of my system?
HP-UX 11.00

mem dosen't work.

Thanks
Kevin
4 REPLIES 4
Shaikh Imran
Honored Contributor
Solution

Re: mem : Command not found

hi,

Try
#dmesg |grep Physical

Regards,


I'll sleep when i am dead.
Carsten Krege
Honored Contributor

Re: mem : Command not found

The command dmesg gives the message buffer. At boot time it will print out memory information:

e.g. dmesg:
...
Memory Information:
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 524288 Kbytes, lockable: 387264 Kbytes, available: 449148 Kbytes


You can also use Glance's memory screen.

With adb you can get the number of physical pages (1 page = 4kB) directly from the kernel:

for HPUX 11.X:

echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem

phys_mem_pages:
phys_mem_pages: 131072

This system has 4kB * 131072 memory, ie. 512MB.

Carsten



-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Shaikh Imran
Honored Contributor

Re: mem : Command not found

Hi,

OR
Try this script:

/* mem.c - To compile: cc +DAportable -o mem mem.c */
#include
#include
#include
#include
#define BYTES_PER_MB 1048576
main()
{
struct pst_static pst;
union pstun pu;

pu.pst_static = &pst;
if ( pstat( PSTAT_STATIC, pu, (size_t)sizeof(pst), (size_t)0, 0 ) != -1
) {
printf( "Physical RAM = %ld MB\n",
(long)( (double)pst.physical_memory * pst.page_size / BYTES_PER_MB
) );
exit( 0 );
} else {
perror("pstat_getstatic");
exit( errno );
}
}



Regards,
I'll sleep when i am dead.
Franky_1
Respected Contributor

Re: mem : Command not found

Hi,

1.) dmesg | grep -i phys

2.) /opt/ignite/bin/print_manifest (which gives you detailed system information)

Regards

Franky
Don't worry be happy