Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    shell script to check port is busy


    Hi All

    How to create a shell script on centos 5. which tells whether the particula port is busy or not.

    It will take input port number like 80 ,25 etc and will tell whetehr it is free or busy.

    I would like to use this script in below manner
    SHELL>checkPort.sh 80
    SHELL>busy or free it returns.


    what is good a c/c++ socket program to check port busy or not, Or shell script for the same?


    Thanks
    Ritesh

  2. #2
    Depending on what you mean by "busy", netstat might be what you want.

  3. #3
    what in case is i need to do "netstat" on remote server..
    Thanks in Advance

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,522
    Locking this old thread.

    Feel free to start your own, though.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •