HostOnNet Blog

Category Archives: Linux

lsof

lsof is a linux command to list open files. To list all files open by a process, run Example List all Connection on a Port lsof -P -iTCP List all TCP connections Device or resource busy


Install Docker on Ubuntu 16.04

To install Docker on Ubuntu 16.04, run following commands as user root. Back to Docker.


Squid Proxy Auto Installer

proxychains shadowsocks curl use socks5 proxy Install ssocksd Proxy Server Proxy is used to hide your real IP address. One of the popular software used to setup proxy is http://www.squid-cache.org/ I have recently created a script to auto install squid


Find which program use a port

To find which program use a port, for example 8080, you can use netstat or fuser command. ufser fuser command is part of psmisc package. On CentOS, install it with To see which application is running on PORT 8080, run


Server Benchmarking with Geekbench

Geekbench is a benchmarking software that measures power of your web server. It work on both windows and linux To install on Linux, run Once you run benchmark, you can save the result to your online account by visiting http://browser.primatelabs.com/user/55314


110: Connection timed out while reading response header from upstream

On Nginx + PHP-FPM server, some times site failed with 500 Internal Error. On checking nginx error log, found following error The error says “while reading response”, so it is a read_timeout. Nginx have 2 read timeout’s. proxy_read_timeout fastcgi_read_timeout Both


Check DNS Propagation

When you make changes to DNS entry of your domain or changed name server, it can take several hours to propagate across different DNS servers around the world. This is because each DNS server have its own cache, they only


Disable email from cronjob

To disable email from cronjob, add to end of the script. This will redirect all messages to /dev/null.


Device or resource busy

When i try to move a folder, i get following error First see if this folder is mounted with command If it is mounted, you need to unmount it first before renaming. To see which program access the folder, use


swap

To add swap file to linux system, first create a swap file. For 1 GB For 2 GB For 8 GB Now run following commands to make the file swap file, then enable swap. Make Swap Active On Boot To