I would like to know, if we have any command in Solaris to verify, if some process is listening on a port on a set of machines.
for eg: Wrote the below script, and found that when a process is listening on that port, then it just waits there and doesnt come out. Rather, I would like the script to verify, if some process is listening on that port on that machine and then come out with appropriate message and process to verify a port on the next machine.
telnet abc 33
telnet xyz 405
telnet bbb 54
Do we have any other alternative? Does lsof be useful? Please let me know on this.
read foo < /dev/tcp/abc/33 && echo port 33 is open on host abc
read foo < /dev/tcp/xyz/405 && echo port 405 is open on host xyz
read foo < /dev/tcp/bbb/54 && echo port 54 is open on host bbb