LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-09-2012, 10:47 AM   #1
instrumentpilot
Member
 
Registered: May 2006
Posts: 34

Rep: Reputation: 2
Monitoring SWAP Usage


Hello all,

To start with I am running oracle on linux. I just did a query that I thought take, at most, 1 minute as I have done this in the past. However, it took 17 minutes. During that time I noticed a lot of "swap in" in the vmstat output meaning the data was coming from swap. As soon as the query was finished the "swap in" went to zero so I reason that all the swaping was to my process. I also noticed the "sar -P ALL" command showing a large value for %iowait (for the CPU my process was using) which I would expect under the circumstances.

So my question is: Can I monitor how much swap is being read (swap in) by a particular process? For example, I would have liked to see how much swap was being used by process 1835. Even better I would also like to see the amount of time it was taking to read in the swap.

Any help or articles for me to read are greatly appreciated.
Thanks,
Michael Cunningham
 
Old 04-09-2012, 07:23 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Did you even read the post ?.
Quote:
Can I monitor how much swap is being read (swap in) by a particular process?
No.
Quote:
I would have liked to see how much swap was being used by process 1835
Have a look at /proc/1835/smaps. You would do well to read "man proc" - also google "smaps" before assuming too much with the numbers.
Quote:
Even better I would also like to see the amount of time it was taking to read in the swap.
You wish.
 
Old 04-09-2012, 08:27 PM   #3
instrumentpilot
Member
 
Registered: May 2006
Posts: 34

Original Poster
Rep: Reputation: 2
Thanks for the input folks,

I will check out the info provided. And ... yes, I do wish, but I know I can't have everything, but I tried

Michael Cunningham
 
Old 04-09-2012, 09:06 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
So you didn't notice vmstat was mentioned - in the initial post ?.

As for the OP, swap usage is a symptom of a problem, you should be looking for the cause. If Oracle is the primary (active) workload of this machine, it shouldn't be swapping. At all.
 
Old 04-10-2012, 07:37 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
manu-tm's non posts have been reported. I don't see the point in what it has put in this thread.
 
Old 04-10-2012, 07:51 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Let it die.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Monitoring Usage Konphine Linux - Newbie 14 09-24-2011 03:54 AM
Monitoring Flash usage Shamis Linux - Embedded & Single-board computer 2 04-25-2011 01:16 PM
Monitoring memory usage kenneho Linux - Server 4 10-02-2008 08:35 AM
Monitoring System Usage dunmarie Linux - Newbie 2 11-11-2003 12:37 AM
Monitoring processor usage bananaman Linux - General 3 04-22-2003 06:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration