Finding top-N items in a stream
Wednesday, July 4th, 2007How to (approximately) generate a top-N items list without counting the number of occurrences of all instances?
Two interesting papers I found on the topic:
How to (approximately) generate a top-N items list without counting the number of occurrences of all instances?
Two interesting papers I found on the topic:
While playing with OSX I was wondering how to find out all the networks connections a particular process owns. On Linux I’d use `netstat -p` for this, which does not work on OSX.
It turns out that the solution is quite simple – `lsof -i` does the job and works on both Linux and OSX. Two other useful commands:
lsof -ai -p PID # all connections/sockets owned by PID
lsof -i:PORT # lists all connections/sockets with a particular PORT.