If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Watch cpu, disk and network ? how to ??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-22-11, 07:57
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Watch cpu, disk and network ? how to ??

Experts,

I need to monitor cpu disk and network for few db2 V8.2 and db2 V9.1 servers on AIX 5.3.
This has to be monitored for a week to capture peak hour stats.

Can someone help me with any commands/scripts for this.

Thanks

DBFinder
Reply With Quote
  #2 (permalink)  
Old 08-22-11, 10:13
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Reply With Quote
  #3 (permalink)  
Old 08-22-11, 11:37
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks,

I will try this.
Reply With Quote
  #4 (permalink)  
Old 08-22-11, 11:59
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
There's another utility, sar, which may already be installed.
Reply With Quote
  #5 (permalink)  
Old 08-22-11, 13:17
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Well, I do not have permission to sar.

I can use nmon to log the info.

Can some one help me narrow down the output for use : only I need disk, cpu, network and memory utilization metrics


Thanks
Reply With Quote
  #6 (permalink)  
Old 08-22-11, 17:41
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
You can also use:

memory/cpu/disk:
vmstat -Itw 2 4
iostat -DlT 2 4

Change interval/count based on your needs.


network:
netstat
Reply With Quote
  #7 (permalink)  
Old 08-22-11, 19:20
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks Bella,

I struggled with these two commands, was unable to figure out switches.
I will try this @work and let you know.


Regards
Reply With Quote
  #8 (permalink)  
Old 08-22-11, 20:08
kitaman kitaman is offline
Papabi's friend
 
Join Date: Sep 2009
Location: Ontario
Posts: 626
If sar is installed, it is usually used via cron to capture data every 20 minutes, and log each snapshot to a daily file, the daily files are overwritten the following month. The files are usually named sar01 thru sar31 for the printable version, and sa01 through sa31 for data only versions. On SCO systems (sorry I don't use AIX) these files are stored in /usr/adm/sa and have permissions of 0600, and are owned by root. Presumably all you need is read access to these files.
Reply With Quote
  #9 (permalink)  
Old 09-11-11, 08:32
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Hey Kitaman,

I know that sar is installed. But I could not find sar output files.

Can you help me with the "sar command line" and its "output" that really is useful watching system activities for monitoring purposes.

Since I did not use this so far, I would be able to request the access if that appeals to the ITAccess team.

That will be a great help !

Thanks
DBFinder
Reply With Quote
  #10 (permalink)  
Old 09-11-11, 09:52
kitaman kitaman is offline
Papabi's friend
 
Join Date: Sep 2009
Location: Ontario
Posts: 626
Here is the man page for sar sar(ADM)
You should also read System activity reporting

The attachment is the output produced by a machine with about 50 active users
On SCO systems, the data collection is implemented via two cron jobs.
user sys
Code:
# The sys crontab should be used to do performance collection. See cron   
# and performance manual pages for details on startup.                    
#                                                                         
0 * * * 0-6 /usr/lib/sa/sa1                                               
20,40 8-17 * * 1-5 /usr/lib/sa/sa1
and root
Code:
5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A
Attached Files
File Type: txt sar08.txt (107.3 KB, 12 views)

Last edited by kitaman; 09-11-11 at 10:07.
Reply With Quote
  #11 (permalink)  
Old 09-11-11, 14:46
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks alot,

Pretty much like my own systems (home lab).
But my employer has disabled all cron jobs.
I could not find any sar files, binary or ascii.

May be some how been hidden from non root users.

DBFinder

Last edited by DBFinder; 09-11-11 at 14:52.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On