need Help

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

need Help

lad.ratnesh@gmail.com
Hi,

Please can you help me to solve below unix query.

Many Thanks

You have a log with a number of these messages:

2011-10-11 18:45:45,022 [SocketListener0-3] ERROR com.adeptra7.httpservice.DefaultServlet - serviceFailed: method=POST, uri=/external, remoteAddress=10.11.2.20, remotePort=46875
2011-10-11 18:45:45,022 [SocketListener0-3] ERROR com.adeptra7.httpservice.DefaultServlet - serviceFailed: method=POST, uri=/external, remoteAddress=10.11.2.22, remotePort=46875
2011-10-11 18:45:45,022 [SocketListener0-3] ERROR com.adeptra7.httpservice.DefaultServlet - serviceFailed: method=POST, uri=/external, remoteAddress=10.11.2.10, remotePort=46875
2011-10-11 18:45:45,022 [SocketListener0-3] ERROR com.adeptra7.httpservice.DefaultServlet - serviceFailed: method=POST, uri=/external, remoteAddress=10.11.2.23, remotePort=46875

Write a script or command that tells you how many ERROR conditions of type “serviceFailed” occurred and grouped by remoteAddress. So in other words, the number of serviceFailed errors per remoteAddress.




You have a log file with the following lines:

2011-10-11 20:17:16,051 [Thread-5] INFO  com.adeptra7.jmsservice.JmsServiceContainer - messagesProcessed: numMessages=0, time=60 seconds, rate=3.00 m/s, activeSessions=0
2011-10-11 20:18:16,051 [Thread-5] INFO  com.adeptra7.jmsservice.JmsServiceContainer - messagesProcessed: numMessages=0, time=60 seconds, rate=2.00 m/s, activeSessions=0
2011-10-11 20:19:16,051 [Thread-5] INFO  com.adeptra7.jmsservice.JmsServiceContainer - messagesProcessed: numMessages=0, time=60 seconds, rate=5.00 m/s, activeSessions=0

Write a command or script in any language that would give you an average rate of messages per second.
Reply | Threaded
Open this post in threaded view
|

Re: need Help

Guru
Administrator
Hi
  This is a forum, not a place where you come and dump your homework questions. This forum helps people if they get stuck while trying something.

  If you are serious, please show us what have you tried.