Sponsored Content
Operating Systems HP-UX How to find the used memory in HP-UX? Post 302935679 by MadeInGermany on Wednesday 18th of February 2015 01:38:55 PM
Old 02-18-2015
A useful monitoring object is total available memory
Code:
swapinfo | awk '{total+=$2; used+=$3} END {print int(used*100/total)}'

And a warning threshold of 80 (percent usage).
This will warn before an "out of memory" situation occurs. It does not say anything about system performance.
Regarding CPU, a useful monitoring object is system load (obtained from the uptime command)
Code:
uptime | tr -d ',' | awk '
{
 v1=$(NF-2)/cores; v2=$(NF-1)/cores; v3=$NF/cores
 msg=sprintf ("- load average: %4.2f, %4.2f, %4.2f",v1,v2,v3)
}
(v1>w && v2>w && v3>w) { print "WARNING",msg; exit 1 }
{ print "OK",msg; exit 0 }
' w=1.1 cores=2

Best practice is an AND condition of (1min average, 5min average, 15min average) as done with awk,
and a threshold of 1.1 if the load is divided by the number of active virtual CPUs (here "cores" is set to 2).
Where the number of "cores" can be determined on HP-UX with
Code:
machinfo

or
Code:
top

I think in HP-UX 11.x the best command to determine the logical CPUs is
Code:
/usr/sbin/ioscan -k -C processor | grep -c '^[0-9]'


Last edited by MadeInGermany; 06-01-2015 at 08:07 AM.. Reason: better method for cores
This User Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. HP-UX

How to find memory used by a process

Hi, Can anyone help me out in writing the shell scrip which monitors a process which is running and gives me the output of the memory being used by the process, I have the requirement of monitorig the memory usage of the process when it is running. Please help me out (3 Replies)
Discussion started by: vijayagiri
3 Replies

2. Filesystems, Disks and Memory

how to find memory capacity.

Hi, In Sun solaris o/s how can i find the memory space available,Swap space. By giving df command i can get the disc space. I want RAM space & swap space. If anybody assist me.that is great. Thanks (2 Replies)
Discussion started by: Mar1006
2 Replies

3. HP-UX

How to find the memory in HP-Unix?

Hi, I have a HP-Unix server, version B.11.23. Can someone tell me how to find out the physical memory & virtual memory (swap) in my server? & what is Page fault? & is there any limitation for page fault? Thank you. Your help is appreciated. (7 Replies)
Discussion started by: Amol21
7 Replies

4. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

5. Solaris

Unable to find 8 gb of memory

I 've one box with 16gb of RAM and top, vmstat showing 8712M free , i 'm unable to find which process is eating up rest of the memory , the system is not running anything at the moment. (14 Replies)
Discussion started by: fugitive
14 Replies

6. Red Hat

how to find out free memory?

hi, I have done the below, but am confused as to how much memory is "free" please help thanks $ free total used free shared buffers cached Mem: 132033488 48827536 83205952 0 1007696 45404632 -/+ buffers/cache: 2415208 ... (7 Replies)
Discussion started by: JamesByars
7 Replies

7. Ubuntu

Find defective ram memory

How do I find if I have defective ram in my computer. I don't have a cd-rom, so I can't use a bootable cd. (1 Reply)
Discussion started by: locoroco
1 Replies

8. AIX

How to find AIX Free Memory?

All, AIX: 6.1 64 bits How to find out Free memory available on AIX 6.1 64 bits When I used : svmon -G size inuse free pin virtual mmode memory 1048576 612109 191151 215969 549824 Ded-E pg space 4325376 ... (1 Reply)
Discussion started by: a1_win
1 Replies

9. UNIX for Advanced & Expert Users

Find memory usage along with time

Hi Guys, I have a script. It calls an executable inside (programmed in C). I will have to find the execution time of that script and amount of memory consumed by that process as well. #!/bin/sh echo "Script starting" echo "executable staring" executable parm1 parm2 parm3 echo... (4 Replies)
Discussion started by: PikK45
4 Replies

10. Solaris

How to find out the memory usage in Solaris?

Hi All, In one of the solaris box aslert got triggered as ... (Used_Real_Mem_Pct=93.0 Used_Swap_Space_Pct=75.0 )] when i see the usage by vmstat and sar i am not able to relate the alert with the free memory and swap memory please help to understand the vmstat output as below.. kthr ... (4 Replies)
Discussion started by: Riverstone
4 Replies
hostinfo(8)						    BSD System Manager's Manual 					       hostinfo(8)

NAME
hostinfo -- host information SYNOPSIS
hostinfo DESCRIPTION
The hostinfo command displays information about the host system on which the command is executing. The output includes a kernel version description, processor configuration data, available physical memory, and various scheduling statistics. OPTIONS
There are no options. DISPLAY
Mach kernel version: The version string compiled into the kernel executing on the host system. Processor Configuration: The maximum possible processors for which the kernel is configured, followed by the number of physical and logical processors avail- able. Note: on Intel architectures, physical processors are referred to as cores, and logical processors are referred to as hardware threads; there may be multiple logical processors per core and multiple cores per processor package. This command does not report the number of processor packages. Processor type: The host's processor type and subtype. Processor active: A list of active processors on the host system. Active processors are members of a processor set and are ready to dispatch threads. On a single processor system, the active processor, is processor 0. Primary memory available: The amount of physical memory that is configured for use on the host system. Default processor set: Displays the number of tasks currently assigned to the host processor set, the number of threads currently assigned to the host proces- sor set, and the number of processors included in the host processor set. Load average: Measures the average number of threads in the run queue. Mach factor: A variant of the load average which measures the processing resources available to a new thread. Mach factor is based on the number of CPUs divided by (1 + the number of runnablethreads) or the number of CPUs minus the number of runnable threads when the number of runnable threads is less than the number of CPUs. The closer the Mach factor value is to zero, the higher the load. On an idle system with a fixed number of active processors, the mach factor will be equal to the number of CPUs. SEE ALSO
sysctl(8) Mac OS X October 30, 2003 Mac OS X
All times are GMT -4. The time now is 10:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy