Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Sammy_2 Absent Member.
Absent Member.
761 views

glance error:Unable to initialize terminal

Jump to solution
Trying to run the follwing script from cron.
glance.sh
==================cut=================
#!/usr/bin/ksh
export TERM=hp
/opt/perf/bin/glance -j 3 -adviser_off -f glance.out -iterations 3
====================cut======================

And Gives me the following errors as mentioned below. How can I run the script from the cron
or with nohup and send the output to a file for evaluating later ?

===================== GlancePlus Fatal Error =====================
Version: GlancePlus C.02.40.00
User : root Date: Wed Jan 29 15:47:01
File : /crm/gp/source/glance/terminal.c Line: 150
System : spell B.11.00 9000/800

Unable to initialize terminal.
stdin is not a terminal device.
===============================================

===================== GlancePlus Non-Fatal Error =====================
Version: GlancePlus C.02.40.00
User : root Date: Wed Jan 29 15:47:02
File : /crm/gp/source/glance/glance.c Line: 978
System : spell B.11.00 9000/800

Unable to perform functions on devices.
===========================================
good judgement comes from experience and experience comes from bad judgement.
0 Likes
1 Solution

Accepted Solutions
Highlighted
Contributor.. Bill Hassell Contributor..
Contributor..

Re: glance error:Unable to initialize terminal

Jump to solution
You need the option: -adviser_only
since Glance is expecting to see a terminal and not an output file.


Bill Hassell, sysadmin
5 Replies
Highlighted
Contributor.. Bill Hassell Contributor..
Contributor..

Re: glance error:Unable to initialize terminal

Jump to solution
You need the option: -adviser_only
since Glance is expecting to see a terminal and not an output file.


Bill Hassell, sysadmin
Dave La Mar Absent Member.
Absent Member.

Re: glance error:Unable to initialize terminal

Jump to solution
Bill is correct.
this is the command line we use -
/opt/perf/bin/glance -adviser_only -syntax $SYNTAX_FILE -j 5 -iterations 2

Where $SYNTAX_FILE has the metrix you desire.

If needed, I will forward the metrix we are using.

Best of luck.

dl
"I'm not dumb. I just have a command of thoroughly useless information."
0 Likes
Mladen Despic Absent Member.
Absent Member.

Re: glance error:Unable to initialize terminal

Jump to solution
Sam,

You need to decide what metrics you want logged, and based on that, create your own syntax file - let's call it mysyntax. You can then run the following from a script (by cron):

nohup glance -adviser_only -syntax mysyntax -j 5 > glance.out &

Do 'man glance' for more options.

To learn more about adviser syntax, see:

/opt/perf/paperdocs/gp/C/adviser.pdf

and check out a few examples under:

/opt/perf/examples/adviser.

HTH,

Mladen
0 Likes
Mladen Despic Absent Member.
Absent Member.

Re: glance error:Unable to initialize terminal

Jump to solution
To see a sample of a simple adviser syntax that summarizes memory utilization, check this link:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xa56442308663d611abdb0090277a778c,00.html

Mladen Despic Absent Member.
Absent Member.

Re: glance error:Unable to initialize terminal

Jump to solution
Actually, if you use cron, then you should also use -iterations option for your glance command (check 'man glance'). Otherwise, you may end up with multiple glance processes running.

Alternatively, you can just specify how often you want your data logged by -j option (see 'man glance'). Just run glance in the background (with nohup) - there is no need for cron.

If you don't use -iterations , the process will run indefinitely.

Regards,

Mladen
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.