Linux Port Querying

[root ip-10-249-66-147 bin]# lsof -i tcp:8009
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    1368 root   40u  IPv6 185235      0t0  TCP *:8009 (LISTEN)
[root ip-10-249-66-147 bin]# netstat -talnp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1132/sshd           
...
LISTEN      1368/java          
tcp        0      0 :::8009                     :::*                        LISTEN      1368/java           
tcp        0      0 :::8080                     :::*                        LISTEN      1368/java           
tcp        0      0 ::ffff:127.0.0.1:5201       :::*                        LISTEN      25725/java