How To Build simple WX station using Pi Zero + BME280
CentOS 7, additional third party external repositories
CentOS 7, how to install xtables-addons
postfix, auto postmap using inotify
How To Make php-fpm Listen On Both Tcp And Unix Socket?
I need to make php-fpm listeing on both tcp/unix socket, and this is how it done.
(this was not pretty workarround i guess, but it work 😀 )
first  download php rpm source
$ wget http://centos.alt.ru/pub/php-fpm/5.3.3-2/SRPMS/php-5.3.3-2.el5.src.rpm
Compile and install
$ rpmbuild --rebuild php-5.3.3-2.el5.src.rpm $ sudo rpm -Uvh /path/to/RPMS/php-*
Configuring the default php-fpm for using tcp socket
Edit www.conf
$ sudo vi /etc/php-fpm.d/www.conf
Find line containing
listen = 127.0.0.1:9000
We can make it listening to port what ever we desire, ie 9001 etc
Start php-fpm first instance
$ sudo service php-fpm start
Configuring php-fpm for using unix socket
$ sudo cp /etc/php-fpm.conf /etc/php-fpm2.conf $ sudo cp -rp /etc/php-fpm.d /etc/php-fpm2.d
Edit /etc/php-fpm2.conf
include=/etc/php-fpm2.d/*.conf pid = /var/run/php-fpm/php-fpm2.pid error_log = /var/log/php-fpm/error2.log
Edit /etc/php-fpm2.d/www.conf
listen = /tmp/php-fpm.sock php_admin_value[error_log] = /var/log/php-fpm/www-error2.log
Mounting a JFFS2 filesystem in Linux
Disabling IPv6 for Linux distributions
Zombie Process
A zombie, or defunct, process is a process that has terminated, but its parent process has not taken it out of the process table with the wait() family of system calls. This typically happens when a program forks/execs another program, but then doesn’t reap it properly. The easiest way to write the parent to properly reap its children is to setup a signal handler for SIGCHLD that calls wait().
See the man pages on your local system for signal and wait(2).
Zombie and defunct states of a process are different things. Zombie is created when a child dies and parent didn’t call wait. Defunct is created when parent dies before the child finishes.
Defunct processes can’t be killed since they are already dead. To make them disappear you have to kill their parent process…
It’s not possible to kill defunct processes.
A good way to kill lists of processes is:
$ ps axf | grep name-of-process | grep -v -grep | awk '{print "kill -9 ",$1}' | sh