Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to check how much memory being used? Post 13263 by suntan on Monday 14th of January 2002 08:19:22 PM
Old 01-14-2002
Use swap -l in combination of vmstat...hope this helps
 

10 More Discussions You Might Find Interesting

1. Programming

how to use ioctl to check out memory usage

Hi all, I tried to output memory usage information while the process is executing at a particular time. I found out some people suggesting calling the ioctl. I followed it and wrote a test example: #include <unistd.h> #include <stdlib.h> #include <iostream.h> #include <fcntl.h> #include... (2 Replies)
Discussion started by: lanchen
2 Replies

2. Solaris

How to check physical memory

HI Please help me how to check the physical memory, model name and hardisk information. (5 Replies)
Discussion started by: jeelans
5 Replies

3. UNIX for Dummies Questions & Answers

check memory and processors

HI , I have AIX 5.2 ? I believe. I am looking to see how many processors I have and what the Memory is in this box? I know there is a command to run but I am really rusty at this Thanks Dave (2 Replies)
Discussion started by: rocker40
2 Replies

4. Solaris

Command to check memory size

Hi, I am looking for acoomand on HP where by i can see the CPU increasing for a given process ... I know i can see this from top/prstat .. But it will give for all the processes - I want something like say ps where i can call it from a shell script a few times and check if it is has increased... (0 Replies)
Discussion started by: nano2
0 Replies

5. Solaris

Memory Check in SUN Solaris

Hi I am facing a problem with memory in SunOS 5.9. I just want to check the memory usage. Can anybody suggest me a command that will help me in this regard. (4 Replies)
Discussion started by: rajarsi.ghosh
4 Replies

6. UNIX for Advanced & Expert Users

Check memory leak

I am running c++ code on AIX unix.I have a doubt that my code is using some memory but it is not clearing that.Some time i am getting heap allocation problem.In my code i am not using any malloc,new functions also i am justing using pointers and arrays. Is there any way i can find out if the... (2 Replies)
Discussion started by: ukatru
2 Replies

7. SuSE

How to check Memory Utilization by each process

If following is the usage of cat /proc/meminfo MemTotal: 4051304 kB MemFree: 28544 kB Buffers: 216848 kB Cached: 3398628 kB SwapCached: 0 kB Active: 455460 kB Inactive: 3291612 kB HighTotal: 0 kB HighFree: 0 kB... (5 Replies)
Discussion started by: bryanabhay
5 Replies

8. Shell Programming and Scripting

Memory check script

Hi all, OS: Solaris 10 I'm trying to put together a script to check memory utilisation. The command I'm running is: ps -ef -o pmem -o pid -o rss -o vsz -o args -o user | grep 2 | grep -v "VSZ COMMAND" | sort | tail -10 | sort -r And the output looks something like this: ... (9 Replies)
Discussion started by: d-train
9 Replies

9. Linux

how to check memory usage ?

hello, I have purchased VPS from one webhosting company. VPS comes with Virtuozzo power panel. It has 512MB gurranted RAM and dynamic RAM 2048 MB. I have hosted single domain with 50MB database and wordpress installation. But I am getting resource alerts. It goes sometime in yellow... (8 Replies)
Discussion started by: mrugesh78
8 Replies

10. Solaris

Memory Usage check

Hello Friends, I need to check memory usage & availability before I could run a program if there is enough memory is left or not, so how could i achieve this? Which command output i should rely on? I have diplayed outputs of SAR, VMstat and PRstat commands below, But how could i check memory... (8 Replies)
Discussion started by: EAGL€
8 Replies
vmstat(1M)						  System Administration Commands						vmstat(1M)

