Sponsored Content
Top Forums UNIX for Advanced & Expert Users How often should I monitor the CPU and memory usage ? Post 302345691 by zxmaus on Thursday 20th of August 2009 02:29:31 AM
Old 08-20-2009
Hi,

which OS do you run - I assume it's AIX? And why do you want to do it at all - are you running so low in resources that a simple command execution / a running process will put your system into trouble? Or do you expect your application to be so badly written that it will negatively impact the system for a certain amount of time?

If it's AIX, vmstat or sar or any kind of command collecting once off data will not impact your performance at all, while interactive monitoring tools like topas or nmon will. On unix you should not average anything since the resource usage is 'at a given moment in time' and will change about 1000 times per second anyway - so most of these tools are internal averaging the interval between executions.

Saying this, where would you set your threshold anyway. AIX using vmm and constantly re-nicing its processes, is absolutely capable to run in (and depending hardware/setup/virtualization overrun) its cpu entitlement without any kind of problems - and if you're overutilizing your memory for a short time, and your system is properly tuned, this will not slow down your system either (an AIX box with proper sizing and 'enough' memory uses normally 70-80% memory computational and gives you the headroom of 20% memory for peak times).

Not knowing your system / application at all, I would say 'it depends on how long you expects your threads to run and what they're doing overall' - on a DB box I would monitor the system in 1 - 2 second intervals for using all resources more than 3 intervals - but as stated - when I use virtualization and have a large shared pool where I can get 1000% cpu in case I need it, I just don't have to monitor it at all. And if you have p6 systems and large shared memory pools, too - I would not even do it for memory.

zxmaus
 

10 More Discussions You Might Find Interesting

1. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies

2. Programming

CPU usage and memory usage

Please tell me solaris functions/api for getting following information 1- Function that tells how much memory used by current process 2- Function that tells how much memory used by all running processes 3- Function that tells how much CPU is used by current process 4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

3. UNIX for Dummies Questions & Answers

cpu, memory and virtual memory usage

Hi All, Does anyone know what the best commands in the UNIX command line are for obtaining this info: current CPU usage memory usage virtual memory usage preferably with date and time parameters too? thanks ocelot (4 Replies)
Discussion started by: ocelot
4 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

6. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

7. UNIX for Dummies Questions & Answers

What to monitor for memory usage?

hi guys I am having a doubt about memory monitoring on linux system what I should be monitoring? memory usage? o swap usage? I am using some monitoring tools but I am confused to what monitor for alerting for example this case looks the memory usage is very high and it's like that all... (2 Replies)
Discussion started by: karlochacon
2 Replies

8. AIX

Monitor Physical CPU usage on multiple servers

Hello, Looking for some help. I am trying to gather data at each server showing when the physical CPU is being used the most based on a weekly timeframe. I know this data can be seen through NMON but with multiple servers in our environment it could take a real long time. is there a easier... (4 Replies)
Discussion started by: audis$
4 Replies

9. AIX

Script to monitor CPU , Memory

Hello. I am using AIX 6 and did lot of searches on google for this script and found so many results. Just thought to ask you being the real good place for centralised answer: a) Could you tell me the aix script, which may tell me If the CPU load is above e.g. 60% ? b) Could you tell me the AIX... (2 Replies)
Discussion started by: panchpan
2 Replies

10. Shell Programming and Scripting

Please help me to monitor cpu usage vmstat in Redhat Linux .

Hi , Please some one help me How to write a shell script to monitor cpu usage vmstat in Redhat linux . Thanks, (4 Replies)
Discussion started by: saanvi
4 Replies
VMSTAT(1)						    BSD General Commands Manual 						 VMSTAT(1)

NAME
vmstat -- report virtual memory statistics SYNOPSIS
vmstat [-CefHiLlmstUvW] [-c count] [-h hashname] [-M core] [-N system] [-u histname] [-w wait] [disks] DESCRIPTION
vmstat reports certain kernel statistics kept about process, virtual memory, disk, trap, and CPU activity. The options are as follows: -C Report on kernel memory caches. Combine with the -m option to see information about memory pools that back the caches. -c count Repeat the display count times. The first display is for the time since a reboot and each subsequent report is for the time period since the last display. If no wait interval is specified, the default is 1 second. -e Report the values of system event counters. -f Report fork statistics. -H Report all hash table statistics. -h hashname Report hash table statistics for hashname. -i Report the values of system interrupt counters. -L List all the hashes supported for -h and -H. -l List the UVM histories being maintained by the kernel. -M core Extract values associated with the name list from the specified core instead of the default /dev/mem. -m Report on the usage of kernel dynamic memory listed first by size of allocation and then by type of usage, followed by a list of the kernel memory pools and their usage. -N system Extract the name list from the specified system instead of the default /netbsd. -s Display the contents of the uvmexp structure. This contains various paging event and memory status counters. -t Display the contents of the vmtotal structure. This includes information about processes and virtual memory. The process part shows the number of processes in the following states: ru on the run queue dw in disk I/O wait pw waiting for paging sl sleeping The virtual memory section shows: total-v Total virtual memory active-v Active virtual memory in use active-r Active real memory in use vm-sh Shared virtual memory avm-sh Active shared virtual memory rm-sh Shared real memory arm-sh Active shared real memory free Free memory All memory values are shown in number of pages. -U Dump all UVM histories. -u histname Dump the specified UVM history. -v Print more verbose information. When used with the -i, -e, or -m options prints out all counters, not just those with non-zero values. -W Print more verbose information about kernel memory pools. -w wait Pause wait seconds between each display. If no repeat count is specified, the default is infinity. By default, vmstat displays the following information: procs Information about the numbers of processes in various states. r in run queue b blocked for resources (i/o, paging, etc.) memory Information about the usage of virtual and real memory. Virtual pages (reported in units of 1024 bytes) are considered active if they belong to processes which are running or have run in the last 20 seconds. avm active virtual pages fre size of the free list page Information about page faults and paging activity. These are averaged every five seconds, and given in units per second. flt total page faults re page reclaims (simulating reference bits) pi pages paged in po pages paged out fr pages freed per second sr pages scanned by clock algorithm, per-second disks Disk transfers per second. Typically paging will be split across the available drives. The header of the field is the first charac- ter of the disk name and the unit number. If more than four disk drives are configured in the system, vmstat displays only the first four drives. To force vmstat to display specific drives, their names may be supplied on the command line. faults Trap/interrupt rate averages per second over last 5 seconds. in device interrupts per interval (including clock interrupts) sy system calls per interval cs CPU context switch rate (switches/interval) cpu Breakdown of percentage usage of CPU time. us user time for normal and low priority processes sy system time id CPU idle FILES
/netbsd default kernel namelist /dev/mem default memory file EXAMPLES
The command ``vmstat -w 5'' will print what the system is doing every five seconds; this is a good choice of printing interval since this is how often some of the statistics are sampled in the system. Others vary every second and running the output for a while will make it appar- ent which are recomputed every second. SEE ALSO
fstat(1), netstat(1), nfsstat(1), ps(1), systat(1), iostat(8), pstat(8) The sections starting with ``Interpreting system activity'' in Installing and Operating 4.3BSD. BUGS
The -c and -w options are only available with the default output. The -l, -U, and -u options are useful only if the system was compiled with support for UVM history. BSD
October 22, 2009 BSD
All times are GMT -4. The time now is 02:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy