An easy command to monitor network connections

Lately I played mongodb a bit and I encountered this situation:

I want to figure out how many connections have been established between my client and mongodb server when I run the test code.

Though I figured out later that the log file contain such information,  I managed to use ‘watch’ to do such a job, which could be applied to other cases. Here it is:

watch -d -n 0.1 'netstat -p -an|grep mongo'
Advertisements
  1. #1 by bvlgari 腕時計 on September 16, 2013 - 10:46 am

    ブルガリ メンズ

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: