Sponsored Content
Full Discussion: Netstat -i notification
Operating Systems Linux Netstat -i notification Post 302703847 by Corona688 on Thursday 20th of September 2012 12:25:55 PM
Old 09-20-2012
You've got some useless use of cat in there.

I wouldn't bother processing the logfile except when you use it. You can do so in one step.

I might do this:

Code:
netstat -us > newlogfile

[ -f oldlogfile ] && awk '(NR==FNR) && $6 { A[$1]=$6; next } # Store old log file errors in array A
        $1 in A { print $1, $6-A[$1] } # If the interface is found in A, print interface-name, difference of errors
        ' oldlogfile newlogfile

mv newlogfile oldlogfile # Replace logfile


Last edited by Corona688; 09-20-2012 at 01:36 PM..
 

10 More Discussions You Might Find Interesting

1. IP Networking

Netstat

Giving netstat command on the prompt gives commands such as localhost.43592 localhost.35237 32768 0 32768 0 TIME_WAIT localhost.43594 localhost.43595 32768 0 32768 0 TIME_WAIT localhost.43598 localhost.35237 32768 0 32768 0 TIME_WAIT... (6 Replies)
Discussion started by: DPAI
6 Replies

2. IP Networking

netstat

Hi what is the command to see the process name/application name along with the port number, connection status ... netstat is not giving process/application name Is there any way to know which application is holding which port? Thanks in advance (3 Replies)
Discussion started by: axes
3 Replies

3. UNIX for Dummies Questions & Answers

netstat not working

Hello, One of the solaris machine in our network is giving an error when the netstat command is executed. soloman:/home/db2admin->netstat ip open: Permission denied can't open mib stream: Bad file number But it works with root. I couldnt' get any useful info during my search in google. ... (2 Replies)
Discussion started by: k_pranava
2 Replies

4. AIX

netstat -anp

Hi Which options can I use to show program with its open ports on AIX?. Just like netstat on linux does: netstat -anp|grep 25 tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2112/sendmail: acce Thanks Time to start using code tags. Check your... (2 Replies)
Discussion started by: iga3725
2 Replies

5. Solaris

netstat -- what am i looking at?

Greetings to all, Here is a line of output from my netstat command cbp031.904 wdcprodhome.nfsd 98304 0 49640 0 ESTABLISHED The only thing i recognize is the unix machine "cbp031" but what is .904 and all the other data telling me? Thanks in advance. (3 Replies)
Discussion started by: Harleyrci
3 Replies

6. UNIX for Advanced & Expert Users

Help with netstat

Hi, I want to list the time for how long a secure connections last to my server/blade. i am using netstat command to get the same, but not sure how to get the time for how long connections is being ESTABLISHED. netstat -na | grep 'ESTABLISHED' | grep :443 |awk '{print $4}' | cut -d: -f1 |... (1 Reply)
Discussion started by: Siddheshk
1 Replies

7. UNIX for Dummies Questions & Answers

Need help with a netstat command

Do I have this command correct to show all current connections/sessions my Solaris box has? It does not seem to do anything. netstat -an | grep EST (6 Replies)
Discussion started by: SIFT3R
6 Replies

8. Red Hat

netstat

Hi Can any body tell me about TIME_WAIT status meaning in the following command output. # netstat -anp|grep 5000 tcp 0 0 127.0.0.1:50006 0.0.0.0:* LISTEN 5058/ccsd tcp 0 0 0.0.0.0:50008 0.0.0.0:* ... (3 Replies)
Discussion started by: mastansaheb
3 Replies

9. OS X (Apple)

netstat

When running netstat -i from the Command Terminal, It returns with 21 different connections.. The addresses all look like this: ::1 fe80:1::1 10:dd:b1:a5:c4:ba with Network names like Linke#2 fe80::8e2d How can I delve deeper into this to clarify what is going on with my network?... (0 Replies)
Discussion started by: dwfiedler
0 Replies

10. Shell Programming and Scripting

netstat output

Hi Team, Below is the output of netstat -an | grep 1533 tcp 0 0 17.18.18.12:583 10.3.2.0:1533 ESTABLISHED tcp 0 0 17.18.18.12:370 10.3.2.0:1533 ESTABLISHED Below is the o/p of netstat -a | grep server_name tcp 0 ... (4 Replies)
Discussion started by: Girish19
4 Replies
SLATTACH(8)						      System Manager's Manual						       SLATTACH(8)

NAME
slattach - attach serial lines as network interfaces SYOPNSIS
slattach ttyname [ baudrate ] DESCRIPTION
Slattach is used to assign a tty line to a network interface, and to define the network source and destination addresses. The ttyname parameter is a string of the form ``ttyXX'', or ``/dev/ttyXX''. The optional baudrate parameter is used to set the speed of the connec- tion. If not specified, the default of 9600 is used. Only the super-user may attach a network interface. To detach the interface, use `ifconfig interface-name down' after killing off the slattach process. interface-name is the name that is shown by netstat(1) EXAMPLES
slattach ttyh8 slattach /dev/tty01 4800 DIAGNOSTICS
Messages indicating the specified interface does not exit, the requested address is unknown, the user is not privileged and tried to alter an interface's configuration. SEE ALSO
rc(8), intro(4), netstat(1), ifconfig(8) 4.3 Berkeley Distribution November 17, 1996 SLATTACH(8)
All times are GMT -4. The time now is 03:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy