Print Text In Task - Action View Info

Hi Friends.

Is possible to see in the “view action info” from a task in execution (or executed) the text from a file?
For example:

Contain For Task
Run batch.txt > log.txt
type log.txt
Run batch2.txt

Action Info For Tack Executing / Executed
Completed Run batch.txt > log.txt
Completed type log.txt
Starting Batch Date xx/xx/yyyy hh:mm
xx1.exe
xx2.exe
Finalizing Batch Date xx/yy/yyyy hh:mm
Completed Run batch2.txt

It’s possible?

Thanks!

Hectorio

I’m a little confused about what you are asking. It might be useful if you could explain it in a bit more detail.

Are you saying you want to log the contents of a batch file, and then log the output of the batch file as well? If so, this is possible.

Hi jgstew:

It’s just like you described…

Thanks!

If you want to save the contents of a BAT file, you could just save a copy of it.

copy batch.bat batch.bat.txt

To log the bat file’s output, do something like:

waithidden cmd batch.bat > log.txt

There are some specifics to this which are in a previous post somewhere.


###Related:

Now I need to see the contents of the log.txt in the Action View… window

Its possible?

Oh, no, that is not possible.

You could read it using an analysis property to be able to view it in the console.

Ok, I was thinking in three options:

  1. View my batch log in action view (confirmed it’s not possible).
  2. Use analysis for read my batch log. But I think its not comes with speed and performance, because I don’t want to configure it for evaluate in every report…
  3. Upload the batch log to Bigfix Server (through “archive now”). I think I’ll use it…

Thanks for the help.

You could append to the same log for every batch file you run. You can have an analysis property that will return the last 100 lines of the log. You can also use an actionscript command to force the client to update that analysis property (as well as all others). This is the best way to read log data.

It doesn’t have to be the last 100 lines… it can be however many you want.

You should set the analysis property to report once a day or less often so that it doesn’t report in too often for no reason.

Interesting, but… I can not find a command to force the client to update an analysis property… I use Bigfix 9.1. Would you help me with the command?

Many thanks!

The actionscript to force a client to refresh all properties is the following:

notify client ForceRefresh

See this example: https://bigfix.me/fixlet/details/3967

You should be careful not to do this on a huge number of clients all at once because if your root server is too slow at ingesting reports, then it will get backed up. This is more of an issue with very large amounts of clients or very slow root server storage.

1 Like

Excellent!

Many thanks!