Search code examples
verticavsql

How to get Notice and Hint logs of vertica cli into a file


this is my vsql cli command. Trying to store memory data and time into an output file.

/opt/vertica/bin/vsql -U xxxx -d Xxxx --password='xxxx' --timing -c 'profile xxxxxxxxxxxxxx' -o sample.log
vsql: warning: extra command-line argument "i" ignored
NOTICE 4788:  Statement is being profiled
HINT:  Select * from v_monitor.execution_engine_profiles where transaction_id=xxxxxxxxxxx and statement_id=xxx;
NOTICE 3557:  Initiator memory for query: [on pool general: Xxxxxx KB, minimum: XXXxx KB]
NOTICE 5077:  Total memory required by query: [Xxxxxx KB]
  count  
---------
 6344737
(1 row)

but in the sample.log file getting only:-

  count  
---------
 6344737
(1 row)

Time: First fetch (1 row): 547.649 ms. All rows formatted: 547.715 ms

how can I get Total memory required into the file.

I expect all results along with hint and notice command to be in one file


Solution

  • In my case, I need to apply this in order to get all the hints and notice messages:

    $VSQLPATH -U $USERNAME -d $DB_NAME -w $PWD -h $HOST --timing -e -c "PROFILE $query" > $FILEPATH 2>&1