Hi,

   I'm working on a rush, special project that needs to determine if swapping
has increased (as a result of doing something *interesting*).  The program is
written in Perl and so far, it looks at SwapFree and SwapTotal from
/proc/meminfo.  It computes a value of SwapUsed from these values and saves
this value as a baseline.  Later, the program does some *interesting* things
and needs to determine if swapping has increased.  So, it's off to
/proc/meminfo again, recalculate SwapUsed, compare against baseline, and
make an educated guess if any increased activity is the direct result of
the program's Linux alterations.  Yuch.

   Is there a "better way" to determine when swapping has increased?  Are
there other /proc files that might be useful?

   Trapping the output from vmstat for "si" and "so" values might be
interesting, but certainly not clean (I'd rather find these values directly
if I could).

Cheers,
Arty

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to