Question

Linux command to check how many context switches the kernel has performed?

Linux command to check how many context switches the kernel has performed?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Simply we can define context switching as "saving the context of one process and loading the context of the another process"  

how to check the total context switches performed on system:

vmstat command will give you total number of context switches performed on system

if you give command as vmstat 1 . it gives total number of context switches performed with one second interval.

root@ubuntu!:-.# vmstat 1 2procs memoryswap- iosystem-cpu r b swpd free buff cache si so bi bo in cs us sy id wa 4 1 0 0 235060 44896 104604 4 0 235052 44896 104604 0 0 235052 44896 104604 0 0 235052 44896 104604 20 25 0 0 100 0 0 18 41 0 0 100 0 0 15 20 0 0 100 0 0 32 24 0 1 990 0 0 0

cs collumn shows the context switches performed per second

Add a comment
Know the answer?
Add Answer to:
Linux command to check how many context switches the kernel has performed?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT