Operating System - HP-UX
1836308 Members
2987 Online
110099 Solutions
New Discussion

how to determine memory status?

 
Basel Naamna
Occasional Contributor

how to determine memory status?

How to get the following things:

1. Total physical memory
2. Free phyiscal memory
3. Total swap memory
4. Free swap memory

without root privilege

Thank you
7 REPLIES 7
Devender Khatana
Honored Contributor

Re: how to determine memory status?

Hi,

1. Total Physical Memory

#dmesg|grep Physical

2-4 by one single command

#swapinfo -atm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 504 502 2 100% 0 - 1 /dev/vg00/lvol2
dev 8000 1161 6839 15% 0 - 1 /dev/vg00/lvol10
dev 8000 1171 6829 15% 0 - 1 /dev/vg00/lvol11
reserve - 3723 -3723
memory 4696 918 3778 20%
total 21200 7475 13725 35% - 0 -

Here I have three swap volumes defined. So can get a more formatted information. See "man swapinfo" for details.

HTH,
Devender
Impossible itself mentions "I m possible"
Basel Naamna
Occasional Contributor

Re: how to determine memory status?

But Im not root and I dont have sudo,

[81] % ./dmesg

Aug 1 12:31
Can't read kernel memory
[82] %
Mahesh Kumar Malik
Honored Contributor

Re: how to determine memory status?

Hi Basel

1. To get info on physical memory in the systems:

$dmesg |grep Physical

2. To get info on free memory, total swap configured & Free swap memory:

$swapinfo -tam

You do not have to have root privilages for above commands

Regards
Mahesh
Devender Khatana
Honored Contributor

Re: how to determine memory status?

Hi,

I do not think you can get this information if you are not root. You need to be a priveledged user to gain all such information. There are other methods also but those also will work for preveledged users only.

HTH,
Devender
Impossible itself mentions "I m possible"
Pete Randall
Outstanding Contributor

Re: how to determine memory status?

See Nancy's thread:

"How to get CPU speeds and RAM without cstm or root "

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=851889


Pete

Pete
Muthukumar_5
Honored Contributor

Re: how to determine memory status?

Use this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=942521

hth.
Easy to suggest when don't know about the problem!
Devender Khatana
Honored Contributor

Re: how to determine memory status?

Hi,

You can get the first one without root. Use

#grep Physical /var/adm/syslog/syslog.log

The Physical column will give you the physical memory.

HTH,
Devender
Impossible itself mentions "I m possible"