NAME
vmstat - report virtual memory statistics SYNOPSIS
vmstat [-cipqsS] [disks] [ interval [count]] DESCRIPTION
vmstat reports virtual memory statistics regarding kernel thread, virtual memory, disk, trap, and CPU activity. On MP (multi-processor) systems, vmstat averages the number of CPUs into the output. For per-processor statistics, see mpstat(1M). vmstat only supports statistics for certain devices. For more general system statistics, use sar(1), iostat(1M), or sar(1M). Without options, vmstat displays a one-line summary of the virtual memory activity since the system was booted. During execution of the kernel status command, the state of the system can change. If relevant, a state change message is included in the vmstat output, in one of the following forms: <<device added: sd0>> <<device removed: sd0>> <<processors added: 1, 3>> <<processors removed: 1, 3>> See System Administration Guide: Advanced Administration for device naming conventions for disks. OPTIONS
The following options are supported: -c Report cache flushing statistics. This option is obsolete, and no longer meaningful. This option might be removed in a future version of Solaris. -i Report the number of interrupts per device. count and interval does not apply to the -i option. -p Report paging activity in details. This option will display the following, respectively: epi Executable page-ins. epo Executable page-outs. epf Executable page-frees. api Anonymous page-ins. apo Anonymous page-outs. apf Anonymous page-frees. fpi File system page-ins. fpo File system page-outs. fpf File system page-frees. When executed in a zone and if the pools facility is active, all of the above only report actitivity on the processors in the pro- cessor set of the zone's pool. -q Suppress messages related to state changes. -s Display the total number of various system events since boot. count and interval does not apply to the -s option. -S Report on swapping rather than paging activity. This option will change two fields in vmstat's ``paging'' display: rather than the ``re'' and ``mf'' fields, vmstat will report ``si'' (swap-ins) and ``so'' (swap-outs). OPERANDS
The following operands are supported: count Specifies the number of times that the statistics are repeated. count does not apply to the -i and -s options. disks Specifies which disks are to be given priority in the output (only four disks fit on a line). Common disk names are id, sd, xd, or xy, followed by a number (for example, sd2, xd0, and so forth). interval Specifies the last number of seconds over which vmstat summarizes activity. This number of seconds repeats forever. inter- val does not apply to the -i and -s options. EXAMPLES
Example 1: Using vmstat The following command displays a summary of what the system is doing every five seconds. example% vmstat 5 kthr memory page disk faults cpu r b w swap free re mf pi p fr de sr s0 s1 s2 s3 in sy cs us sy id 0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82 0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62 0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64 0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78 1 1 1 10132 5496 0 0 5 0 0 0 0 0 23 0 0 183 92 134 1 20 79 1 0 1 10132 5564 0 0 25 0 0 0 0 0 18 0 0 131 231 116 4 34 62 1 0 1 10124 5412 0 0 37 0 0 0 0 0 22 0 0 166 179 118 1 33 67 1 0 1 10124 5236 0 0 24 0 0 0 0 0 14 0 0 109 243 113 4 56 39 ^C example% The fields of vmstat's display are kthr Report the number of kernel threads in each of the three following states: r the number of kernel threads in run queue b the number of blocked kernel threads that are waiting for resources I/O, paging, and so forth w the number of swapped out lightweight processes (LWPs) that are waiting for processing resources to finish. memory Report on usage of virtual and real memory. swap available swap space (Kbytes) free size of the free list (Kbytes) page Report information about page faults and paging activity. The information on each of the following activities is given in units per second. re page reclaims -- but see the -S option for how this field is modified. mf minor faults -- but see the -S option for how this field is modified. pi kilobytes paged in po kilobytes paged out fr kilobytes freed de anticipated short-term memory shortfall (Kbytes) sr pages scanned by clock algorithm When executed in a zone and if the pools facility is active, all of the above (except for "de") only report activity on the processors in the processor set of the zone's pool. disk Report the number of disk operations per second. There are slots for up to four disks, labeled with a single letter and number. The letter indicates the type of disk (s = SCSI, i = IPI, and so forth); the number is the logical unit number. faults Report the trap/interrupt rates (per second). in interrupts sy system calls cs CPU context switches When executed in a zone and if the pools facility is active, all of the above only report actitivity on the processors in the processor set of the zone's pool. cpu Give a breakdown of percentage usage of CPU time. On MP systems, this is an average across all processors. us user time sy system time id idle time When executed in a zone and if the pools facility is active, all of the above only report actitivity on the processors in the processor set of the zone's pool. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ Invocation is evolving. Human readable output is unstable. SEE ALSO
sar(1), iostat(1M), mpstat(1M), sar(1M), attributes(5) System Administration Guide: Basic Administration System Administration Guide: Advanced Administration NOTES
The sum of CPU utilization might vary slightly from 100 because of rounding errors in the production of a percentage figure. The -c option (Report cache flushing statistics) is not supported in this release. SunOS 5.10 20 Dec 2004 vmstat(1M)
All times are GMT -4. The time now is 02:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy