Script to check the memory usage in AIX


 
Thread Tools Search this Thread
Operating Systems AIX Script to check the memory usage in AIX
# 1  
Old 05-16-2013
Script to check the memory usage in AIX

Hello Everyone,

I'm looking for a efficient script that monitors the memory usage on AIX and send email alerts when it reaches certain point.

Q) need to get alerts, when the memory usage exceed 90% on AIX?

or

Q) Need to get alerts when available free Memory is 1G or 10% etc

Any idea is highly appreciated...and helpful to me

Thanks,
Mahijeet
# 2  
Old 05-16-2013
A full-featured monitoring tool would be the best approach, IMO.

A local monitoring script would be useless if the server reaches 100% memory usage and it's unable to monitor itself.

Take a look at the options offered by svmon. Maybe they're good enough for your particular needs.
This User Gave Thanks to verdepollo For This Post:
# 3  
Old 05-16-2013
Quote:
Originally Posted by System Admin 77
Q) need to get alerts, when the memory usage exceed 90% on AIX?
Q) Need to get alerts when available free Memory is 1G or 10% etc
If you search this board for "memory" and "monitor(ing)" you will find dozens of threads with always th same outcome: it is impossible in a strict sense to do what you want. So, for the umpteenth time here, the reasons in short:

In AIX memory is managed by the kernel. Basically the memory not used for running programs is given to the filecache to speed disk I/O. If another program would start the used memory would not change, but this file cache would be diminished by the amount necessary for the program. On the other hand stopping a running program would not enlarge available memory because the kernel would give the regained memory to the file cache as soon as it becomes freed.

This process is being controlled by some kernel tuning parameters, i.e. "maxperm", "minperm", "maxclient", etc.. Have a look at the man page of "vmo" to get the details.

A common, reasonable tuning (taken from Jaqui Lynchs paper on tuning AIX 5.3) would be:

Code:
vmo -p -o minperm%=5
vmo -p -o minfree=960
vmo -p -o maxfree=1088
vmo -p -o lru_file_repage=0
vmo -p -o lru_poll_interval=10

which would in turn mean you never see numbers below 95% (100%-minperm%) memory used on todays majority of real-world systems.

There will surely come people to this thread and suggest this or that monitoring tool (mostly it will be "nmon"), but it won't matter which tool you use to get a meaningless number from the system - the number will be meaningless anyway, because: see above.

What you can do (and i suggest you do this, because this is proactive maintenance of a system) is: monitor the ratio of installed memory and the amount necessary for programs. There is the command

Code:
svmon -G

which will tell you that. It has been described oftenly here, for instance:this thread or this thread.

This will not "raise an alert", because these measurements are statistical in nature. You will have to maintain long-term statistics about (increasing) memory usage but this will make excellent base data over time to assess how the memory consumption of the system develops and which upgrades might be necessary when.

It is not very popular these times, but for the occasional(!) extraordinary memory need it makes sense to configure swap space: swapping is to be avoided like the plague if it happens regularly, but once in a time there is no problem with it. It will slow down the system, so you will have to decide how much swapping is allowable (for real-time systems the answer might be "0", while for other systems it might be considerably higher). Monitor with a "vmstat" to learn about what your system does over time. What you can learn from its output is discussed here and here.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 4  
Old 05-22-2013
Script to check the memory usage in AIX

Thanks much bakunin & verdepollo. Appreciate your input. sorry for the late reply.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How can I check actual memory usage each Process?

I can't check actual memory usage in the Redhat 5.5... The used memory is 14214 Mb of Total 15919 by Free -m command. I sum the RSS value on PS aux command result and the value is 5428.66Mb. Yes It's quite different actual usage memory and RSS value. So I added Shared memory value... (5 Replies)
Discussion started by: tom8254
5 Replies

2. Solaris

Memory Usage check

Hello Friends, I need to check memory usage & availability before I could run a program if there is enough memory is left or not, so how could i achieve this? Which command output i should rely on? I have diplayed outputs of SAR, VMstat and PRstat commands below, But how could i check memory... (8 Replies)
Discussion started by: EAGL€
8 Replies

3. AIX

Memory usage in AIX server

Hi All, I have some questions regarding the performance, MEMORY/ Virtual Memory (paging /swap space) Please see the nmon-MEMORY stats from my AIX LPAR. 24 GB --> RAM 3456 MB --> Paging Space │ Memory ─────────────────────────────────────────────────────────────────────── │... (8 Replies)
Discussion started by: System Admin 77
8 Replies

4. Linux

how to check memory usage ?

hello, I have purchased VPS from one webhosting company. VPS comes with Virtuozzo power panel. It has 512MB gurranted RAM and dynamic RAM 2048 MB. I have hosted single domain with 50MB database and wordpress installation. But I am getting resource alerts. It goes sometime in yellow... (8 Replies)
Discussion started by: mrugesh78
8 Replies

5. AIX

AIX 5.3 Physical Memory usage

Hi, I have AIX 5.3TL8 two node cluster using HACMP and have 10g database using RAW devices. I am seeing gradual increase in comp% memory everyday and it reaches 100% and evicts the node, we had 4 evictions in 40days. I am pasting vmstat and vmo output, anyone seen this issue? ... (5 Replies)
Discussion started by: navin7386
5 Replies

6. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

7. AIX

Memory usage on AIX

How to check the memory usage on AIX by various processes? (1 Reply)
Discussion started by: aajmani
1 Replies

8. Programming

how to use ioctl to check out memory usage

Hi all, I tried to output memory usage information while the process is executing at a particular time. I found out some people suggesting calling the ioctl. I followed it and wrote a test example: #include <unistd.h> #include <stdlib.h> #include <iostream.h> #include <fcntl.h> #include... (2 Replies)
Discussion started by: lanchen
2 Replies

9. AIX

Memory Usage in AIX

Hi All, I have a question, can you guys please help me by giving your valuable suggestons: I am using AIX 5L, running oracle 7 version. I need to increase the oracle memory to 40 MB more. Currently Oracle occupies 260M. I wanted to know whether I can increase the memory without any problem.... (3 Replies)
Discussion started by: kollam68
3 Replies

10. UNIX for Advanced & Expert Users

Memory Usage in AIX

Hi All, I have a question, can you guys please help me by giving your valuable suggestons: I am using AIX 5L, running oracle 7 version. I need to increase the oracle memory to 40 MB more. Currently Oracle occupies 260M. I wanted to know whether I can increase the memory without any problem.... (1 Reply)
Discussion started by: kollam68
1 Replies
Login or Register to Ask a Question