Some of us have asked me the alternative way to not to run SWAT in target system and leverage on data from OS command i..e, IOSTAT. This is because they might not be confident enough to install SWAT program to production system. It's common to think of that issue (better play safe until you are sure).

For Solaris platform, iostat command is part of Solaris, therefore, it's no harm to run it (in cron job) and you can control how often of data gathering which can manage overhead in the system. For example, capture data every 30 seconds or 60 seconds. Larger interval mean less raw data to be generated and less overhead.

Swat will accommodate you by allowing you to import iostat data into SWAT.  IOSTAT data that can be imported must be created using the minimum of the following options: iostat –xdn. For example,

 # iostat -xdn 60 1440 > /tmp/iostat.txt

 Above command mean use iostat to capture I/O data every 60 seconds and run it for 1 days. The result will be piped to iostat.txt under /tmp directory.

The  'c', 'z', 'p' 'X' options in iostat may be used, but the output of these options will be ignored. The 'M' option is honored and MB per second is interpreted instead of KB. Also, any device name starting with 'm' will be assumed to be an SVM volume and will be ignored.  Devices with less than a total of 100 total I/O's will also be ignored. Each reporting interval will be treated as a 10 second interval starting January 1st of the current year. To get accurate timestamps the complete Swat tool must be used. If iostat (using the –n’ parameter) is unable to translate a Kstat instance like ssdxx,yy to a proper /dev/rdsk/ device name something is wrong with Solaris and we recommend you file a bug against Solaris. Performance data for these devices will be reported under logical controller ‘undefined’, so make sure you always check to know how much device activity you are missing.

After you have completed data capturing using iostat, now you can import it to SWAT. See the step from GUI below.

(1) Launch SWAT and choose SPM option

(2) Select option to import iostat data

(3) Select the import file (i.e., iostat.xt at /tmp directory for this case)


(4) Tell SWAT, what's the period of your captured iostat data

(5) You got it!


EASY?

Please note that this method can only import and show data in graphical format (of course better than CLI by iostat itself!). You can not generate replay file to perform simulation by VDBENCH. Well, you can think that this is the starting point. If you satisfied the result and want to go further (more in depth). Then using SWAT to capture is the way to go. There is something we can do to make sure it's safe enough. For example, you might try from development server whereas you almost have similar OS, patch,etc. I usually go by importing iostat data approach first and if customer is ok and want to go further then I can run SWAT in test system and finally on production system.

For those of you who want to import iostat from other UNIX platform, it seem we can do it today from Linux and AIX. I'm sure AIX can be done since I was part of beta tester of this tool who try it out in my customer AIX environment and it work great!.

Yet to try on Linux, can you?.

Lastly, need to give credit to Henk  (thanks!) who listen to my feedback about non-Sun platform requirement and come out with beta code to test with my AIX environment.




Comments:

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by Paisit