Sponsored Content
Top Forums UNIX for Dummies Questions & Answers HOWTO - Total memory and CPU usage ... without top? Post 302454959 by jim mcnamara on Monday 20th of September 2010 11:36:41 AM
Old 09-20-2010
For a given process it varies by OS. If you have a /proc filesystem then those are used, for example in Solaris - pfiles, ptime - etc to get a per process look at things.

vmstat, iostat, and possibly sar are all standard choices, pick any or all of them.
The problem comes down to: learning to read and interpret the output of them. If you stick with sar, expect to read a lot of documentation
 

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. Gentoo

cpu%/mem% usage, scripting, dzen2: howto learn bash the hard way

I am trying to write a small (and rather simple) script to gather some info about the system and piping it to dzen2 first, i want to explain some things. I know i could have used conky, but my intention was to expand my knowledge of bash, pipes and redirections inside a script, and to have fun... (14 Replies)
Discussion started by: broli
14 Replies

3. 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

4. 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

5. 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

6. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

7. Shell Programming and Scripting

Finding total Percentage CPU usage

Hi, How can I find total CPU usage in percentage? e.g. if my system has 8 CPUs and I want to list total usage for all of them, is it possible through a command? I have tried some of the commands like top, mpstat, sar. The output of those commands has to be manipulated to derive the percentage... (14 Replies)
Discussion started by: jal_capri
14 Replies

8. UNIX for Dummies Questions & Answers

Total cpu usage in percent(%)

How to determine the total percentage cpu usage of a server having 4 cpu cores(quad core)? (3 Replies)
Discussion started by: proactiveaditya
3 Replies

9. Linux

How to calculate total CPU usage from SAR report?

Hi, I want to calculate the total cpu usage from the sar report. Say for example, Linux 2.6.24-21-generic (blade10) 09/10/2012 04:54:36 PM CPU %user %nice %system %iowait %steal %idle 04:54:37 PM all 0.00 0.00 0.00 0.00 ... (1 Reply)
Discussion started by: rohitmd
1 Replies

10. Solaris

Total CPU usage on a server

hi, i am using solaris server. I want to find the total CPU usage on a server. Top command will give that result, but here that command is not working. So anyone can help me to find the total CPU usage. (2 Replies)
Discussion started by: Arasu123
2 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 10:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy