But if you are trying to script it, it would be easier to just run it command line:
CellCLI> help spool Usage: SPO[OL] [<filename> [ CRE[ATE] | REP[LACE] | APP[END]] | OFF ] Purpose: SPOOL <filename>: Direct the results to the file <filename>. SPOOL OFF: Turn off the spooling. SPOOL: Check the current spooling status. Arguments: <filename>: The filename where the results will be output. Options: [APPEND]: If the filename already exists, the following output will be appended to the file. Without this option, the existing file contents will be replaced. [CREATE]: If the filename already exists, an error is reported. [REPLACE]: If the filename already exists, the contents will be replaced. This is the default, when no option is provided. Examples: spool myfile spool myfile append spool off spool
Also look into dcli which allows you to run cellcli commands on one or more cells from a compute node.
# cellcli -e "list metrichistory where objectType = 'CELL' and name = 'CL_TEMP'" > /tmp/CL_TEMP.txt