Use glance as a cron script

On a HP-UX 11.31 server I try to make a script that can launch glance for x iterations and the output to be stored in a file. I want to be able to launch the script via crontab.

glance manual says that in order to run glance in the background with no terminal screen displays I should use -adviser_only & -iterations options.
I tried this:

/opt/perf/bin/glance -f /tmp/glance/glance.20160613  iterations 2 advisor_only

Issues:

  • the job does not run in background, it displays everything on the terminal
  • glance doesn;t stop automatically after 2 iterations.

indeed it sends the output to the /tmp/glance/glance.20160613 file and the file keeps the data after I stop glance.

What am I doing wrong?

For metrics in past i use this :
How to perform a First Pass Performance Analysis using Measureware extract command - Wiki-UX.info

As for your problems, are you sure you inputed -iterations -adviser_only ,
I see no dash in your current command and looks like advisor_only should be adviser_only

Hope that helps
Best regards
Peasant.

thanks for the reply. I used this syntax also and got these results:

dexter:~# /opt/perf/bin/glance -f /tmp/glance/glance.20160613  -iterations 2 -adviser_only
MI: Wed Jun 15 16:36:48 2016
WARNING: dlsym: Unknown symbol lvml_get_vginfo_ext. LVM library should be updated.
MI: Wed Jun 15 16:36:48 2016
WARNING: lvml_get_vginfo failed for VG /dev/vg_mdData3: Error 3.
MI: Wed Jun 15 16:36:48 2016
.........
....... couple of warning messages ........
..........
MI: Wed Jun 15 16:36:48 2016
WARNING: lvml_get_vginfo failed for VG /dev/vg_sasbu4: Error 3.
dexter:~#
dexter:~# cat /tmp/glance/glance.20160613
dexter:~#

so the /tmp/glance/glance.20160613 is empty