Problem adjusting the output
Hi i m running a command
Code:
watch -n 1 -d netstat -i but the problem is the output is so long(Due to large number of virtual interfaces) it doesn't fit into the putty prompt. I dont need to monitor each and every network interface I m more interested in monitoring the interfaces starting from vif but whenever i run following command it doesnt display anything. Code:
watch -n 3 -d netstat -i | grep vif* |
@ Reply
Remove grep from the command and it will work:
watch -n 3 -d netstat -i eth0 |
I think that you need to include vif* next to netstat. I would try something like: watch -n 3 -d 'netstat -i vif*' I looked up the man of watch (http://linux.die.net/man/1/watch) and in the examples it states: "watch -d 'ls -l | fgrep joe'" the LS is of particular interest because it is a command. So, I am willing to bet you can do it if you place your netstat command in ''.
|
Quote:
Code:
# netstat -i vif* |
@ Reply
Did you try:
watch -n 3 -d netstat -i eth* it worked for me... check my previous post. |
Quote:
Code:
# netstat -i eth0 |
I just tried: watch -n 3 -d netstat -i eth* on Debian squeeze and it worked fine. You could try which watch and which netstat. The which command shows the exact location of the executable. You could try: /PATHWAY/TO/WATCH -n 3 -d /PATHWAY/TO/NETSTAT -i eth[0-9] The [0-9] parameter looks for the interfaces 0 through 9.
|
Quote:
Code:
watch -n 1 -d "netstat -i | grep vif*" |
All times are GMT -5. The time now is 12:48 AM. |