You should add this in .bashrc for <CURRENT USER>:
alias psext='ps -u `whoami` |grep java |awk '\''{print ("/proc/"$1"/cwd") }'\''|xargs ls -l'
alias whatports='netstat -tlnp|grep '
for example:
psext
lrwxrwxrwx 1 user user 0 Oct 16 14:43 /proc/15052/cwd -> /data/domains/portalDomain921_2
lrwxrwxrwx 1 user user 0 Oct 16 18:21 /proc/17112/cwd -> /data/domains/portalDomain921
whatports 17112
tcp 0 0 0.0.0.0:9631 0.0.0.0:* LISTEN 17112/java
tcp 0 0 :::9931 :::* LISTEN 17112/java
No comments:
Post a Comment