Tag: networking

The ‘newish’ job

So I’ve now been here by calendar 34 working days. I’m getting a little more responsibility as time goes on. Now that they know I have the chops. 

For example – I was asked to identify what ports applications are using on the servers. 

Now if you’ve been around networking you know about a utility called netstat. 

You just do a :

sudo netstat -A inet -n -p

Ok, lets take it apart piece by piece. 

sudo is a way of allowing people to run things at elevated privilege but without having to know the root password for the system. Pretty convenient and you can also tightly control WHO can sudo too but managing group membership. 

The part ‘netstat’ is the application discussed above. 

The ‘-A inet’ says look for Internet TCP/IP protocol only. 

The ‘-n’ shows addresses as numerical and not hostnames. 

The ‘-p’ is to show the process id and program name. 


It’s really simple. And what you end up with is something like this:
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 ESTABLISHED 2901/python
tcp 0 0 TIME_WAIT –
tcp 0 0 ESTABLISHED 2897/python
tcp 0 0 ESTABLISHED 2829/python
tcp 0 0 TIME_WAIT –
tcp 0 0 ESTABLISHED 2861/python
tcp 0 0 ESTABLISHED 2816/python
tcp 0 0 TIME_WAIT –
tcp 0 0 ESTABLISHED 2906/python
tcp 0 0 ESTABLISHED 2365/python
tcp 0 0 TIME_WAIT –
tcp 0 0 ESTABLISHED 2906/python
tcp 0 0 ESTABLISHED 2220/python
tcp 0 0 ESTABLISHED 2878/python
tcp 0 52 ESTABLISHED 23781/sshd: anthony
tcp 0 0 ESTABLISHED 2167/epmd
tcp 0 0 TIME_WAIT –

So what the above shows is Python. All those ports – it’s how Python handles intra-process communication. And you never know what port is what. So that would be a Dynamic assignment of ports. 

But then we see my SSH connection at port 22. That’s a fixed port or as fixed as you can get without major reconfiguration. 

So there you go – a use for netstat. It lives on WIndows boxes too except it is considerably crippled on Windows platforms. For example, -A doesn’t exist. A netstat -p TCP -n does the similar thing. 




A book in my Amazon Recommendations

So my recommendations on Amazon.com are interesting. A lot of gay fiction, a lot of techie stuff so when this one popped up I had to buy it, it was less than $5:

John R. Pierce “An Introduction to Information Theory: Symbols, Signals and Noise”.

Pierce is yet another Bell Labs legend among the likes of Claude Shannon, Nyquist et al who are kind of integral to my I.T. career and to my interest in communication networks, from the wired to wireless.

He is one of the fathers of satellite telecommunications. Should be an interesting read.