• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there a way to monitor (Record) the data passed across Tomcat to the Client

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to calculate/measure the (total) data passed across tomcat to the client. I mean is there a way to analyze the number of requests received and the data returned ??
 
Tim Moores
Bartender
Posts: 2895
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could write a servlet filter that sums up all request and response contents.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18281
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other options:

1. Write your own Valve. This will allow a lower-level analysis that not only sees more of the steering data, but also applies to all applications in Tomcat, not just one (and requires no mods to the apps). Before doing so, however, check the standard set of Tomcat valves. One of them might already do what you want.

2. Use a network sniffer. This will give you the truest picture, because it will allow you to monitor all traffic coming to/from Tomcat's ports and includes the network headers in the data count. It also means that you can get stats without mods to either the apps or Tomcat. However, being one step above the wire means that actual direct examination of the contents of the network packets is only possible for data that isn't being transmitted unencrypted.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic