Akshayanti
Akshayanti

Reputation: 326

Confusion regarding the exact function of `netstat -e`

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

Answers (2)

Joe
Joe

Reputation: 173

Unix/Linux

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

Windows

If you mean netstat for Windows check out this link...

windows netstat info

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

sp.prakash
sp.prakash

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

Related Questions