1833519 Members
2447 Online
110061 Solutions
New Discussion

Re: glance

 
Scott D. Allen
Regular Advisor

glance

I have a 10.20 HPUX box and I'm trying to do some I/O monitoring on a FS. I'm looking at setting up a cronjob that will grab some glance data and then do some fun stuff and print out a nice, simple report for me based on some criteria. The problem is, I'm having a hard time setting up the glance data collection.

How can I setup glance to print out the filesystem IO for a particular filesystem every 15 seconds for 10 minutes to a file from the command line? I'm trying:

glance -j 15 -interations 40 -i -f logfile -maxpages 500 > /dev/null 2>&1

this isn't just spitting out 40 screen shots of the glance FS IO screen to the file.....what am i missing?

Is there a more direct command to use? If so, please advise. Thanks.

--Scott (sallen@infomanage.net)
"Sometimes the devil you know is better than the devil you don't know."
11 REPLIES 11
Simon Waters_1
Occasional Advisor

Re: glance

If the filesystem is on its own disks you could use 'sar' to collect statistics.

Crude but simple.

sar -d 15 40 - shows all disk I/O for 10 minutes - problem is if the filesystem shares disks as you can not distinguish.
Scott D. Allen
Regular Advisor

Re: glance

Yeah, unfortunately this filesystem is on a RAID array which is shared by 4 other file systems. I'm trying to establish if we have any I/O bottlenecks for this particular DB tablespace.

--Scott
"Sometimes the devil you know is better than the devil you don't know."
Alan Riggs
Honored Contributor

Re: glance

Using glance to pull this kind of data is a prety ugly solution, actually. Are you running measurewear? It pulls data from the same collector (scopeux, which pulls from midaemon) and is designed to gather data for historical reports.

You can extract ascii file reports of disk disk IO with the following procedure:

cp /var/opt/perf/reptfile myfile
vi myfile
(comment out any measures you do not want reported. * is the comment character for this file. You will probably care most about the Logical Vilume Disk Metrics and/or the Disk Device Disk Metrics)
extract the information you want with something like:

extract -dz -r myrept -xp -b today-1

(the above will extract detail data for disk devices and logical volumes, listing all fields uncommented in myrept, since yesterday. Man extract will give you details on adjusting this to your needs. Use summary data -DZ if you only want a data line every hour.)

There is also a graphical interface into measureware called perfview.
Anthony Goonetilleke
Esteemed Contributor

Re: glance

What you need is a combination of measureware and Perfview (I think its called Advantage plus or something similar now)

This wil allow you to store all types of data and then graph any period/intervals that you wish.
Minimum effort maximum output!
Scott D. Allen
Regular Advisor

Re: glance

Alan, Thanks! That's more like what I was looking for. I tried iostat, but glance gives filesystem data which is nice, but if you run it from the command line it always give you a full screen shot.....irritating.

Anyways, in the extract command you used the reptfile option....did you mean myfile (from the previous step)? When I tried it with the file that I had edited it returned an error. Maybe I need to read the man pages a little more.

--Scott
"Sometimes the devil you know is better than the devil you don't know."
Scott D. Allen
Regular Advisor

Re: glance

Actually, my error, it looks like there are no log files in the /var/opt/perf/datafiles directory which, according to the man page, is where extract is trying to pull infomation from. Correct? Do I have to start an agent to collect data? glance is producing information, but it doesn't look like the measureware has access to this in the current configuration. Please advise. Thanks.

--Scott
"Sometimes the devil you know is better than the devil you don't know."
Jim Welch
Respected Contributor

Re: glance

If you have MeasureWare, then that may be a better tool to report the information you are looking for, although it only logs disk data every 5 minutes, so the smallest interval that you can report on will be 5 minutes.
I tried your glance command on an 11.0 box running glanceplus c.02.40 and it worked from the command line. I didn't try it from cron. I believe that there may be a problem printing the standard screens to a file from cron since glance tries to determine that type of terminal you have when it starts up.
(Plus, this will only capture the 1st screen, so if your IO By File System is more than one page the rest are lost.)
If you really want data at 15 second intervals, then you can write an adviser script that prints the particular metrics you want to capture and run glance from cron in adviser mode (-adviser_only). For example, to capture the information that shows up on the IO BY FILE SYSTEM screen, you could create an adviser script in a file (say iobyfs.adviser) such as the one I've attached and run glance from cron like:
create a script (iobyfs.sh) in /tmp containing:
#!/usr/bin/ksh
/opt/perf/bin/glance -j 15 -iterations 40
-adviser_only -syntax /tmp/iobyfs.adviser >> /tmp/iobyfs.out

make the script executable and create a cron entry like:

00 * * * * /tmp/iobyfs.sh 1>/dev/null 2>&1

then monitor the output file and make any changes you like for your application.
NOTE: The output file will not look exactly like the glance screen since there is no way to truncate the rather long fields for the directory name and lvol name but you should be able to parse the output as needed.
Also, the first interval is usually a short one, so you can check the interval and ignore any data where the interval is significantly shorter than that indicated by the -j switch.
Any sufficiently advanced technology is indistinguishable from Magic - Arthur C. Clarke
Scott D. Allen
Regular Advisor

Re: glance

Thanks to all. Jim's response seemed to get me a lot closer.

When I run the shell script I get a blank output. I created the adviser file, same as the attachment you included and created the shell script, but when I ran it and redirected out to a file it just had the "Welcome to GlancePlus" message and nothing else. The script/command didn't produce any errors, just that.

Did we miss something?

--Scott
"Sometimes the devil you know is better than the devil you don't know."
Scott D. Allen
Regular Advisor

Re: glance

My mistake gang!

I was looking in the wrong output file! That's it, now I just need to parse what I want from that file. Thanks Jim.

--Scott
"Sometimes the devil you know is better than the devil you don't know."
Alan Riggs
Honored Contributor

Re: glance

I see that you are happy with the glance solution. If you wish to investigate measurewaer, then you can do:

man mwa
man scopeux
man midaemon

The product is cycled with:

/opt/perf/bin/mwa start
/opt/perf/bin/mwa stop

One note: mwa can cause swinstall/swremove to hang. It is recommended to stop mwa before doing any swinstall and restart it after the install is complete.
Jim Welch
Respected Contributor

Re: glance

There was a problem with swinstall hanging on HP-UX 10.20 if midaemon was running (midaemon runs when either glance, gpm, or measureware is running). There was a patch for SD-UX (PHSS_11482). The current version of the patch is PHSS_20209. If I remember correctly swinstall only seemed to hang during interactive installs, so you could install the patch from the command line if necessary.
In addition to the man pages, the documentatioin for MeasureWare/UX C.02.40 is in /opt/perf/paperdocs/mwa/C/
mwainst.pdf is the installation guide
mwausers.pdf is the user's guide
metrics.pdf is the metrics dictionary
If you don't have Adobe Acrobat Reader on
your workstation, you can ftp these files to
a pc with Acrobat Reader and easily read or print these documents to any supported windows printer.
PerfView/UX C.02.00 has an online help system including a short tutorial in html format in /opt/perf/help/pv/C/tutorial/start_tutorial.html
Any sufficiently advanced technology is indistinguishable from Magic - Arthur C. Clarke