Author Topic: unix commands i'd like to remember  (Read 3353 times)

0 Members and 1 Guest are viewing this topic.

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 30904
  • who run it.
  • Respect: +7583
    • View Profile
    • Email
Re: unix commands i'd like to remember
« Reply #15 on: July 26, 2013, 05:28:17 pm »
0
Try SET GLOBAL slow_query_log = 'ON'; and perhaps FLUSH LOGS;

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 30904
  • who run it.
  • Respect: +7583
    • View Profile
    • Email
Re: unix commands i'd like to remember
« Reply #16 on: July 26, 2013, 11:48:35 pm »
0
dope.. watch cumulative

Code: [Select]
watch -n1 -d=cumulative ls -al /etc/nginx/logs/

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 30904
  • who run it.
  • Respect: +7583
    • View Profile
    • Email
Re: unix commands i'd like to remember
« Reply #17 on: August 04, 2013, 05:47:28 am »
0
hehe

Code: [Select]
sed -n '50p' file.txt

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 30904
  • who run it.
  • Respect: +7583
    • View Profile
    • Email
Re: unix commands i'd like to remember
« Reply #18 on: August 05, 2013, 06:34:32 pm »
0
Code: [Select]
VBoxManage clonehd --format RAW ubuntu.vdi ubuntu.img
Then

mount -t ext3 -o loop,rw ./ubuntu.img /mnt

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 30904
  • who run it.
  • Respect: +7583
    • View Profile
    • Email
Re: unix commands i'd like to remember
« Reply #19 on: August 05, 2013, 09:09:39 pm »
0
Code: [Select]
php clear-apc.php --sock /var/run/php5-fpm.sock

Otherwise:

php clear-apc.php --port=[port]

or omit for default 127.0.0.1:9000


https://groups.drupal.org/node/198168

apc instances by php-fpm pool


Posted by Everett Zufelt on December 22, 2011 at 1:29pm
I'm in the process of moving a couple of sites to an Amazon ec2 microinstance. For the little traffic these sites get the microinstance will be suitable.

I am optimizing performance, and am using mod_fastcgi, php-fpm, and apc; along with varnish.

I have setup a separate fpm pool for each site, but they both appear to share the same apc instance, likely as apc is attached to the fpm process and not the pool.

Is there a method of using a separate apc instance per fpm pool? Or, can someone suggest a setup that is as performant, but which would allow for separate apc instances per site?

Login or register to post comments
Comments
Possible solution
Posted by Everett Zufelt on December 22, 2011 at 1:36pm

The solution that appears to be the most appealing right now is to run two instances of php-fpm with one pool each.

"just launch php-fpm -y /path/to/php-fpm.conf with different path to php-fpm.conf. The FPM master process consumes almost no CPU and some memory. So multipliing FPM instance is not a big deal. go ahead."

http://forum.nginx.org/read.php?3,122844

Accessibility Consultant & Web Developer - Zufelt.ca
@ezufelt on Twitter | LinkedIn profile

Login or register to post comments
My solution
Posted by Everett Zufelt on December 22, 2011 at 3:58pm

Here is what I've done (stock install of Ubuntu 11.10).

// Create a second php5-fpm conf file
$ cd /etc/php5/fpm
$ cp php5-fpm.conf php5-fpm-b.conf

// Modify the conf files to load only one pool.
...
;include=/etc/php5/fpm/pool.d/*.conf
include=/etc/php5/fpm/pool.d/name-of-pool-file.conf

// Create a second php5-fpm service
$ cd /etc/init.d
$ cp php5-fpm php5-fpm-b

// Modify the following lines in php5-fpm-b
...
DAEMON_ARGS="--fpm-config /etc/php5/fpm/php-fpm-b.conf"
PIDFILE=/var/run/php5-fpm-b.pid
TIMEOUT=30
SCRIPTNAME=/etc/init.d/$NAME-b
...

// Restart / start the services
$ service php5-fpm restart
$ service php5-fpm-b start






****** VERY IMPORTANT ********

works.

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 30904
  • who run it.
  • Respect: +7583
    • View Profile
    • Email
Re: unix commands i'd like to remember
« Reply #20 on: August 06, 2013, 10:37:57 am »
0

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 30904
  • who run it.
  • Respect: +7583
    • View Profile
    • Email
Re: unix commands i'd like to remember
« Reply #21 on: August 14, 2013, 12:25:05 am »
0
quick source policy route (iproute2)
Code: [Select]
ip route add 1.1.1.0/23 dev eth1 src 1.1.1.141 table ETH1
ip route add default via 1.1.1.1 dev eth1 table ETH1
ip rule add from 1.1.1.141 table ETH1
ip rule add to 1.1.1.141 table ETH1


adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 30904
  • who run it.
  • Respect: +7583
    • View Profile
    • Email
Re: unix commands i'd like to remember
« Reply #23 on: September 24, 2013, 09:17:37 pm »
0
command line testing SNI

openssl s_client -connect rackerhacker.com:443 -servername rackerhacker.com