Reputation: 326
I have been meaning to use this command netstat -e
for a script. I earlier thought it gives the data count of bytes uploaded/downloaded during a particular session when it is connected to the network and the data is reset for every session/profile. That however, doesn't seem to be the case.
What does the command do exactly, i.e. what's it its data tabulating mechanism? Per-session or per-day or per-boot or something else?
Upvotes: 2
Views: 240
Reputation: 173
Man pages are your best friend in this instance...
http://www.unix.com/man-page/linux/0/netstat/
http://www.e-reading.link/htmbook.php/orelly/networking/puis/ch17_05.htm
If you mean netstat for Windows check out this link...
Also, it is best to create a written record of the connections that are made over some period of time. The command can then be written
netstat -b 5 >> C:\connections.txt
Note that as written, this command will run with five-second intervals until stopped by entering Ctrl+c
, which is a general command to exit. (Some reports say that this can be fairly CPU intensive so it may cause a slower, single-core machine to run sluggishly. It was not noticeable on my dual-core machine.)
From: here
Upvotes: 0
Reputation: 21
@Akshay, as of my knowledge 'netstat -e' produces extended version of netstat output. The netstat -e output includes couple of extra columns 'user', 'I-node' for each connection. FYI - This is tested on my unix machine which is running on CentOS 5.9
Upvotes: 1