exiftool Stay Open misses executes?

Started by alexs77, December 05, 2010, 05:30:07 AM

Previous topic - Next topic

alexs77

Hi.

I start exiftool as a "daemon" with

exiftool -stay_open True -@ /tmp/TestArgs > /tmp/TestArgs.log 2>&1 &

Then I pipe commands into the TestArgs file (I piped the complete, attached 12 MB TestArgs into /tmp/TestArgs AT ONCE (cat TestArgs >> /tmp/TestArgs)). I noticed that there are "strange errors" (cf. https://exiftool.org/forum/index.php/topic,2972.0.html ). Now I'm trying to find, which commands cause the error. Having a hard time doing this...

So I tried to count the number of "{ready}" outputs of exitool and tried to relate it to the "-execute" lines in the TestArgs file. Well...:

$ grep ^-execute TestArgs | wc -l
   14882
$ grep ready TestArgs.log | wc -l
   14879


Any ideas, why the numbers don't add up? I'll attach the TestArgs and TestArgs.log files.

Phil Harvey

I don't think that I would be able to figure this out by just looking at the log files.  If you insert more debugging information it would be very useful.  There is an undocumented -echo option that would be very useful for this.  From your code insert -echo STR into each command, where STR is a number that you increment for each command.  This may allow you to figure out which commands are missing the "{ready}".

Please let me know what you discover.

Thanks.

- Phil

P.S.  There is also a -echo2 option new to version 8.41 that echos the string to STDERR instead of STDOUT if this is useful.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

Hi again,

I took a look at your output log file, and right off the bat I see something that would help more than the -echo command:

Insert -v0 into each of your commands.  This will fix the buffering problem you are having which is causing the unsynchronization between the STDOUT and STDERR streams, as well as adding the filename to the log file for each command.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

alexs77

Hi.

I'm trying to use the -echo option - how would I? I'll attach a small Args file and log file again. Error message I get:

Ignored superfluous tag name or invalid option: -echo Img:0000017

But the -v0 seems to be good, as it adds eg. this to the log:

======== /tmp/TestBilder/[2010-10-30--12.15.23] (P1080193) Cassandra, Schlittschuh, Kurs, Schlittschuhlaufen, Winterthur.jpg

Very useful!

I'm using exiftool 8.41

Phil Harvey

It sounds like the -v0 option may be what you needed.  But the problem with the -echo option is that you must put one argument per line in your -@ argfile.  So you must do this:

-echo
Img:0000017


not this:

-echo Img:0000017

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).