Re: glance error while running through cron (553 Views)
Reply
Advisor
GSK_2
Posts: 47
Registered: ‎01-09-2006
Message 1 of 7 (553 Views)
Accepted Solution

glance error while running through cron

Hi Guys,

I am getting the below mentioned error while i was running glance through crontab. These are some of the commands which I have given in the script.

/opt/perf/bin/glance -i -iterations 2 -f /FTPtest/PerfStats/filesysteminfo
/opt/perf/bin/glance -m -iterations 2 -f /FTPtest/PerfStats/Memoryinfo

===================== Glance Fatal Error =====================
Version:
User : root Date: Tue Nov 13 02:45:14
File : ../../../gp/source/glance/terminal.c Line: 159
System : burdbfo B.11.23 ia64

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


===================== Glance Non-Fatal Error =====================
Version:
User : root Date: Tue Nov 13 02:45:15
File : ../../../gp/source/glance/glance.c Line: 1644
System : burdbfo B.11.23 ia64

Unable to perform functions on devices.
======================================================================

COuld someone please tell me what might be the problem. Thanks in advance.

Regards,
Satish
Please use plain text.
Honored Contributor
whiteknight
Posts: 1,501
Registered: ‎11-22-1999
Message 2 of 7 (553 Views)

Re: glance error while running through cron

Satish

you need to add

-adviser_only
This option allows Glance to run with no screen
displays to the terminal. Only the Adviser will run,
sending it's output to stdout. With this option, the
glance Adviser runs in the background, with stdout
output optionally redirected to a file. If you want to
run glance in "Adviser only" mode at startup time, you
must include the -bootup option as well.

WK
Problem never ends, you must know how to fix it
Please use plain text.
Advisor
GSK_2
Posts: 47
Registered: ‎01-09-2006
Message 3 of 7 (553 Views)

Re: glance error while running through cron

Hi WK,

Thanks for your reply.

I have tried giving this option, but with no success. It was creating adviser.out file with zero bytes also the file /tmp/samplefile with zero bytes. I was giving this command

$ glance -adviser_only -i -iterations 2 -f /tmp/samplefile

Could you please give me the correct syntax if i am giving it incorrectly?

Thanks in advance.

Regards,
Satish
Please use plain text.
Esteemed Contributor
Arturo Galbiati
Posts: 830
Registered: ‎02-10-2003
Message 4 of 7 (553 Views)

Re: glance error while running through cron

Hi Satish,
/opt/perf/bin/glance -j10 -adviser_only -nosort -iterations 2 -bootup -syntax ./gln_syntax_file

In the gln_syntax_file you have to put what you need to check. i.e.:

gbl_statdate,
" ",
gbl_stattime,
" ",
gbl_cpu_total_util|3|0,
" ",
gbl_disk_util_peak|3|0,
" ",
gbl_mem_util|3|0,
" ",
gbl_swap_space_util|3|0


HTH,
Art
Please use plain text.
Occasional Visitor
Axel Becker
Posts: 1
Registered: ‎01-22-2003
Message 5 of 7 (553 Views)

Re: glance error while running through cron

I'm trying to use glance in a cron job and i have the same problem.

Here is the command:

/opt/perf/bin/glance -m -iterations 2 -adviser_only -bootup -f /tmp/gl_mem_result

The size of file /tmp/gl_mem_result is zero.

Please use plain text.
Honored Contributor
spex
Posts: 1,367
Registered: ‎05-14-1996
Message 6 of 7 (553 Views)

Re: glance error while running through cron

The manpage for glance provides valid example usage:

To run glance in the background against special adviser syntax,
logging data to a file, you must first create a file that contains the
appropriate adviser commands, then execute glance with stdout
redirected to a file. For example:

echo 'print gbl_stattime, " runq=", gbl_run_queue' >temp
glance -aos ./temp -j 60>outfile &

PCS
Please use plain text.
Honored Contributor
Dave La Mar
Posts: 829
Registered: ‎03-27-2001
Message 7 of 7 (553 Views)

Re: glance error while running through cron

Satish -
Within our daily script run from cron our systax is -
/opt/perf/bin/glance -adviser_only -syntax /rmp/work/mem.syntax -j 10 -iterations 2 2>/dev/null >> SOME_LOG_OUTPUT_FILE

Best of luck on this.

Regards,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation