CLI tool that reports information about processes, memory, paging, block IO, traps, and cpu activity
Questions tagged [vmstat]
40 questions
15
votes
5 answers
Find out which task is generating a lot of context switches on linux
According to vmstat, my Linux server (2xCore2 Duo 2.5 GHz) is constantly doing around 20k context switches per second.
# vmstat 3
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si…
grzaks
- 335
- 1
- 3
- 9
13
votes
5 answers
Performance Tuning a High-Load Apache Server
I am looking to understand some server performance problems I am seeing with a (for us) heavily loaded web server. The environment is as follows:
Debian Lenny (all stable packages + patched to security updates)
Apache 2.2.9
PHP 5.2.6
Amazon EC2…
futureal
- 397
- 1
- 3
- 17
11
votes
2 answers
How would you interpret the following vmstat output?
Consider the following five machines (named c, h, j, s and u) and their respective vmstat 1 outputs.
Given the information from the vmstat output:
Which machines would you consider being in a good shape? Why? What's your reasoning?
Which machines…
knorv
- 1,789
- 6
- 19
- 29
10
votes
4 answers
How to get % memory usage with vmstat?
I need to get a memory usage in % from vmstat, but I don't quite understand some of the numbers relating to memory displayed in vmstat.
In particular, given an output like this
procs -----------memory---------- ---swap-- -----io---- --system--…
His
- 249
- 1
- 4
- 9
8
votes
2 answers
Server load high, CPU idle. NFS the cause?
I am running into a scenario where I'm seeing a high server load (sometimes upwards of 20 or 30) and a very low CPU usage (98% idle). I'm wondering if these wait states are coming as part of an NFS filesystem connection. Here is what I see in…
Mech
- 660
- 2
- 10
- 22
7
votes
1 answer
On Linux, what is the size of pages reported by vmstat command and/or /proc/vmstat?
As many have stated on StackExchange and elsewhere, a typical kernel/mmu page size for Linux is 4 KiB. I have verified that this is the case on my OS/architecture (RHEL 6.6, Intel Xeon E5-2690).
Now among other things, the vmstat -s command reports…
Marc C
- 81
- 4
6
votes
1 answer
determining free memory from command line on Windows
I would like to monitor the free memory on four machines each running Windows Server 2003 R2 SP2 64-bit. Each box has 31.7gb of RAM. I would like to periodically run a command line tool so I can collect the output and later make charts with it.
I…
Nate
- 184
- 1
- 2
- 6
4
votes
1 answer
Interpretation of non-zero vmstat "si/so" values
What are useful rule-of-thumbs with regard to interpreting non-zero vmstat "si/so" values? When are the values "okay" and when are they an indication of that the memory situation is problematic?
The question is of course hard to answer in the…
knorv
- 1,789
- 6
- 19
- 29
4
votes
3 answers
awk on vmstat to get si,so
I am writing a shell script to check the vmstat si and so data at various time intervals
vmstat 1 sample output:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo …
APZ
- 954
- 2
- 12
- 24
4
votes
5 answers
vmstat -f shows large number of forks
I have a production server that is showing a very large number of forks when running vmstat -f. Any suggestions on steps that could be used to help find out what the origin of the forks are?
vmstat -f 1
6650796 forks
EDIT:
[~]$ ./forks.sh…
Taylor Leese
- 179
- 3
- 10
3
votes
2 answers
Reporting historical system activity in FreeBSD
I'd like to record data about system activity under FreeBSD for future analysis. If I were running a SysV system, I'd just sar and its related utilities, but that doesn't exist in the BSDs. (And bsdsar has gone missing.) I don't really care about…
wfaulk
- 6,828
- 7
- 45
- 75
3
votes
2 answers
Top showing 64% idle on first screen or batch run, while there is no idle time at all
I'm running a quite heavy number crunching thing on a few 4 core servers, all running Ubuntu Precise Pangolin LTS 64 bit, in the cloud (so I suppose in a virtualized environment).
To monitor the cpu usage, i wrote a .sh that uses "top -b -n 1" (that…
Simone Gianni
- 176
- 6
3
votes
1 answer
Getting CPU steal times on Ubuntu 11.4 Virtual Box
I'm trying to check on CPU steal times in a virtual machine. The goal is for me to be able to detect if my app is running in a VM on over-committed hardware.
I'm currently just testing, in preparation for later production.
I was trying to test this…
ThoughtfulHacking
- 131
- 3
3
votes
2 answers
The CPU idle is set to 99 while using vmstat, what does this mean?
I am confused with the CPU idle time is set to 99. Does this mean the CPU is idle not doing anything for 99% of the time?
#vmstate
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache …
Mark k
2
votes
6 answers
Chop headers off of vmstat command?
Is there a way to run the VMSTAT command (or something like it) and have a timestamp be included in the line? I know that I can pipe the output of the command and manipulate the results, but if I do that, I'll get junk information; I'm told that…
IVR Avenger
- 325
- 1
- 5
- 15