HangOps_ruПривет всем.
Sergey Ovsienkoхай
Sergey Ovsienkoначинайте, а то трубы горят
Vyacheslav Kuznetsovеще собираемся
| select (now() - query_start), datname, pid, usename, client_addr, client_port, state, CASE WHEN char_length(query) > 244 THEN substring(query, 1, 200) || ' .. ' || substring(query FROM '.{200}$') ELSE query END AS short_query from pg_stat_activity; |
Дмитрий Малыхин 10:07 PM http://i.imgur.com/DFCuIfl.jpg
me 10:28 PM ITIL только у меня вызывает ощущение дикой бюрократии?
Дмитрий Малыхин 10:28 PM нет. а ДевОпс анархия ?
I hereby claim:
To claim this, I am signing this object:
| stats = Dict() | |
| class Stats: | |
| """ A class to keep some stats """ | |
| def __init__(self): | |
| self.prop1 = 0 | |
| self.prop2 = 0 | |
| # Filling the dict with objects |
| $ knife ec2 server create --groups sg-4e63c727 | |
| ERROR: Fog::Compute::AWS::NotFound: The security group 'sg-4e63c727' does not exist |
| #!./bin/knife exec | |
| # A knife exec script to change chef node's name, preserving all the attributes. | |
| # | |
| # Usage: knife exec rename-node.rb old-name new-name | |
| # | |
| # Script retrieves the Node object, changes its 'name' attribute, | |
| # creates new Node object with updated name and rest of attributes | |
| # untouched. Then it deletes old Node and Client objects from | |
| # database, and logs into the server to update it: |
| <plist version="1.0"><dict><key>KeepAlive</key> | |
| <false> | |
| <key>Label</key> | |
| <string>com.apple.fuse4x</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>//sbin/kextload</string> | |
| <string>/System/Library/Extensions/fuse4x.kext</string> | |
| </array> | |
| <key>RunAtLoad</key> |
| def run_pg_fouine(): | |
| info = host_info[env.host_string] | |
| db_name = info.tags.get('Name') | |
| sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf') | |
| sudo('/etc/init.d/postgresql reload') | |
| time.sleep(30) | |
| sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf') | |
| sudo('/etc/init.d/postgresql reload') | |
| run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt') | |
| run('gzip -f /tmp/pgfouine.txt') |