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)						      General Commands Manual							 VMSTAT(1)

NAME
vmstat - report virtual memory statistics SYNOPSIS
vmstat [ -fsi ] [ drives ] [ interval [ count ] ] DESCRIPTION
Vmstat delves into the system and normally reports certain statistics kept about process, virtual memory, disk, trap and cpu activity. If given a -f argument, it instead reports on the number of forks and vforks since system startup and the number of pages of virtual memory involved in each kind of fork. If given a -s argument, it instead prints the contents of the sum structure, giving the total number of several kinds of paging related events which have occurred since boot. If given a -i argument, it instead reports on the number of inter- rupts taken by each device since system startup. If none of these options are given, vmstat will report in the first line a summary of the virtual memory activity since the system has been booted. If interval is specified, then successive lines are summaries over the last interval seconds. ``vmstat 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, running the output for a while will make it apparent which are recomputed every second. If a count is given, the statistics are repeated count times. The format fields are: Procs: information about numbers of processes in various states. r in run queue b blocked for resources (i/o, paging, etc.) w runnable or short sleeper (< 20 secs) but swapped Memory: information about the usage of virtual and real memory. Virtual pages are considered active if they belong to processes which are running or have run in the last 20 seconds. A ``page'' here is 1024 bytes. avm active virtual pages fre size of the free list Page: information about page faults and paging activity. These are averaged each five seconds, and given in units per second. re page reclaims (simulating reference bits) at pages attached (found in free list) pi pages paged in po pages paged out fr pages freed per second de anticipated short term memory shortfall sr pages scanned by clock algorithm, per-second up/hp/rk/ra: Disk operations per second (this field is system dependent). Typically paging will be split across several of the available drives. The number under each of these is the unit number. Faults: trap/interrupt rate averages per second over last 5 seconds. in (non clock) device interrupts per second sy system calls per second cs cpu context switch rate (switches/sec) Cpu: breakdown of percentage usage of CPU time us user time for normal and low priority processes sy system time id cpu idle If more than 4 disk drives are configured in the system, vmstat displays only the first 4 drives, with priority given to Massbus disk drives (i.e. if both Unibus and Massbus drives are present and the total number of drives exceeds 4, then some number of Unibus drives will not be displayed in favor of the Massbus drives). To force vmstat to display specific drives, their names may be supplied on the command line. FILES
/dev/kmem, /vmunix SEE ALSO
systat(1), iostat(1) The sections starting with ``Interpreting system activity'' in Installing and Operating 4.2bsd. 4th Berkeley Distribution March 15, 1986 VMSTAT(1)
All times are GMT -4. The time now is 04:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy