Problem adjusting the output


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Problem adjusting the output
# 1  
Old 05-25-2011
Problem adjusting the output

Hi i m running a command
Code:
watch -n 1 -d netstat -i

to see the packet drops every 1 second.
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*

What should i do?
# 2  
Old 05-25-2011
hi can u post sample o/p of the command

Code:
watch -n 1 -d netstat -i

# 3  
Old 05-25-2011
Quote:
Originally Posted by pratham
hi can u post sample o/p of the command

Code:
watch -n 1 -d netstat -i

This being production machine i can't post the output .But its used as Server Hosting the virtual guests using xen technology.
There for the number of network interfaces are more.
# 4  
Old 05-25-2011
does this work for u

Code:
watch -n 3 -d netstat -i | grep vif

# 5  
Old 05-25-2011
Try this:
Code:
watch -n 1 -d "netstat -i |grep vif"

This User Gave Thanks to cero For This Post:
# 6  
Old 05-25-2011
Quote:
Originally Posted by cero
Try this:
Code:
watch -n 1 -d "netstat -i |grep vif"

Its working now.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adjusting my awk output format

I've been diving into awk but still learning how to use it for text formatting. Below you can see my results are separated by a comma. Can somebody show me how to separate by TAB as well? An explanation would be appreciated as I did not comprehend the answer in the man pages and would like to gain... (1 Reply)
Discussion started by: sudo
1 Replies

2. Shell Programming and Scripting

Adjusting Dates

What is the easiest way to find the date 6 month prior to the current date. Example: Today is 2011/01/29 I need to find the 1st day of the month, 6 month ago, which is 2010/08/01. I have to count 1/1/2011 as a previous month, since the current day is past 1/1/2011. Is there any easy... (4 Replies)
Discussion started by: jclanc8
4 Replies

3. Programming

Problem with output

Hey guys, i am having problem with displaying my text. my text file is displayed in such a way and is called test....... Sam Worthington ... Jake SullyasZoe Saldana ... NeytiriasSigourney Weaver ... Dr. Grace AugustineasStephen Lang ... Colonel Miles QuaritchasJoel Moore ... Norm Spellman (as... (1 Reply)
Discussion started by: gregarion
1 Replies

4. Programming

adjusting a code for Linuxconio.h

Hi All, I am using a book to learn C++. Unfortunately the book, sometimes, uses the maddening phrase, #include <conio.h>, which is a M$ related file and not a part of STL, in some of its examples. My question is: How would you modify the following code so it would compile and run on Linux?... (3 Replies)
Discussion started by: eager2no
3 Replies

5. Solaris

Setting timezone Sunos 5.8 & adjusting

I am new to this so i figure this is an easy one.. How do i change the time zone from Central to Eastern time in SunOS 5.8 ? I thought I needed to edit the /etc/TIMEZONE and them issue TZ=US/Eastern but I want to check. Is a reboot required afterwards? If I want to change the system time... (3 Replies)
Discussion started by: jay6ird
3 Replies

6. Shell Programming and Scripting

Adjusting the output in a file

QUERY SCENARIO Here is the actual scenario LOOP echo "$COLNAME $TYPENAME($LENGTH) $NULLS ">>$DDL_FILE END-LOOP COLNAME, TYPENAME, LENGTH, NULLS are the variables and within echo statment the output of which has to go into file specified by DDL_FILE. ... (1 Reply)
Discussion started by: skyineyes
1 Replies
Login or Register to Ask a Question