0 Replies Latest reply on Aug 8, 2014 6:20 AM by oaks

    shorter log files (filter out 'Clone: xx% done.' rows)

    oaks Novice



      i'm using ghettoVCB since it's early versions and it's really a great tool!


      there is one little annoyance: if log files are written to file, they are spammed with "Clone: xx% done." rows.

      the only workaround i have found so far is to add a filter to the output of vmkfstools, like:

      ... | sed 's/Clone: ..% done.^M//g'

      directly to the two ${VMKFSTOOLS_CMD} lines in ghettoVCB.sh. this will filter out all clone record except the 100% (for me 1-9% are not an issue, so i filter out only two digit percentages).

      in the ghettoVCB.sh source code it looks like this:

      ${VMKFSTOOLS_CMD} -i "${SOURCE_VMDK}" -a "${ADAPTER_FORMAT}" "${DESTINATION_VMDK}" | sed 's/Clone: ..% done.^M//g' > "${VMDK_OUTPUT}" 2>&1

      nb: to enter the ^M character in vi type ctrl+v followed by ctrl+m

      maybe i did miss some other solution.

      if not, do you think this could be added as an option?

      edit: i corrected the sed command above, because it did not really work (the "Clone.." lines are not real rows, as they terminate with a ^M character only - as seen in vi). this edit does the job.

      nb: it was hard to notice, because cat works like the realtime output to console (stays on the same line while counting up the percentage) and a test with > to file i tried earlier was working..




      edited by oaks: corrected sed command