paging


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting paging
# 1  
Old 06-13-2008
paging

I need a script which sends a mail when paging is happening and which process is causing paging?
# 2  
Old 06-13-2008
1. What OS?
2. What did you try so far?
# 3  
Old 06-13-2008
It is solaris .....i tried using vmstat but not having clear idea bout scripting.
# 4  
Old 06-13-2008
vmstat' output on AIX looks like:
Code:
root@mickey05:/> vmstat 2

System configuration: lcpu=4 mem=16640MB ent=2.00

kthr    memory              page              faults              cpu
----- ----------- ------------------------ ------------ -----------------------
 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa    pc    ec
 4  0 1478028 2261220   0   0   0   0    0   0  14 686316 1194 66 29  4  0  2.00  99.9
 5  0 1483878 2255362   0   0   0   0    0   0  25 687447 1218 66 29  4  0  2.00 100.0
 4  0 1478012 2261212   0   0   0   0    0   0  26 672031 1238 67 29  4  0  2.00 100.1
 3  0 1478010 2261210   0   0   0   0    0   0  17 658346 1158 62 27 12  0  1.88  93.9

The 2nd row of statistics is interessting, since the 1st is average since boot. So I start in row 7 to check column pi (field 6) and po (field 7) which stand for "paging space in" and "paging space out". It could look like:

Code:
root@mickey05:/> vmstat 2| awk 'NR > 7 {if ( $5 > 10 || $6 > 10) system("myscript.sh")}';

That myscript.sh should handle your mail, might set some locking file so it doesn't spam you every 2 second interval, which vmstat is running on.
# 5  
Old 06-14-2008
I dont understand the script.please expalin me ......i am poor in scripting.
# 6  
Old 06-14-2008
Code:
vmstat 2| awk 'NR > 7 {if ( $5 > 10 || $6 > 10) system("myscript.sh")}';

vmstat output goes into awk. awk looks for lines count > 7; then if po or pi (col=$5 $6)
is above 10 execute the script called myscript.sh. myscript sends a warning email.

So, you need to create a simple script to send an email.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Paging

Hi , I have 8Gb memory in my JS21 server. When I run svmon it shows 3655Mb memory is utilized and 4344Mb free. I have configured 8Gb paging space and 14% is utilized which is 1Gb. I dont have memory issues but just want to know Why 1gb paging is utilized when my almost 4Gb real memory is free?... (6 Replies)
Discussion started by: vjm
6 Replies

2. Shell Programming and Scripting

Output (Paging)

how to get output of a file which is large screen by screen (1 Reply)
Discussion started by: mayur_verma
1 Replies

3. AIX

Paging space

Hi, I have paging size 2048M showed from topas and 10240M showed from "lsps -a", can anyone tell what is the difference? and how to change the PAGING SIZE (showed in topas) to 8192M? Can you please tell in detail step? Thanks! Victor #topas Topas Monitor for host: egsprc01dev ... (10 Replies)
Discussion started by: victorcheung
10 Replies

4. AIX

LV without Paging Space

Hello dear friends, We have VG filevg which consists of 2 PVs when I rechecked the VG there is no Pagingspace LV.. The VG is usually Highly loaded because much reads and writes.. Is this a must to create Paging space on the specified LV? (2 Replies)
Discussion started by: Vit0_Corleone
2 Replies

5. AIX

Paging Rate

Hi Friends, Can you please answer the following questions. 1) What is Paging rate ? 2) How to Calculate Paging rate from the following topas command output? Faults 206 Real,MB 28671 Steals 311 % Comp 71.1 PgspIn 1 % Noncomp 28.8 ... (3 Replies)
Discussion started by: deshaipet
3 Replies

6. Red Hat

How to find paging

Hi, What is the command to know paging in RedHat? vmstat talks about swapping but not paging. Also how much paging should be tolerated in the system and how to reduce paging. Thanks in advance. (1 Reply)
Discussion started by: ssuhaib
1 Replies

7. AIX

paging space

Hello everyone I have a doubt about how many paging space can have in the same disk. lsps -a Page Space Physical Volume Volume Group Size %Used Active Auto Type paging00 hdisk0 rootvg 3072MB 1 yes yes lv hd6 hdisk0 ... (4 Replies)
Discussion started by: lo-lp-kl
4 Replies

8. AIX

Paging space

Hello everyone I have 4g of paging space in my rootvg disk I´m going to reduce them to 1gb in my rootvg disk and add 3gb of paging space on my san disk. My rootvg disk is mirror. My question is I can do this on line ? and I can do with the mirror ? or I need to unmirror first my... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

9. Filesystems, Disks and Memory

Paging and Swapping

Hi Guys: Would like to know how to check system swapping and paging and some theory on how they function. I am an oracle dba and my environment is 8171 on AIX 433. We have a 1GB of RAM on the box and I am educating myself to see how much more SGA can be accommodated on the box and what are the... (2 Replies)
Discussion started by: ST2000
2 Replies

10. UNIX for Dummies Questions & Answers

Paging

Hi all, Is there a paging utility in UNIX, when we can page some one for some condition Best Regards Omran (1 Reply)
Discussion started by: omran
1 Replies
Login or Register to Ask a Question