Link to home
Start Free TrialLog in
Avatar of bbunner
bbunner

asked on

ls and netstat command equivalency

What are the Solaris equivalents for these Linux commands (ls and netstat) that would allow us to show this output?

# ls -l /proc/[PID]/fd
lr-x------ 1 root root 64 Jan 16 05:36 0 -> /dev/null
l-wx------ 1 root root 64 Jan 16 05:36 1 -> /dev/null
l-wx------ 1 root root 64 Jan 16 05:36 2 -> /dev/null
lrwx------ 1 root root 64 Jan 16 05:36 3 -> socket:[PID]

# netstat -fa
Proto Recv-Q Send-Q Local Addr Foreign Addr State  PID/Program name
tcp   0      0      *:5006     *:*          LISTEN [PID]//usr/bin/grep

We're trying to show how to detect a daemon that has a network socket through the /proc process directory.

Any ideas?  We're using Solaris 8 version 2/04 in our labs.
ASKER CERTIFIED SOLUTION
Avatar of neteducation
neteducation

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike R.
Mike R.

Hmmm...I was able to run the command "ls -l /proc/[PID]/fd" directly on my Solaris 9 box and got normal output.  

I am not sure about the netstat command, as I don't know what the linux "-f" and -a" switches are trying to accomplish.  I have a redhat 9 box here, but its man page doesn't show the "-f" and "-a" options.

Best of luck!
M