i have a situation where i have to monitor the execution time of the webservices using logparer as i cannot run perfmon. this is becoz of some unreasonable demands of my client.
i have my query documneted but i want to replace u_ex110713.log with the dynamic file name as i want to constantly monitor the latest file. how do i make it happen. i am open to using dos batch file so i can schedule it and pipe the results to another batch which will alert if the threshold increases to 30 seconds.
select TO_STRING(TO_LOCALTIME(TO_TIMESTAMP(date, time)), 'yyyy-MM-dd HH:mm') as timestamps,
count(timestamps),avg(div(time-taken,1000)),max(div(time-taken,1000)),min(div(time-taken,1000))
from \\server.qc.cgo.ca\c$\inetpub\logs\LogFiles\W3SVC1\u_ex110713.log
group by timestamps
order by timestamps asc