Checking memcached status

I need to check memory usage of memcached server so I used: echo stats | nc 127.0.0.1 11211 STAT pid 2743 STAT uptime 263 STAT time 1395438951 STAT version 1.4.13 STAT pointer_size 64 STAT rusage_user 0.482926 STAT rusage_system 2.675593 STAT curr_items 8667 STAT total_items 10742 STAT bytes 23802513 STAT curr_connections 296 STAT total_connections 399 STAT connection_structures 297 STAT cmd_flush 0 STAT cmd_get 52578 STAT cmd_set 10792 STAT get_hits 28692 STAT get_misses 23886 STAT evictions 0 STAT bytes_read 35984361 STAT bytes_written 192647437 STAT limit_maxbytes 536870912 STAT threads 2 STAT accepting_conns 1 STAT listen_disabled_num 0 STAT replication MASTER STAT repcached_qi_free 8189 STAT repcached_wdata 0 STAT repcached_wsize 1026048 END For me, bytes value was important but you could find more about all statistics here  external link . ...

2014-03-21 · 1 min · timor

Postfix - automatically drop outbound mail

I have development server with postfix - I wanted to allow outbound traffic to one domain but cut off all the rest. I definitely do not want that test mail or any debug info goes to service users. I have to add something like that to /etc/postfix/transport: allowed.domain.com : * discard: Then run: postmap /etc/postfix/transport At end, add these to /etc/postfix/main.cf: transport_maps = hash:/etc/postfix/transport Reload postfix: postfix reload Test if it works: ...

2014-03-18 · 1 min · timor

Ansible - ssh pipelining

In recent Ansible update to 1.5 version there is really nice feature ssh pipelining. This option is serious alternative to accelerated mode. Just add to you config file (ex. ~/.ansible.cfg): [ssh_connection] pipelining=True Now run any playbook - you will see the difference 😄 Source (and extended info about): http://blog.ansibleworks.com/2014/01/15/ssh-connection-upgrades-coming-in-ansible-1-5/  external link

2014-03-04 · 1 min · timor

Comparing two lists in bash

I had quite simple task - compare two lists of hosts and check if hosts from first one are also on the second one. I started with diff: diff -u biglist.txt hosts_to_check.txt | grep -E "^\+" It was fine but output needs some filtering to get what I want. I’ve found another example with grep: grep -Fxv -f biglist.txt hosts_to_check.txt | sort -n This will search for all lines in hosts_to_check.txt which don’t match any line in biglist.txt. So after this I’ve got list of hosts that I have to check. That’s exactly what I need 😄 ...

2014-02-18 · 1 min · timor
[WSUS](https://learn.microsoft.com/en-us/training/modules/windows-server-update-management/)

Change default WSUS port from 8530 to 80 on Windows Server 2012

After WSUS installing on Windows Server 2012 I discovered that it’s running on port 8530, different than on older version of Windows (it was using port 80 from beginning). But what’s more interesting it was running ONLY on IPv6 interface! Switching binding configuration in IIS doesn’t help. I could stand switching port - it’s nothing hard with GPO, but IPv6 only configuration was not acceptable. After googling for some time 12 I found one command that solved my problems by switching WSUS to older behavior and run it on port 80 (on default website). ...

2014-01-24 · 1 min · timor

Debian - Upgrade MySQL to MariaDB

After reading some good opinions about MariaDB I wanted to give it a try. Upgrade looks quite straight forward but I found some issues a little tricky. Installation Add repo and key: cat > /etc/apt/sources.list <<SRC deb http://mirrors.supportex.net/mariadb/repo/5.5/debian wheezy main deb-src http://mirrors.supportex.net/mariadb/repo/5.5/debian wheezy main SRC (find more repositories here  external link ) Now install MariaDB: sudo apt-get update sudo apt-get install mariadb-server It could be better to install mariadb-server-5.5 and mariadb-client-5.5 package instead, because of this error  external link . ...

2014-01-24 · 1 min · timor

Nginx - enabling SPDY with freeware certificate

I was thinking about allowing access to my website using SPDY protocol for better performance and security (and for fun of course 😃 ). But SPDY have one disadvantage - you need SSL certificate signed by known authority that will verfiy in common browsers. So you can’t use self signed certificates because everyone will see a warning entering your site. Certs are quite expensive so I started searching for free one and to my surprise I found such! ...

2014-01-24 · 2 min · timor

Searching for better code editor

I’ve been using different code editors for different purposes. Gedit was fine for small scripts but not for bigger projects. It lacks intelligent code completion (function/class names, etc.). I was searching for convenient editor for Python, Perl, Ruby with support for frameworks like Django, Rails, etc. I know Sublime Text - but it’s paid  external link . There is LimeText  external link - open source clone, but it’s not ready to be used on daily basics. ...

2014-01-24 · 2 min · timor

Manage Windows 8.1 and Windows Server 2012 R2 in WSUS 3.0

After connecting few computers with Windows 8.1 to domain we found that these computers are not recognized or recognized as Windows 6.3 (which is true) on WSUS 3.0 running on Windows Server 2008. The bad thing was that they can’t properly report to WSUS and get updates from it. I found that there are two updates that have to be installed (but they’re not working without additional steps): http://support.microsoft.com/kb/2720211  external link http://support.microsoft.com/kb/2734608  external link After installation of second update there are two additional steps that have to be performed to get WSUS working: ...

2014-01-16 · 1 min · timor

Regenerate thumbnails in Shotwell 0.15 (for last month)

I love Shotwell  external link for it’s simplicity and easy export to Piwigo  external link . After Christmas I added new photos to my library but after that I made some modifications to them (red eye reduction, etc…). Because Shotwell generate thumbnails only on import, all my modifications were not visible on preview. ...

2014-01-08 · 1 min · timor