Question

I'm trying to find LONG UserAgent strings with LogParser.exe in my IIS logs. This example searches for entries with the string 'poo' in them.

LogParser.exe -i:IISW3C 
"SELECT COUNT(cs(User-Agent)) AS Client 
FROM *.log WHERE cs(User-Agent) LIKE '%poo%'"

I'm trying to say "How many entries have a User-Agent that is longer than 'x'".

Was it helpful?

Solution

Well, looks like I answered my own question.

LogParser.exe -i:IISW3C 
"SELECT COUNT(cs(User-Agent)) AS Client 
FROM *.log WHERE STRLEN(cs(User-Agent)) > 100"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top