1822512 Members
2452 Online
109642 Solutions
New Discussion юеВ

Glance scripting

 
Andrew S Babb
Advisor

Glance scripting

I am needing to obtain real time statistics from glance using a command line interface, and recording the information in a log file.

I believe this is possible with glance, but not measure ware, but cannot remember how it is done.

TIA
andrew
4 REPLIES 4
Alexander M. Ermes
Honored Contributor

Re: Glance scripting

Hi there.
Look at the extract from the manpage :

SYNOPSIS
glance [-j interval] [-p [dest]] [-f dest] [-maxpages numpages]
[-command] [-nice nicevalue] [-nosort] [-lock]
[-adviser_off] [-adviser_only] [-iterations count]
[-syntax filename]
[-disks ] [-kernel ] [-nfs ] [-pids ]

What you need is the -f ( output to file ).
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Carsten Krege
Honored Contributor

Re: Glance scripting

Run glance in advisor mode. To do this create an advisor file first that contains the metric you want to print out (refer to the glance help pages to figure out which you need). Here is an example for a file "advisor.ck":

CPU LOOP
PRINT GBL_NODENAME,GBL_STATDATE,GBL_STATTIME,GBL_CPU_TOTAL_UTIL,GBL_CPU_IDLE_UTIL,GBL_CPU_NORMAL_UTIL,GBL_CPU_SYS_MODE_UTIL,GBL_CPU_REALTIME_UTIL,GBL_CPU_NICE_UTIL,GBL_CPU_NNICE_UTIL
PRINT GBL_MEM_FREE,GBL_MEM_USER,GBL_MEM_SYS,GBL_MEM_CACHE,GBL_MEM_VIRT,GBL_MEM_ACTIVE_VIRT


Now invoke glance with

# glance -j 300 -adviser_only -syntax advisor.ck

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Juan Gonz├бlez
Trusted Contributor

Re: Glance scripting

Hi,
you can find the adviser documentation in
/opt/perf/paperdocs/gp/adviser.pdf
and the metrics availables in
/opt/perf/paperdocs/gp/metrics.pdf

Best regards
Juan Gonzalez
Printaporn_1
Esteemed Contributor

Re: Glance scripting

Hi,

Actually measureware can do real time statistic please re-check.
enjoy any little thing in my life