4 votes

On Linux, what is the size of pages reported by vmstat command and/or /proc/vmstat?

In regards to the counters in /proc/vmstat the function that appears to update these values is submit_bio in Linux/block/blk-core.c. 2067 blk_qc_t submit_bio(struct bio *bio) 2068 { ... 2079 ...
Matthew Ife's user avatar
  • 23.6k
4 votes

Find out which task is generating a lot of context switches on linux

In newer kernel version sudo perf record -e context-switches -a # record the events # then ctrl+c sudo perf report # inspect the result This will give you the exactly result about context-...
snyh's user avatar
  • 141
2 votes

How to get % memory usage with vmstat?

I have same question with you and come up with a formula vmstat -s | awk ' $0 ~ /total memory/ {total=$1 } $0 ~/free memory/ {free=$1} $0 ~/buffer memory/ {buffer=$1} $0 ~/cache/ {cache=$1} END{...
Chienchi Lo's user avatar
2 votes
Accepted

sar and top show high cpu usage, but vmstat and ps show low cpu usage. Why?

This is an intermittent, occasional load. The first line of vmstat gives averages since the last reboot, which apparently on this host is mostly idle. Subsequent lines show data for the sampling ...
John Mahowald's user avatar
1 vote
Accepted

vmstat + on RHEL machine high values of swpd

You have 1 GB of 15 GB of swap space used on a machine with a total of 122 GB RAM. Does this value indicate a problem? No. As long as you have zero or minimal swap in/out (si/so columns) then the ...
AlexD's user avatar
  • 10.3k
1 vote
Accepted

3 different methods to count the number of context switches for a specific workload provide 2 different answers

The assumption that only the examined PID does context switches needs examining. Review context switches across all CPUs, such as with perf top -e context-switches -a. Probably you will see other ...
John Mahowald's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible