<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: glance from cron? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433789#M4113</link>
    <description>I asusme you have a reason for wanting non-interactive glance screens rather than measurewear.  If not, then please use measurewear.  No sense taking the additional system load if one product is already doing what you need.&lt;BR /&gt;&lt;BR /&gt;As far as glance through cron, though, realize that cron does not invoke either a terminal or a user environment.  It might simply be an issue of providing the full path to the glance command.  Alternatively, there might be some environmental variables you need to set.  Some troubleshooting steps:&lt;BR /&gt;&lt;BR /&gt;1) make usre you use full pathnames for the glance executable and any logfiles.&lt;BR /&gt;2) test&lt;BR /&gt;3) invoke a complete user environment (source /etc/profile and /root/.profile)&lt;BR /&gt;4) test&lt;BR /&gt;5) set the LINES and COLUMNS terminal variables (I suggest 24 and 80).&lt;BR /&gt;6) test&lt;BR /&gt;&lt;BR /&gt;Remember to check /var/adm/cron/log after each test to see whether a failed return code is indicated.</description>
    <pubDate>Mon, 31 Jul 2000 17:19:05 GMT</pubDate>
    <dc:creator>Alan Riggs</dc:creator>
    <dc:date>2000-07-31T17:19:05Z</dc:date>
    <item>
      <title>glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433787#M4111</link>
      <description>Can anyone tell me how to get glance to run from root's cron.&lt;BR /&gt;It runs okay from the command line and it runs okay inside script&lt;BR /&gt;that is run from the command line.  But, when the script is run from root's cron&lt;BR /&gt;glance produces not output.&lt;BR /&gt;&lt;BR /&gt;What do I need to do to get glance to execute from crom or...&lt;BR /&gt;is there a more efficient method of obtaining physical memory utilization?&lt;BR /&gt;&lt;BR /&gt;Thanx,&lt;BR /&gt;Wayne Jones</description>
      <pubDate>Mon, 31 Jul 2000 17:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433787#M4111</guid>
      <dc:creator>Wayne Jones_2</dc:creator>
      <dc:date>2000-07-31T17:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433788#M4112</link>
      <description>Glance is an interactive tool. Why don't try to get reports from Measureware and PerfView?</description>
      <pubDate>Mon, 31 Jul 2000 17:04:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433788#M4112</guid>
      <dc:creator>Antoanetta Naghiu</dc:creator>
      <dc:date>2000-07-31T17:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433789#M4113</link>
      <description>I asusme you have a reason for wanting non-interactive glance screens rather than measurewear.  If not, then please use measurewear.  No sense taking the additional system load if one product is already doing what you need.&lt;BR /&gt;&lt;BR /&gt;As far as glance through cron, though, realize that cron does not invoke either a terminal or a user environment.  It might simply be an issue of providing the full path to the glance command.  Alternatively, there might be some environmental variables you need to set.  Some troubleshooting steps:&lt;BR /&gt;&lt;BR /&gt;1) make usre you use full pathnames for the glance executable and any logfiles.&lt;BR /&gt;2) test&lt;BR /&gt;3) invoke a complete user environment (source /etc/profile and /root/.profile)&lt;BR /&gt;4) test&lt;BR /&gt;5) set the LINES and COLUMNS terminal variables (I suggest 24 and 80).&lt;BR /&gt;6) test&lt;BR /&gt;&lt;BR /&gt;Remember to check /var/adm/cron/log after each test to see whether a failed return code is indicated.</description>
      <pubDate>Mon, 31 Jul 2000 17:19:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433789#M4113</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-07-31T17:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433790#M4114</link>
      <description>Sorry, I am not a sysadmin.  I am writing this script to monitor the physical memory utilization.  I told the sysadmin that I didn't like using glance, but he could not suggest anything else.  The have been two responses to use measureware.  I talked to the SA and he doesn't know how to do it, neither do I. Any example of how the get physical memory utilization from measureware.</description>
      <pubDate>Mon, 31 Jul 2000 17:44:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433790#M4114</guid>
      <dc:creator>Wayne Jones_2</dc:creator>
      <dc:date>2000-07-31T17:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433791#M4115</link>
      <description>First, check to make sure measurewear is running.  (mwa status)  If so, then you are probably fine.  If not, start it (mwa start) and make sure it starts autimatically at boot time (standard startup script in /sbin/init.d &amp;amp;&amp;amp; /etc/rc.config.d).&lt;BR /&gt;&lt;BR /&gt;With measurewear running, you can extract history reports with readings every 5 minutes (detail) or every hour (summary).  The command you want is "extract".  There is a good man page on the utility, and it has a helpful interactive mode which wil step you through creating a config file for your desired report.  The requirement is to create a file (default /var/opt/perf/reptfile) and specify which parameters you wish to extract from measuewear date.  It seems you want to look at the Global Memory Metrics.&lt;BR /&gt;&lt;BR /&gt;If the interactive extract gives you trouble, you can manually create a report file and acess it as follows:&lt;BR /&gt;&lt;BR /&gt;cd /var/opt/perf&lt;BR /&gt;cp reptfile rept.mem&lt;BR /&gt;vi rept.mem&lt;BR /&gt;(uncomment those metrics you care about -- don't forget date and time)&lt;BR /&gt;extract -xp -G -r rept.mem -f memory_report.asc&lt;BR /&gt;&lt;BR /&gt;That will create a global summary report in ascii format named memory_report.asc&lt;BR /&gt;&lt;BR /&gt;See the man page for other options tpo the command</description>
      <pubDate>Mon, 31 Jul 2000 18:08:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433791#M4115</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-07-31T18:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433792#M4116</link>
      <description>Try the command vmstat.  The value of the fifth field times the size of a virtual page is approximately equal to the amount of free memory as shown by glance or top.  For example, I use a script that sends ITO a message if the amount of free memory falls below 15 meg.&lt;BR /&gt;&lt;BR /&gt;FREEMEM=`vmstat | tail -1 | awk '{print $5 * 4}'`&lt;BR /&gt;&lt;BR /&gt;gives me free memory in Kilobytes</description>
      <pubDate>Mon, 31 Jul 2000 18:25:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433792#M4116</guid>
      <dc:creator>Martha Mueller</dc:creator>
      <dc:date>2000-07-31T18:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433793#M4117</link>
      <description>If you need to get only memory utilization "vmstat" command can help you.&lt;BR /&gt;You can put vmstat in your cron to capture memory utilization.&lt;BR /&gt;eg. vmstat 1 5&lt;BR /&gt;This will capture memory snapshot every 1sec for 5 samples.&lt;BR /&gt;&lt;BR /&gt;You will need perfview software to analyse measureware data.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jul 2000 19:17:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433793#M4117</guid>
      <dc:creator>Deshpande Prashant</dc:creator>
      <dc:date>2000-07-31T19:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433794#M4118</link>
      <description>It is not correct that you need the PerfView software to analyze measurewear date.  The PerfView product (not free) provides a graphical view of/hook into measurewear data.  The extract command, however, works quite nicely to generate ascii files with the same information.  If desired, you can always import the data into your favorite graphing/data modeling application.</description>
      <pubDate>Mon, 31 Jul 2000 19:48:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433794#M4118</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-07-31T19:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433795#M4119</link>
      <description>Hi,&lt;BR /&gt;To get the memory utilization, you have multipe choices:&lt;BR /&gt;&lt;BR /&gt;1. Use the coventional 'sar' utility. Put the following entry in ur root's crontab file. It will creat daily sar file in /var/adm/sa directory. &lt;BR /&gt;00 * * * *      /usr/lib/sa/sa1 900 4 &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;2. If you have Measureware running (check by using perfstat command)&lt;BR /&gt;You can export the raw data collected by measureware into ascii files (using extract utility)and import them into excel to view in tabular columns or to create nice graphs. You can use report files to extract the statistics for only desired metrics.&lt;BR /&gt;&lt;BR /&gt;3. If you have perfview running, you can get nice graphs and it is very much useful/recommended to do online performance analysis of a system. From perfview also, you can export the data into ascii or worksheet files.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Aug 2000 00:39:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433795#M4119</guid>
      <dc:creator>Ramesh Donti</dc:creator>
      <dc:date>2000-08-01T00:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433796#M4120</link>
      <description>It is possible to run glance in adviser only mode from cron as root. However if all you want is the %util of memory, I'd run sar, vmstat, or some other low overhead utility. MeasureWare will give you the info every 5 minutes, but if you don't own measureware it's not worth buying just for that.</description>
      <pubDate>Tue, 01 Aug 2000 02:25:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433796#M4120</guid>
      <dc:creator>Jim Welch</dc:creator>
      <dc:date>2000-08-01T02:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433797#M4121</link>
      <description>Well, there are a few ways to handle this.  They all make use of a pseudo-terminal.&lt;BR /&gt;&lt;BR /&gt;1) how are your C programing skills?&lt;BR /&gt;&lt;BR /&gt;open a pseudo-terminal (/dev/ptym/clone,ptsname,etc) and use glance with your pseudo-terminal file descriptors.&lt;BR /&gt;&lt;BR /&gt;2) Don Libes has written a generic scripting Tcl-based toolkit for automating interactive programs, called expect.  it creates pseudo-terminals and does co-processing and would do this easily.  But you have to install Tcl and Expect on your system to use it. &lt;BR /&gt;&lt;BR /&gt;3) pick a pseudo-terminal capable utility and wrap some co-processing around it&lt;BR /&gt;such as this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;TERM=hp&lt;BR /&gt;export TERM &lt;BR /&gt;&lt;BR /&gt;iterations=2&lt;BR /&gt;interval=5&lt;BR /&gt;command=m&lt;BR /&gt;outfile=/tmp/glance.test&lt;BR /&gt;&lt;BR /&gt;PATH=$PATH:/opt/perf/bin&lt;BR /&gt;&lt;BR /&gt;# you'll need to setup a .rhosts file to allow login without a password&lt;BR /&gt;# or you can add lines to input the userid and password if you like&lt;BR /&gt;#&lt;BR /&gt;rlogin camintd1 |&amp;amp;&lt;BR /&gt;exec 3&amp;lt;&amp;amp;p&lt;BR /&gt;exec 4&amp;gt;&amp;amp;p&lt;BR /&gt;&lt;BR /&gt;# send commands to your rlogin process&lt;BR /&gt;# &lt;BR /&gt;echo "glance -f $outfile -j $interval -iterations $iterations -m" &amp;gt;&amp;amp;4&lt;BR /&gt;&lt;BR /&gt;# sleep till your glance processes has finished&lt;BR /&gt;#&lt;BR /&gt;sleep $(( ($iterations + 2)*interval ))&lt;BR /&gt;&lt;BR /&gt;# exit from your rlogin session&lt;BR /&gt;#&lt;BR /&gt;echo "exit;exit" &amp;gt;&amp;amp;4&lt;BR /&gt;&lt;BR /&gt;# print everything written out from the rlogin session&lt;BR /&gt;# mostly crap because there isn't a valid terminal &lt;BR /&gt;# I suppose you could add some stty commands&lt;BR /&gt;# if you wanted and other stuff, but your desired&lt;BR /&gt;# output is in the file given in the glance command.&lt;BR /&gt;# you'll have to do some editing for form feeds and&lt;BR /&gt;# such&lt;BR /&gt;#&lt;BR /&gt;while read -ru3 line&lt;BR /&gt;do&lt;BR /&gt; print -r -- $line &lt;BR /&gt;done &amp;gt; /dev/null&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Tue, 01 Aug 2000 07:40:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433797#M4121</guid>
      <dc:creator>curt larson</dc:creator>
      <dc:date>2000-08-01T07:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433798#M4122</link>
      <description>You don't need to use a pseudo terminal to run glance in adviser only mode (at least not in the current version). Just use the &lt;BR /&gt;-adviser_only option. I've setup glance to run from cron and from system startup scripts with no problems to collect data over long intervals and either save it to ascii files or feed it into measuresware using dsi. Without the -adviser_only switch, glance will try to initialize the terminal device and will fail if it doesn't exist.</description>
      <pubDate>Tue, 01 Aug 2000 21:26:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433798#M4122</guid>
      <dc:creator>Jim Welch</dc:creator>
      <dc:date>2000-08-01T21:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: glance from cron?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433799#M4123</link>
      <description>Jim,&lt;BR /&gt;&lt;BR /&gt;Happen to have an example of a cron script that works?&lt;BR /&gt;&lt;BR /&gt;using the -advisor_only option does not result in a "can not initialize terminal" error.  But I'm unable view any information.  Using the -f file option and redirecting stdout have only resulted in empty files for me.  Which, of course, should be the case being the adviser thesholds haven't been reached to produce any output.&lt;BR /&gt;&lt;BR /&gt;So, where is the data being logged?</description>
      <pubDate>Tue, 01 Aug 2000 23:48:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-from-cron/m-p/2433799#M4123</guid>
      <dc:creator>curt larson</dc:creator>
      <dc:date>2000-08-01T23:48:37Z</dc:date>
    </item>
  </channel>
</rss>

