AIX CPU performance script ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting AIX CPU performance script ?
# 1  
Old 11-06-2012
IBM AIX CPU performance script ?

I want to write a shell script which will print AIX
CPU utilization
memory utilization

every 5 mins redirect to file. How do i do it? Please advise.
Which commands I should use?

Last edited by zaxxon; 11-06-2012 at 07:47 AM.. Reason: font
# 2  
Old 11-06-2012
Please do not make the font any smaller as it is already, thanks.

Check root's crontab if there is already an entry for sa1 and sa2. If there is, you will find something in /var/adm/sa. If not, read up about those 2 tools (man page or IBM Info Center for example) and put entries into root's crontab accordingly.

nmon is also very useful to setup monitoring.
This User Gave Thanks to zaxxon For This Post:
# 3  
Old 11-07-2012
Thanks for the reply.

I added below entries in the cron
Code:
0 8-17 * * 1-5 /usr/lib/sa/sa1 1200 3 &
5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 3600 -ubcwyaqvm &

But not found any output in /usr/adm/sa folder. So not sure if it is working.
Can I use below commands? Will that give accurate result ? Please advise

1.CPU utilization
Code:
iostat 
This command will give 
avg-cpu: % user % sys % idle % iowait physc % entc
I will add  CPU utilized as   % user + % sys


2. Memory
Code:
svmon -G -O unit=GB

will consider inuse memory.

mnon - Not sure on how to redirect only CPU utilization & memory to file.

Last edited by Neo; 11-07-2012 at 04:54 AM.. Reason: code tags, please
# 4  
Old 11-07-2012
Are you sure you know what you want to measure at all?

"CPU utilization" and "memory utilization" is about as significant as the football results plus the lottery numbers of last week - summed up to a single number. You need the details and you need to define what you want to know before you even start to monitor. Otherwise you only get a bunch of meaningless numbers.

There is no such thing as a single number to describe any of the above, like there is no single number to describe the weather. There is temperature, air pressure, humidity, wind velocity, etc., but if you add all that up and arrive at "3156" would you know from this number what the weather is like? Perhaps not.

For CPU utilization, depending on what you want to know, the numbers of interest might be: the % of the time the CPU spends working on system calls, user programs, experiencing I/O-wait or idle times, further the percentage of "entitled capacity consumed" (the number of processor resources available to the LPAR versus the number of used real processor time) and maybe some numbers of minor significance too.

For memory utilization this might be: swap file utilization, size of computational memory, number of revolutions of the clock hand, number of pages scanned, file cache hit/miss ratio, size of file cache, some I/O-related numbers in "vmstat -v" and perhaps some other numbers, depending on what your system does and what is likely to be a bottleneck.

Btw.:
Quote:
Originally Posted by vegasluxor
I added below entries in the cron
Code:
0 8-17 * * 1-5 /usr/lib/sa/sa1 1200 3 &
5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 3600 -ubcwyaqvm &

But not found any output in /usr/adm/sa folder.
This is probably because you used cron to start background processes. They are probably still running. Remove the trailing "&" and redirect any possible output.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

CPU performance

In my oracle db server we have 15 cores (power8). The output of the vmstat is as below. System configuration: lcpu=128 mem=208800MB ent=16.00 kthr memory page faults cpu time -----------... (18 Replies)
Discussion started by: powerAIX
18 Replies

2. Solaris

Understanding & Monitoring CPU performance (Load vs SAR)

Hi all, Been reading a lot of the cpu load and its "analogy of it to car traffic path of expressway" From wiki Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux also includes processes in uninterruptible sleep states... (13 Replies)
Discussion started by: javanoob
13 Replies

3. HP-UX

Performance - CPU spiking

We have a DB server which is constantly utilised above 95% above. This is becoming nuisance when the monitoring team frequently calls to check on it. Frankly I do not know what to tweak or even interpret the outputs. I noticed constant 30 to 60% in wio column of the cpu utilisation. There... (1 Reply)
Discussion started by: sundar63
1 Replies

4. SCO

CPU Performance Problems on VMWARE

hi We have migrated SCO 5.0.6 into ESX4, but the VM eats 100% of the virtual CPU. Here is top print from the SCO VM: last pid: 16773; load averages: 1.68, 1.25, 0.98 02:08:41 79 processes: 75 sleeping, 2 running, 1 zombie, 1 onproc CPU states: 0.0% idle, 17.0% user,... (7 Replies)
Discussion started by: ccc
7 Replies

5. HP-UX

Bad performance but Low CPU loading?

There might be some problem with my server, because every morning at 7, it's performance become bad with no DB extra deadlock. But I just couldn't figure it out. Please give me some advise, thanks a lot... According to the CPU performace chart, Daily CPU loading Maximum: 42 %, Average:36%. ... (8 Replies)
Discussion started by: GreenShery
8 Replies

6. Solaris

In Solaris Zones Dedicated-Cpu Performance?

Hi All, While creating zone we will mention min and max cpu cores, like add dedicated-cpu set ncpus=NUM_CPUS_MIN-NUM_CPUS_MAX end Ques1: Suppose thing that non global zone uses only minimum cores at particular time What the other cores will do, Will it shared to global zone? Ques:2... (1 Reply)
Discussion started by: vijaysachin
1 Replies

7. AIX

Performance issue in AIX 5.3

Is there is any way to increase the CPU utilization of a Embedded SQL program in AIX 5.3 .. for performance purpose. (0 Replies)
Discussion started by: Gyanendra Awast
0 Replies

8. AIX

Performance Problem - High CPU utilization

Hello everybody. I have a problem with my AIX 5.3. Recently my unix shows a high cpu utilization with sar or topas. I need to find what I have to do to solve this problem, in fact, I don't know what is my problem. I had the same problem with another AIX 5.3 running the same... (2 Replies)
Discussion started by: wilder.mellotto
2 Replies

9. UNIX for Dummies Questions & Answers

AIX performance

Hiya all, I am a newbie sysadmin to AIX, i have worked on HPUX for 3 years. I have started a new role with in an IBM house and because there is me and one other there are a couple of issues I cannot work out: We havehad a production server slowing down processing batch jbs over the past... (6 Replies)
Discussion started by: chlawren
6 Replies
Login or Register to Ask a Question