วันศุกร์ที่ 15 พฤศจิกายน พ.ศ. 2556

10 basic examples of linux netstat command


From : http://www.binarytides.com/linux-netstat-command-examples/

1. List out all connections

$ netstat -a


2. List only TCP or UDP connections

for tcp
$ netstat -at

for udp
$ netstat -au


3. Disable reverse dns lookup for faster output

$ netstat -ant


4. List out only listening connections

$ netstat -tnl


5. Get process name/pid and user id

The process details are made available by the 'p' option.

~$ sudo netstat -nlpt


6. Print statistics

$ netstat -s

7. Display kernel routing information

$ netstat -rn


8. Print network interfaces

$ netstat -i

9. Get netstat output continuously

$ netstat -ct

10. Display multicast group information

$ netstat -g

วันพฤหัสบดีที่ 7 มีนาคม พ.ศ. 2556

13 Linux Network Configuration and Troubleshooting Commands


This link will review the following command for network configuration and troubleshooting.

  1. ifconfig 
  2. ping
  3. traceroute
  4. netstat 
  5. dig
  6. nslookup
  7. route
  8. host
  9. arp 
  10. ethtool
  11. iwconfig
  12. hostname 
  13. system-config-network

http://www.tecmint.com/linux-network-configuration-and-troubleshooting-commands/

วันพฤหัสบดีที่ 14 กุมภาพันธ์ พ.ศ. 2556

Handy howto for ubuntu

Most common task for admin was document here server-world.info. I found this accidentally. It include installation of OS, as well as common package such as ssh, dns, dhcp, virtualization, database and proxy. This is a good place to start.

http://server-world.info/en/note?os=Ubuntu_10.04

วันพุธที่ 13 กุมภาพันธ์ พ.ศ. 2556

วันพฤหัสบดีที่ 17 มกราคม พ.ศ. 2556

Tunning nginx worker process



From stackoverflow here : http://stackoverflow.com/questions/7325211/tuning-nginx-worker-process-to-obtain-100k-hits-per-min
worker_processes  4;  # 2*number of cpus
events {
    worker_connections  19000;  #it's the key to high performance - have a lot of coinnections available
}
worker_rlimit_nofile    20000;  #each connection needs a filehandle (or 2 if you are proxying)
keepalive_timeout  5;  #that' another key - close live connections as early as possible or disable them completely
#total amount of users you can serve in 1 second = worker_processes*worker_connections/keepalive_timeout

More info about nginx directive: http://blog.martinfjordvald.com/2011/04/optimizing-nginx-for-high-traffic-loads/