- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: glance from cron?
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 10:00 AM
07-31-2000 10:00 AM
glance from cron?
It runs okay from the command line and it runs okay inside script
that is run from the command line. But, when the script is run from root's cron
glance produces not output.
What do I need to do to get glance to execute from crom or...
is there a more efficient method of obtaining physical memory utilization?
Thanx,
Wayne Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 10:04 AM
07-31-2000 10:04 AM
Re: glance from cron?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 10:19 AM
07-31-2000 10:19 AM
Re: glance from cron?
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:
1) make usre you use full pathnames for the glance executable and any logfiles.
2) test
3) invoke a complete user environment (source /etc/profile and /root/.profile)
4) test
5) set the LINES and COLUMNS terminal variables (I suggest 24 and 80).
6) test
Remember to check /var/adm/cron/log after each test to see whether a failed return code is indicated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 10:44 AM
07-31-2000 10:44 AM
Re: glance from cron?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 11:08 AM
07-31-2000 11:08 AM
Re: glance from cron?
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.
If the interactive extract gives you trouble, you can manually create a report file and acess it as follows:
cd /var/opt/perf
cp reptfile rept.mem
vi rept.mem
(uncomment those metrics you care about -- don't forget date and time)
extract -xp -G -r rept.mem -f memory_report.asc
That will create a global summary report in ascii format named memory_report.asc
See the man page for other options tpo the command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 11:25 AM
07-31-2000 11:25 AM
Re: glance from cron?
FREEMEM=`vmstat | tail -1 | awk '{print $5 * 4}'`
gives me free memory in Kilobytes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 12:17 PM
07-31-2000 12:17 PM
Re: glance from cron?
You can put vmstat in your cron to capture memory utilization.
eg. vmstat 1 5
This will capture memory snapshot every 1sec for 5 samples.
You will need perfview software to analyse measureware data.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 12:48 PM
07-31-2000 12:48 PM
Re: glance from cron?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 05:39 PM
07-31-2000 05:39 PM
Re: glance from cron?
To get the memory utilization, you have multipe choices:
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.
00 * * * * /usr/lib/sa/sa1 900 4 > /dev/null
2. If you have Measureware running (check by using perfstat command)
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2000 07:25 PM
07-31-2000 07:25 PM
Re: glance from cron?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2000 12:40 AM
08-01-2000 12:40 AM
Re: glance from cron?
1) how are your C programing skills?
open a pseudo-terminal (/dev/ptym/clone,ptsname,etc) and use glance with your pseudo-terminal file descriptors.
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.
3) pick a pseudo-terminal capable utility and wrap some co-processing around it
such as this:
#!/usr/bin/ksh
TERM=hp
export TERM
iterations=2
interval=5
command=m
outfile=/tmp/glance.test
PATH=$PATH:/opt/perf/bin
# you'll need to setup a .rhosts file to allow login without a password
# or you can add lines to input the userid and password if you like
#
rlogin camintd1 |&
exec 3<&p
exec 4>&p
# send commands to your rlogin process
#
echo "glance -f $outfile -j $interval -iterations $iterations -m" >&4
# sleep till your glance processes has finished
#
sleep $(( ($iterations + 2)*interval ))
# exit from your rlogin session
#
echo "exit;exit" >&4
# print everything written out from the rlogin session
# mostly crap because there isn't a valid terminal
# I suppose you could add some stty commands
# if you wanted and other stuff, but your desired
# output is in the file given in the glance command.
# you'll have to do some editing for form feeds and
# such
#
while read -ru3 line
do
print -r -- $line
done > /dev/null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2000 02:26 PM
08-01-2000 02:26 PM
Re: glance from cron?
-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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2000 04:48 PM
08-01-2000 04:48 PM
Re: glance from cron?
Happen to have an example of a cron script that works?
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.
So, where is the data being logged?