Sponsored Content
Top Forums UNIX for Advanced & Expert Users How often should I monitor the CPU and memory usage ? Post 302345395 by qiulang on Wednesday 19th of August 2009 11:58:54 PM
Old 08-20-2009
How often should I monitor the CPU and memory usage ?

Hi all,

When you monitor the CPU and memory usage, how often do you do it ? Do it too often or too rarely will both cause the problem. So does anyone have hand-on experience ?

And for my case, the requirement says that when CPU usage is above X% or memory usage is above Y%, I should reject the further request but no further words for how long when the system is overloaded that I should reject the further request. But the requirment does mention that for each accepted request I should send ack back in Z seconds.

So my initial thought is that I should monitor CPU and memory usage when my app begins to run (and till it exits), and if the CPU/memory usage keeps running above the threhold for Z seconds I should let then let request processing part know it and reject the further request.

It seems to an easiest answer. But any other thought ?

And how oftern should I monitor the CPU/Memory usage within this Z seconds ?

Besides, my app is a Java app but for the monitroing part I just want to write a script to call commands like sar/top/vmstat. So how these 2 parts communicate ? socket or keep checking the log file ?

Thanks in advance!

---------- Post updated at 07:58 PM ---------- Previous update was at 02:47 AM ----------

I google the topic for a while and only find this article discussing about the sampling rate InformIT: Windows 2000 Performance Tools: Leverage Native Tools for Performance Monitoring and Tuning > Performance Monitor

But it only discusses things like the more often you sample, the more disk space performance log files require. Still no words about how sampling rate affects system performance itself.

Besides, how do I calculate the cpu/memory usage? Should I average the sample data or count times (in a row) that CPU/memory usage are above the threshold and set another threshold for that count number ?

Any idea ? Thanks!

Last edited by qiulang; 08-19-2009 at 11:35 AM.. Reason: update
 

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
gnome-system-monitor(1) 					   User Commands					   gnome-system-monitor(1)

NAME
gnome-system-monitor - view system processes and monitor system usage on your computer SYNOPSIS
gnome-system-monitor [gnome-std-options] DESCRIPTION
The System Monitor application displays a list of system processes, and monitors system usage. System Monitor shows which processes are running and how the processes are related. System Monitor also provides detailed information about individual processes, and enables the user to control which processes are running. System Monitor displays how much processor (CPU) capacity the system is using, and how much disk space the system is using on each device. System Monitor displays this information in a graphical interface so that users can see what the system is doing. Users can then use the same graphical interface to modify the behavior of the system. OPTIONS
The following options are supported: gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more information. OPERANDS
None. EXAMPLES
Example 1: Launching the System Monitor example% gnome-system-monitor ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of gnome-system-monitor: NLSPATH. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-system-monitor Executable for System Monitor. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-system-monitor | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
System Monitor Manual Latest version of the GNOME Desktop User Guide for your platform. attributes(5), environ(5), gnome-std-options(5) NOTES
You may disable System Monitor at SunRay. Because this application use /proc and keep polling for information, they may adversely effect the performance of the system. But we will not change the default behavior and configuration for SunRay, if it give big impact to SunRay performance, administrators should disable them by using gconfd/APOC. The method to disable Monitor applet: They may use Gnome lockdown features to modify the mandatory settings of the Gnome configuration on their servers to add that applet iden- tifier to the list of disabled applets. you may use the following command (Note: Depending on when this is set, a logout may be required to take effect) %gconftool-2 --type list --list-type string --set /apps/panel/global/disabled_applets [OAFIID:GNOME_MultiLoadApplet] The method to disable Monitor application: You may just remove the package containing it on their servers, or just change the permissions on the binary: %chmod 700 /bin/gnome-system- monitor. Written by Niall Power, Sun Microsystems Inc., 2003. Updated by Henry Zhang, Sun Microsystems Inc., 2006. SunOS 5.11 1 Oct 2003 gnome-system-monitor(1)
All times are GMT -4. The time now is 11:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy