Sponsored Content
Top Forums Shell Programming and Scripting Script for real time network traffic per process Post 302782347 by Corona688 on Monday 18th of March 2013 03:02:34 PM
Old 03-18-2013
Writing a script that encompasses them all would pretty much mean rewriting nettop for each and every platform. They're not the same.
 

8 More Discussions You Might Find Interesting

1. Cybersecurity

How to capture network traffic

Hi, Can someone give me the clue on how to capture network traffic at gateway. Thanx (2 Replies)
Discussion started by: kayode
2 Replies

2. Shell Programming and Scripting

Perl or Shell script to read a transaction log in real time

Hello, I have a Apache webserver running on RedHat. Its primary function is a proxy server for users accessing the internet. I have a transaction log that logs every transactions of every users. For users trying to access certain sites/content the transactions goes into a 302 redirect loop and... (2 Replies)
Discussion started by: bruno406
2 Replies

3. Infrastructure Monitoring

Network Traffic

Hi all, Got a strange one here, well not so much strange, different :-) I need to work out if a server is particulary chatty, whether its talking / communicating heavily to a particular server, as Im planning to physically move the server to a different server, over a link. Hence the... (6 Replies)
Discussion started by: sbk1972
6 Replies

4. Shell Programming and Scripting

shell script to replicate the log files from one location to another in real time

Hi, On the server, we have app log files in this location /app/logs/error.log On the same server, in a real time, we would like to replicate that into /var/ directory. if someone has already done this, please share the script. Thanks in advance. (4 Replies)
Discussion started by: lookinginfo
4 Replies

5. Shell Programming and Scripting

Shell script to convert epoch time to real time

Dear experts, I have an epoch time input file such as : - 1302451209564 1302483698948 1302485231072 1302490805383 1302519244700 1302492787481 1302505299145 1302506557022 1302532112140 1302501033105 1302511536485 1302512669550 I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies

6. AIX

Script for real time network traffic per process

Hi All Gurus, I want to write a script (bash/ksh/csh) which will show real time network traffic ( TCP or UDP ) generated by per process/PID. For both Linux/AIX system, as nethogs ( Linux package ) shows ? Any suggestion is MOST welcome. Thanks in Advance, Amritendu Das (1 Reply)
Discussion started by: linux.amrit
1 Replies

7. Infrastructure Monitoring

How do I know what traffic is in network port?

If I would like to know what connection , data , traffic in a network port ( eth0 ) , what can I do ? ps. because I always found the network is very slow , so I would like what the network port is doing . Thanks Login ID ust3 is currently in read-only mode for multiple infractions. Creating... (0 Replies)
Discussion started by: ust03
0 Replies

8. IP Networking

I would like to monitor network traffic for a computer on my network

My son does homework on a school laptop. I was thinking about setting up a gateway on my home network, so that I can monitor web traffic and know if he is doing his homework without standing over his shoulder. Ideally I would like to use the Raspberry Pi Model b that I already have. However, I... (15 Replies)
Discussion started by: gandolf989
15 Replies
nettop(1)						    BSD General Commands Manual 						 nettop(1)

NAME
nettop -- Display updated information about the network SYNOPSIS
nettop [-ncd] [-m <mode>] [-t <type>] [-s <seconds>] [-p <process-name|pid>] [-n] [-l <samples>] [-L <samples>] [-P] [-j|k|J <column-name[,column-name]...>] DESCRIPTION
The nettop program displays a list of sockets or routes. The counts for network structures are updated periodically. While the program is running the following keys may be used: q Quit Up Arrow Scroll up Down Arrow Scroll down Right Arrow Scroll Right Left Arrow Scroll Left d Toggle delta output r Redraw screen x Toggle human readable numbers e Expand all c Collapse all h Bring up the help menu j Bring up the column selection menu. In this mode you can enable/disable columns and change their order. p Bring up the process selection menu. In this mode you can enable/disable processes for display. l Change to logging mode, redisplay the current data, and quit. OPTIONS
A list of flags and their descriptions: -m <mode> Specify the mode. By default, nettop will monitor TCP and UDP sockets. The following modes are supported: tcp Only TCP sockets will be monitored udp Only UDP sockets will be monitored route Instead of sockets, the routing table will be monitored -t <type> Specify the type of interface. By default, all interfaces will be monitored. Multiple interface types may be specified. The fol- lowing types are supported: wifi WiFi interfaces wired Wired interfaces loopback Loopback interfaces awdl Apple Wireless Direct Link interfaces expensive Interfaces marked as "expensive", for example via hotspot undefined Cases where the underlying socket is not associated with an interface external The combination of all defined non-loopback interfaces. -n Disable address to name resolution -c Less intensive use of the CPU - draws less often -d Delta mode -x Extended display of numbers instead of human readable suffixes such as MiB -P Display per-process summary only, skipping details of open connections. This is equivalent to selecting "Collapse All" in the interactive menu. -s <delay> Set the delay between updates to <delay> seconds. The default delay between updates is 1 second. -l <samples> Use logging mode and display <samples> samples, even if standard output is a terminal. 0 is treated as infinity. Rather than redisplaying, output is periodically printed in raw form. -L <samples> Use logging mode and display <samples> samples, even if standard output is a terminal. Output will be in comma-separated val- ues (CSV) form. 0 is treated as infinity. Rather than redisplaying, output is periodically printed in raw form. -p <process-name|pid> Select a process for display. A numeric argument identifies a process by its pid. Alternatively a process name may be given, in which case all processes with that name will be displayed. The name must be an exact match for the name displayed by nettop, which may require that the name be truncated, for example launchd.develop instead of launchd.development. The option may be repeated to select multiple processes. -j <column name list> Specifiy a list of column headings to be included in the display. List items are separated by commas. For example, -j uuid,rtt_var -J <column name list> Specifiy a list of column headings that are to be the only ones included in the display. List items are separated by commas. For example, -j uuid,rtt_var. The ordering is currently as per nettop default, but may change in future revisions to match the order of the supplied column names. For future compatibility it is recommended that any names supplied here are given an order that matches the output. -k <column name list> Specifiy a list of column headings to be excluded from the display. List items are separated by commas. For example, -k rcv- size,rtt_avg Darwin May 31, 2019 Darwin
All times are GMT -4. The time now is 03:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy