webmail


	

x=1;while [ $x -eq 1 ]; do user=phillip;prsp=$(pgrep -n -u $user);posp=$(pgrep -n -u $user);if [ $prsp -ne $posp ];then x=0;fi;done; strace -vvf -s 300 -p $posp

strace -vff -s200 `ps wuax | grep php-fpm | grep -v grep | awk '{print "-p" $2}' | xargs` 

find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -nr | head -5

strace -ff -s 100 `pidof php-fpm |sed 's/\([0-9]*\)/\-p \1/g'`

n=1;while true; do ps faux | gawk '{if($8 == "D") print $0}';echo $n; n=$(($n + 1)) ; done

while true; do ps faux | gawk '{if($8 == "D") print $0}' ; done

user=USERNAMEGOESHERE;x=1; while (( $x == 1 )); do pid=$(pgrep -u $user | head -1); [[ $pid ]] && x=0; done; strace -vvvtff -s1000 -p $pid

x=`lsof -n -U`;for i in `netstat -x |gawk '/mysql.sock/{print $7}'`; do echo "$x\n" | grep `echo -e "$(( $i -1 ))\n"`; done

mysql> revoke CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, INSERT, UPDATE, DELETE on fc_db.* from 'sphillips'@'%';

cat /dev/shm/test | tr "|^C"\\n" | while read line;  do grep  -o --color "$line" << 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)' ; done

mysql -e "select * from information_schema.PROCESSLIST WHERE COMMAND='Query' AND STATE='preparing' AND TIME > 1\G;"

index=web-access vhost=*shape.com request_uri!=/sites/* | top request_uri
index=web-access host=pdrpapp*dsm vhost=parents.com OR vhost=*.parents.com slurp| timechart count by user_agent

{% if reverse_proxies is defined %}
  {% for proxy in reverse_proxies: %}
    RewriteRule {{ proxy['source'] }} {{ proxy['dest'] }} [{{ proxy['flags'] }}]
    ProxyPassReverse {{ proxy['source'] }} {{ proxy['dest'] }}
  {% endfor %}
{% endif %}
-----------------------
reverse_proxies:
  - source: ^/videos(/.*)$
    dest: http://www.site.com/videos$1
    flags: P
  - source: ^/shop(/.*)$
    dest: http://www.site.com/shop$1
    flags: P
###########################
- name: Add local0 to rsyslog.conf
  lineinfile: 
    dest=/etc/rsyslog.conf
    state=present
    line="local0.* /var/log/drupal.log"
  notify:
    - restart rsyslog

- name: Create Drupal file
  file: 
    path=/var/log/drupal.log
    owner='root'
    group='root'
    mode=0644
    state=touch
############################
handler file for above^
---
# handlers file for drupal
- name: restart rsyslog
  service: name=rsyslog state=restarted

Match all characters between double brackets..."\S*" is the secrete here: grep -o -r -E --color '\{\{ \S* }}'