cancel
Showing results for 
Search instead for 
Did you mean: 
jeesshnasree
Starfighter Starfighter
Starfighter
  • 4,333 Views

could you please share awk and netstat command for daily use with detailed explanation or book

Jump to solution

Hi All,

could you please share awk and netstat command with detailed explanation or book . Kindly suggest me any book or URL . currently my RHLS subscription completed . actually i am interesed in learning  and implement on Linux OS .

kindly share your valuable inputs . 

0 Kudos
2 Solutions

Accepted Solutions
magoyal
Flight Engineer Flight Engineer
Flight Engineer
  • 4,324 Views

go with man page of awk and netstat commad. or you can use this links also. 

i generally use netstat command with -tnlp and -unlp options. :)

https://likegeeks.com/awk-command/

https://www.tecmint.com/20-netstat-commands-for-linux-network-management/

View solution in original post

0 Kudos
Susan
Flight Engineer Flight Engineer
Flight Engineer
  • 4,312 Views

One of the many uses of netstat - or currently the ss command - is to see if I have configured a service to run on a specific interface. Many services ship with configuration files that either listen on localhost only (sendmail and postfix) or on all IPv4 and Ipv6 interfaces (ssh). After changing the configurations and restarting the service, an ss -l command can show me that I am listening. Since I am usually configuring TCP services, I add the -t option and since I usually also want to verify the process that is listening, I add the -p options.

ss -ltp

This will show output like 127.0.0.1:ipp  to say that the ipp protocol is listening on the 127.0.0.1 interface.

Once I know that the service started and that I am listening on the correct interfaces, I can then adjust my firewall settings to allow select networks to connect. 

If I just test from a remote system and I cannot connect, it can be unclear initially if I have a routing issue, a firewall rule blocking the connection, or if the service is not running or not listening on the a particular interface. Some services are better than others at helping to identify the root cause. The ss (and formally the netstat) command can help identify or rule out one specific possibility.

Again, this is just one of many uses for the ss command. You can get a variety of socket connection information for performance tuning and troubleshooting from this command.

Here are some blog posts on ss. It has been a while since I looked at them closely but they may help.

https://www.linux.com/learn/intro-to-linux/2017/7/introduction-ss-command

https://www.binarytides.com/linux-ss-command/

https://computingforgeeks.com/netstat-vs-ss-usage-guide-linux/

https://www.rootusers.com/21-ss-command-examples-in-linux/

https://pcarleton.com/2018/05/31/netstat-vs-ss/

Stackoverflow and Stackexchange also have threads on ss replacing netstat.

View solution in original post

4 Replies
magoyal
Flight Engineer Flight Engineer
Flight Engineer
  • 4,325 Views

go with man page of awk and netstat commad. or you can use this links also. 

i generally use netstat command with -tnlp and -unlp options. :)

https://likegeeks.com/awk-command/

https://www.tecmint.com/20-netstat-commands-for-linux-network-management/

0 Kudos
jeesshnasree
Starfighter Starfighter
Starfighter
  • 4,305 Views

Hi @magoyal,

 

thanks for share awk command😊✍️🙏

0 Kudos
Susan
Flight Engineer Flight Engineer
Flight Engineer
  • 4,313 Views

One of the many uses of netstat - or currently the ss command - is to see if I have configured a service to run on a specific interface. Many services ship with configuration files that either listen on localhost only (sendmail and postfix) or on all IPv4 and Ipv6 interfaces (ssh). After changing the configurations and restarting the service, an ss -l command can show me that I am listening. Since I am usually configuring TCP services, I add the -t option and since I usually also want to verify the process that is listening, I add the -p options.

ss -ltp

This will show output like 127.0.0.1:ipp  to say that the ipp protocol is listening on the 127.0.0.1 interface.

Once I know that the service started and that I am listening on the correct interfaces, I can then adjust my firewall settings to allow select networks to connect. 

If I just test from a remote system and I cannot connect, it can be unclear initially if I have a routing issue, a firewall rule blocking the connection, or if the service is not running or not listening on the a particular interface. Some services are better than others at helping to identify the root cause. The ss (and formally the netstat) command can help identify or rule out one specific possibility.

Again, this is just one of many uses for the ss command. You can get a variety of socket connection information for performance tuning and troubleshooting from this command.

Here are some blog posts on ss. It has been a while since I looked at them closely but they may help.

https://www.linux.com/learn/intro-to-linux/2017/7/introduction-ss-command

https://www.binarytides.com/linux-ss-command/

https://computingforgeeks.com/netstat-vs-ss-usage-guide-linux/

https://www.rootusers.com/21-ss-command-examples-in-linux/

https://pcarleton.com/2018/05/31/netstat-vs-ss/

Stackoverflow and Stackexchange also have threads on ss replacing netstat.

jeesshnasree
Starfighter Starfighter
Starfighter
  • 4,307 Views

Hi @Susan,

 

thanks for share valuable “ss” commands with examples . Finally good collection. 🙏✍️😊

0 Kudos
Join the discussion
You must log in to join this conversation.