1826771 Members
2424 Online
109702 Solutions
New Discussion

Glance output

 
Smirjit Singh
Advisor

Glance output

Hi,

Whenever I am trying to execute following command line from any shell script then I am getting desired output. But when I am trying to execute the same script from remote shell or cron then I am not getting output.

Command line is.
/opt/perf/bin/glance -j 1 -iterations 2 -i -f /tmp/glance.out > /dev/null 2>&1

Do glannce need any shell during execution ?

Through glance we can measure utilization. Like it showw Mem usage is 60%. But if I want to get same output without glance then how I can get it ?

Knowledge is only most valuable things which can't buy.
5 REPLIES 5
S.K. Chan
Honored Contributor

Re: Glance output

If you want to run glance using cron, the variable TERM must be exported because cron does not set that for you. Try to put your glance statement in a script file like so ..

#!/usr/bin/ksh
export TERM=hp
/opt/perf/bin/glance -j 1 -iterations 2 -i -f /tmp/glance.out > /dev/null 2>&1

Then run that script file in your cron. That should work for you. The other tool you can use to find out your memory usage is "vmstat". For example ..

# vmstat -n 1 1
==> Look for "avm" and "free" column. It reports in 4kb page size. The approximate free memory would be the value in "free" multiply by 4 gives the result in KBytes. Do a "man vmstat" for details. Using ..

# glance -m
gives you a better breakdown of memory utilization.
Smirjit Singh
Advisor

Re: Glance output

Hi Chan,

Thanks for your reply.

But TERM=hp did not help to resolve the problem.

Thanks.

Regards.

Sandip
Knowledge is only most valuable things which can't buy.
Smirjit Singh
Advisor

Re: Glance output

Hi Chan,

Thanks for your reply.

But TERM=hp did not help to resolve the problem.

Thanks.

Regards.

Smirjit
Knowledge is only most valuable things which can't buy.
Martin Johnson
Honored Contributor

Re: Glance output

You are redirecting standard error to /dev/null, so you have no idea what kind of error is occurring. Stop the redirection and run the job in cron again.


Marty
Rodney Hills
Honored Contributor

Re: Glance output

Since you are writing to the same file over and over (/tmp/glance.out). Is it possible the permissions/owner on the file are different than what the "cron" launched job is defined with?

my 2 cents

-- Rod Hills
There be dragons...