bind – dump cache, how much memory might be occupied by the query cache

It is difficult to understand how BIND manages the occupied memory of your server. And most of the problems for DNS forwarders are the memory related – it grows enormously and if you try limiting it you might end up with a DNS server dropping some connections.
So if you have a DNS BIND9 server (especially a forwarder) you can dump the query cache into a file and see the size of the file. Such you might get the tentative memory usage of your BIND9 server.

rdnc dumpdb

To dump the query cache.

A real world example. Always include “-all” to be sure all the cache is dumped in the file!

root@srv1 # rndc dumpdb -all
root@srv1 # ls -altr /var/bind/
total 141596
drwxrwxr-x 2 bind bind      4096 Jan 25 00:56 pri
drwxrwxr-x 2 bind bind      4096 Jan 25 00:56 dyn
-rw-rwxr-- 1 bind bind      3289 Jan 25 00:58 root.cache
drwxr-xr-x 5 bind bind      4096 Feb 13 05:15 ..
drwxrwxr-x 2 bind bind     12288 May  7 10:00 sec
drwxrwxr-x 5 bind bind      4096 May  8 03:52 .
-rw-r--r-- 1 bind bind 144810299 May  8 03:56 named_dump.db

As you can see our dump file is around 139 Mbytes size, so you can expect at least 140 Mbytes of memory to be used for the BIND9 query cache. You can track in your case the footprint of named process and the size of the dump file.

Here is what you can find in the named_dump.db file:

; Zone dump of '10.10.10.in-addr.arpa/IN/america'
;
10.10.10.in-addr.arpa.                      86400 IN SOA      ns1.exa-ns5.com. wdns.exa-ns5.com. 2065407385 60 30 2419200 30
10.10.10.in-addr.arpa.                      1800 IN NS        ns1.exa-ns5.com.
10.10.10.in-addr.arpa.                      1800 IN NS        ns2.exa-ns5.com.
10.10.10.in-addr.arpa.                      1800 IN NS        ns4.exa-ns5.com.
10.10.10.in-addr.arpa.                      1800 IN NS        ns5.exa-ns5.com.
1.10.10.10.in-addr.arpa.                    86400 IN PTR      1.example.com.
2.10.10.10.in-addr.arpa.                    86400 IN PTR      2.example.com.
;
; Zone dump of '10.10.11.in-addr.arpa/IN/america'
;
10.10.11.in-addr.arpa.                      86400 IN SOA      ns1.exa-ns5.com. wdns.exa-ns5.com. 2065407385 60 30 2419200 30
10.10.11.in-addr.arpa.                      1800 IN NS        ns1.exa-ns5.com.
10.10.11.in-addr.arpa.                      1800 IN NS        ns2.exa-ns5.com.
10.10.11.in-addr.arpa.                      1800 IN NS        ns4.exa-ns5.com.
10.10.11.in-addr.arpa.                      1800 IN NS        ns5.exa-ns5.com.
18.10.10.11.in-addr.arpa.                   86400 IN PTR      ns1.exa-ns5.com.
19.10.10.11.in-addr.arpa.                   86400 IN PTR      ns2.exa-ns5.com.

; Zone dump of 'example.com/IN/america'
;
example.com.                                    180 IN SOA        ns1.exa-ns5.com. support.example.com. 2065407734 60 30 2419200 30
example.com.                                    1800 IN NS        ns1.exa-ns5.com.
example.com.                                    1800 IN NS        ns2.exa-ns5.com.
example.com.                                    1800 IN NS        ns4.exa-ns5.com.
example.com.                                    1800 IN NS        ns5.exa-ns5.com.
example.com.                                    180 IN MX         1 ASPMX.L.GOOGLE.COM.
example.com.                                    180 IN MX         5 ALT1.ASPMX.L.GOOGLE.COM.
example.com.                                    180 IN MX         5 ALT2.ASPMX.L.GOOGLE.COM.
example.com.                                    180 IN MX         10 ASPMX2.GOOGLEMAIL.COM.
example.com.                                    180 IN MX         10 ASPMX3.GOOGLEMAIL.COM.
*.210.example.com.                            180 IN A          10.10.10.10
*.2107.example.com.                           180 IN A          10.10.10.134
*.2109.example.com.                           180 IN A          10.10.10.138
*.2115.example.com.                           180 IN A          10.10.10.98
*.2117.example.com.                           180 IN A          10.10.10.99
*.2119.example.com.                           180 IN A          10.10.11.2
*.2131.example.com.                           180 IN A          10.10.11.6
*.2246.example.com.                           180 IN A          10.11.11.13
*.2260.example.com.                           180 IN A          10.11.12.184
*.2271.example.com.                           180 IN A          10.11.13.158
*.2298.example.com.                           180 IN A          10.11.14.14
*.2292.example.com.                           180 IN A          10.10.15.65
*.2296.example.com.                           180 IN A          10.10.10.100

Here is the syntax

You can dump only a zone or view.

  dumpdb [-all|-cache|-zones] [view ...]
                Dump cache(s) to the dump file (named_dump.db).

List all your files (and directories) with file size over FTP without ls -R (recursive)

A great piece of software is

lftp – sophisticated file transfer program

This little console tool could ease your life significantly with many enhancements to the simple FTP protocol. This tip is for those how what to list all their files in a directory or the entire FTP account, but do not have ls command with recursive abilities. So the only option is to manually go through all the directories to fetch the listing information of the directories, but this could be automatically done by

lftp using the custom command “find” and if you add “-l” argument the output is like “ls -al” – file or directory, file permissions, user and group, file size, date and file name are shown on single line for each file.

Just execute the command with proper credentials and the starting directory of your choice. The command output could even be piped to another command.
Keep on reading!

MariaDB/MySQL replication error – Error during XID COMMIT: failed to update GTID state in mysql.gtid_slave_pos

When in aggressive parallel mode MariaDB/MySQL replication could fail with:

Last_Errno: 1942
Last_Error: Error during XID COMMIT: failed to update GTID state in mysql.gtid_slave_pos: 1062: Duplicate entry '0-46158188501' for key 'PRIMARY'

This table is used for tracking the replication process and you might probably just do:

STOP/START SLAVE i.e. restart the replication and it would continue without errors.

MariaDB [(none)]> STOP SLAVE;
Query OK, 0 rows affected (0.08 sec)

MariaDB [(none)]> START SLAVE;
Query OK, 0 rows affected (0.00 sec)

Optimistic or aggressive mode runs conflicting transactions in parallel and it sometimes happens to roll back. In our case probably something happened and the rollback failed and STOP/START saved the replication.

* Additional thoughts

If you try STOP/START and you get the same error, probably it worth trying truncating the table “mysql.gtid_slave_pos” if you do not use GTID Replication feature (the “show slave status” says “Using_Gtid: No”). And even if you use “Using_Gtid: No” you could probably always stop the replication, “change master” to use the old style and start again? Probably switching off the aggressive mode might help, too!
Keep on reading!

bind – dns server queries statistics with statistics-file

There is an option “statistics-file” in the BIND9 configuration for query statistics. It will give you statistics for

  • Incoming Requests – total number of queries
  • Incoming Queries – queries by record type
  • Outgoing Queries – queries by record type per view
  • Name Server Statistics – extended queries statistics by network connection type (UDP, TCP or IPv4 and IPv6 interface), by type of answer (authoritative, non authoritative and so on) and more
  • Zone Maintenance Statistics – transfer and system queries
  • Resolver Statistics – recursive queries
  • Cache DB RRsets – cached resources records sets
  • Socket I/O Statistics – statistics numbers for UDP, TCP (for both IPv4 and IPV6) sockets and connections opened, closed, failure
  • Per Zone Query Statistics – so you can see how many queries you have for a zone in a view (and the transfers if the server is a slave)

In named.conf:

options {
....
    statistics-file "/var/log/named.stats";
    zone-statistics yes ;
....

But if you check in /var/log this file might be missing even your BIND server has been running for months!

This is because the statistics and the file is generated on request and is a snapshot at the moment you do the request

To request from the BIND server to generate the file is pretty easy:

root@srv ~ # rndc stats
root@srv ~ #

No standard output and you should have the stats file generated:

root@srv ~ # ls -altr /var/log/named.stats 
-rw-r--r-- 1 named named 174997 Apr  7 01:43 /var/log/named.stats

The generated requests are appended in the file with a UNIX timestamp.

....
--- Statistics Dump --- (1550561292)
+++ Statistics Dump +++ (1551233218)
....

Keep on reading!

nginx with php fpm (fastcgi) and the warning – an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp

As the web grows and the technology advances the page size of the web sites also grows or just some times you might want to output a big chunk of data from your application server – PHP-FPM (but it could be any of another ruby, python, C, Django and more), for example.
Here is a fast configuration tip (note this is not the proxy-related warning!):

The default nginx buffers per CGI connection are too small

Here is what to do in your nginx configuration file:
First, look for a line “include /etc/nginx/fastcgi_params;” or similar and add or edit if they exist after this line:

        fastcgi_buffer_size 16k;
        fastcgi_buffers 32 16k;

Check out more for the buffers here http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_buffers
The warning should stop if it does not stop you can try raising them. It could consume more memory but could lower the IO usage of your disks and improve the performance of your site or whatever backend works!

Here is the warning in our nginx error logs. We got this warning when using php-fpm and the php output size was 325965 bytes (~320K).

2019/04/04 09:56:05 [warn] 24451#24451: *44269838 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/0/12/0019966120 while reading upstream, client: 10.10.10.10, server: srv17.srv.en, request: "GET /api/20140102/product HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "srv17.srv.en"
2019/04/04 09:56:07 [warn] 24451#24451: *44269849 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/2/12/0019966122 while reading upstream, client: 10.10.10.11, server: srv17.srv.en, request: "GET /api/20140102/product HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "srv17.srv.en"
2019/04/04 09:56:09 [warn] 24450#24450: *44269856 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/7/12/0019966127 while reading upstream, client: 10.10.10.12, server: srv17.srv.en, request: "GET /api/20140102/product HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "srv17.srv.en"

megacli – FW error description: The current operation is not allowed … offline or missing virtual drives

Probably everyone who has ever touched LSI controllers and the megacli tool has had this error or he is going to have it for sure! It’s only a matter of time when you receive it when creating or replacing a disk! No this is not another article for this error!!!

FW error description: The current operation is not allowed because the controller has data in cache for offline or missing virtual drives.

Probably you want to replace a failed disk and you have inserted the new one and you cannot add it into the RAID array or something similar. In our case, the drive failed and even stopped working, the slot showed “missing drive” status. We replace the hard drive and it was in “Unconfigured(Good), Spun Up”

You have to use exactly the name of the Virtual Drive with the zero leading if any and even you may use double quotes

root@srv ~ # megacli -DiscardPreservedCache -L"08" -a0
                                     
Adapter #0

Virtual Drive(Target ID 08): Preserved Cache Data Cleared.

Exit Code: 0x00

As you can see: “Target ID 08“, the ID is 08, NOT 8!

Here are some unsuccessful tries (even with 08 was unsuccessful – it might be from our cli version or shell, but it did not work!). Note the last command to get the status for all devices:

root@srv ~ # megacli -DiscardPreservedCache -L8 -a0
                                     
Adapter 0: No Virtual Drive has Preserved Cache Data.

Exit Code: 0x00
root@srv ~ # megacli -DiscardPreservedCache -L08 -a0
                                     
Adapter 0: No Virtual Drive has Preserved Cache Data.

Exit Code: 0x00

root@srv ~ # megacli -GetPreservedCacheList -a0
                                     
Adapter #0

Virtual Drive(Target ID 08): Missing.

Exit Code: 0x00

It reports there is no drive with preserved cache on the very ID, YOU TYPED, but then getting the Preserved cached list there is a drive in the list because 8 is different from 08.

For farther problems getting your new disk in the array you can check our tested replace procedure: megacli – restart a rebuild with a disk in failed state

Installing and running BOINC client (with SETI project) under CentOS 7

Here is how you can install a BOINC client and attach it to a project (SETI). We use only command line tools, not GUI involved here. You can attach to a project and do some various administrative work with

boinccmd

like to get the progress of the currently running project tasks, project info, manage tasks and more.
Steps to install and run a (SETI) project:

STEP 1) Install BOINC client

The installation of the BOINC client requires using EPEL repository. Become root user and install Epel repository and Boinc client.

sudo su
yum update -y
yum install -y epel-release
yum install -y boinc-client
systemctl start boinc-client
systemctl enable boinc-client

STEP 2) Attach to a project

Here we use our SETI project to attach the server to it. There are two ways to attach to a project:

  • Using URL project and account key (strong or weak – it works with both). You can get your account keys from the site project url.
  • Using URL project and account info – username and password

To attach to a project your boinc client must be up and running and to use boinccmd – The command line interface to the BOINC client:

cd /var/lib/boinc
boinccmd --project_attach "http://setiathome.berkeley.edu/" "111111_22222233333344444444444555555555"

The first argument of “–project_attach” is the URL address of the project site, in this case, SETI with “http://setiathome.berkeley.edu/” and the account key of our account is 111111_22222233333344444444444555555555 (this is not the real one!). After successful attach your client will start to download the project files and begin to work on units:

[myuser@compute1 ~]# boinccmd --get_tasks

======== Tasks ========
1) -----------
   name: blc36_2bit_guppi_58406_31023_HIP20352_0115.19579.818.22.45.146.vlar_0
   WU name: blc36_2bit_guppi_58406_31023_HIP20352_0115.19579.818.22.45.146.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:38:07 2019
   report deadline: Sat May 25 18:37:49 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4843.738587
   CPU time at last checkpoint: 1326.038000
   current CPU time: 1366.303000
   fraction done: 0.170349
   swap size: 54 MB
   working set size: 52 MB
2) -----------
   name: blc34_2bit_guppi_58406_26949_HIP20491_0103.21476.0.21.44.1.vlar_1
   WU name: blc34_2bit_guppi_58406_26949_HIP20491_0103.21476.0.21.44.1.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: uninitialized
   active_task_state: UNINITIALIZED
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 5838.283108
3) -----------
 ....

You can see all the tasks – the one running at the moment and those on the queue.
When the “fraction done” reaches 1.0 the tasks is ready to report.

To view all running work units and some useful links in the project site like forums, account, preferences, recent tasks, list of the computers on which you are running SETI@Home, team information and more you can use “–get_simple_gui_info” (some of the data here are changed):

[myuser@compute1 ~]# boinccmd --get_simple_gui_info
======== Projects ========
1) -----------
   name: SETI@home
   master URL: http://setiathome.berkeley.edu/
   user_name: neoX
   team_name: neoX Group
   resource share: 150.000000
   user_total_credit: 14376490.970263
   user_expavg_credit: 25085.116699
   host_total_credit: 0.000000
   host_expavg_credit: 0.000000
   nrpc_failures: 2
   master_fetch_failures: 0
   master fetch pending: no
   scheduler RPC pending: no
   trickle upload pending: no
   attached via Account Manager: no
   ended: no
   suspended via GUI: no
   don't request more work: no
   disk usage: 0.000000
   last RPC: Tue Apr  2 17:19:56 2019

   project files downloaded: 1554212310.422403
GUI URL:
   name: Message boards
   description: Correspond with other users on the SETI@home message boards
   URL: http://setiathome.berkeley.edu/forum_index.php
GUI URL:
   name: Help
   description: Ask questions and report problems
   URL: http://setiathome.berkeley.edu/forum_help_desk.php
GUI URL:
   name: Account
   description: View your account information
   URL: http://setiathome.berkeley.edu/home.php
GUI URL:
   name: Preferences
   description: View and modify your computing preferences
   URL: http://setiathome.berkeley.edu/prefs.php?subset=global
GUI URL:
   name: Tasks
   description: View your recent tasks
   URL: http://setiathome.berkeley.edu/results.php?userid=111111
GUI URL:
   name: Computers
   description: View a list of the computers on which you are running SETI@Home
   URL: http://setiathome.berkeley.edu/hosts_user.php?userid=111111
GUI URL:
   name: Team
   description: View information about your team: neoX Group
   URL: http://setiathome.berkeley.edu/team_display.php?teamid=22222
GUI URL:
   name: Donate
   description: Donate to SETI@home
   URL: http://setiathome.berkeley.edu/sah_donate.php
   jobs succeeded: 16
   jobs failed: 0
   elapsed time: 107328.542101
   cross-project ID: 33333333333333333333333333333333

======== Tasks ========
1) -----------
   name: blc34_2bit_guppi_58406_27281_HIP20917_0104.20977.818.21.44.184.vlar_1
   WU name: blc34_2bit_guppi_58406_27281_HIP20917_0104.20977.818.21.44.184.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4658.869936
   CPU time at last checkpoint: 1902.641000
   current CPU time: 1949.207000
   fraction done: 0.202014
   swap size: 58 MB
   working set size: 56 MB
2) -----------
   name: blc34_2bit_guppi_58406_28625_HIP21029_0108.20913.818.21.44.250.vlar_1
   WU name: blc34_2bit_guppi_58406_28625_HIP21029_0108.20913.818.21.44.250.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4586.517845
   CPU time at last checkpoint: 1903.475000
   current CPU time: 1909.324000
   fraction done: 0.214406
   swap size: 58 MB
   working set size: 56 MB
3) -----------
   name: blc34_2bit_guppi_58406_27281_HIP20917_0104.20977.818.21.44.149.vlar_0
   WU name: blc34_2bit_guppi_58406_27281_HIP20917_0104.20977.818.21.44.149.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4643.434099
   CPU time at last checkpoint: 1902.425000
   current CPU time: 1904.189000
   fraction done: 0.204658
   swap size: 58 MB
   working set size: 56 MB
4) -----------
   name: blc34_2bit_guppi_58406_26949_HIP20491_0103.21476.0.21.44.21.vlar_1
   WU name: blc34_2bit_guppi_58406_26949_HIP20491_0103.21476.0.21.44.21.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4636.707813
   CPU time at last checkpoint: 1845.896000
   current CPU time: 1862.998000
   fraction done: 0.205810
   swap size: 54 MB
   working set size: 52 MB
5) -----------
   name: blc34_2bit_guppi_58406_28965_HIP20350_0109.21465.0.22.45.59.vlar_1
   WU name: blc34_2bit_guppi_58406_28965_HIP20350_0109.21465.0.22.45.59.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4665.477705
   CPU time at last checkpoint: 1781.304000
   current CPU time: 1805.969000
   fraction done: 0.200882
   swap size: 58 MB
   working set size: 56 MB
6) -----------
   name: blc34_2bit_guppi_58406_28625_HIP21029_0108.20913.818.21.44.210.vlar_1
   WU name: blc34_2bit_guppi_58406_28625_HIP21029_0108.20913.818.21.44.210.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4675.696451
   CPU time at last checkpoint: 1780.113000
   current CPU time: 1784.886000
   fraction done: 0.199132
   swap size: 58 MB
   working set size: 56 MB
7) -----------
   name: blc34_2bit_guppi_58406_28965_HIP20350_0109.21465.0.22.45.101.vlar_1
   WU name: blc34_2bit_guppi_58406_28965_HIP20350_0109.21465.0.22.45.101.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4705.804477
   CPU time at last checkpoint: 1711.990000
   current CPU time: 1768.862000
   fraction done: 0.193975
   swap size: 54 MB
   working set size: 52 MB
8) -----------
   name: blc34_2bit_guppi_58406_28625_HIP21029_0108.20913.818.21.44.254.vlar_1
   WU name: blc34_2bit_guppi_58406_28625_HIP21029_0108.20913.818.21.44.254.vlar
   project URL: http://setiathome.berkeley.edu/
   received: Tue Apr  2 13:43:18 2019
   report deadline: Sat May 25 18:42:59 2019
   ready to report: no
   state: downloaded
   scheduler state: scheduled
   active_task_state: EXECUTING
   app version num: 800
   resources: 1 CPU
   estimated CPU time remaining: 4928.870679
   CPU time at last checkpoint: 1422.330000
   current CPU time: 1466.627000
   fraction done: 0.155767
   swap size: 54 MB
   working set size: 52 MB

boinccmd – the management tool for the command line

Here are the options you can use in version 7.14.2:

[myuser@compute1 ~]# boinccmd --help

usage: boinccmd [--host hostname] [--passwd passwd] [--unix_domain] command

default hostname: localhost
default password: contents of gui_rpc_auth.cfg
Commands:
 --acct_mgr attach URL name passwd  attach to account manager
 --acct_mgr info                    show current account manager info
 --acct_mgr sync                    synchronize with acct mgr
 --acct_mgr detach                  detach from acct mgr
 --client_version                   show client version
 --create_account URL email passwd name
 --file_transfer URL filename op    file transfer operation
   op = retry | abort
 --get_app_config URL               show app config for given project
 --get_cc_status
 --get_daily_xfer_history           show network traffic history
 --get_disk_usage                   show disk usage
 --get_file_transfers               show file transfers
 --get_host_info
 --get_message_count                show largest message seqno
 --get_messages [ seqno ]           show messages > seqno
 --get_notices [ seqno ]            show notices > seqno
 --get_project_config URL
 --get_project_status               show status of all attached projects
 --get_proxy_settings
 --get_simple_gui_info              show status of projects and active tasks
 --get_state                        show entire state
 --get_tasks                        show tasks
 --get_old_tasks                    show reported tasks from last 1 hour
 --join_acct_mgr URL name passwd    same as --acct_mgr attach
 --lookup_account URL email passwd
 --network_available                retry deferred network communication
 --project URL op                   project operation
   op = reset | detach | update | suspend | resume | nomorework | allowmorework | detach_when_done | dont_detach_when_done
 --project_attach URL auth          attach to project
 --quit                             tell client to exit
 --quit_acct_mgr                    same as --acct_mgr detach
 --read_cc_config
 --read_global_prefs_override
 --run_benchmarks
 --set_gpu_mode mode duration       set GPU run mode for given duration
   mode = always | auto | never
 --set_host_info product_name
 --set_network_mode mode duration   set network mode for given duration
   mode = always | auto | never
 --set_proxy_settings
 --set_run_mode mode duration       set run mode for given duration
   mode = always | auto | never
 --task url task_name op            task operation
   op = suspend | resume | abort

More clients in EPEL repository

[myuser@compute1 ~]# yum search boinc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.checkdomain.de
 * epel: mirror.wiuwiu.de
 * extras: mirror.checkdomain.de
 * updates: mirror.checkdomain.de
============================================================================ N/S matched: boinc ============================================================================
boinc-client.x86_64 : The BOINC client
boinc-client-devel.x86_64 : Development files for boinc-client
boinc-client-doc.noarch : Documentation files for boinc-client
boinc-client-static.x86_64 : Static libraries for boinc-client
boinc-manager.x86_64 : GUI to control and monitor boinc-client

  Name and summary matches only, use "search all" for everything.

Troubleshooting

If you get the follwoing error:

root@srv ~ # boinccmd --project_attach "http://boinc.bakerlab.org/rosetta/" "1111_111111111111111111111111111"
Operation failed: authentication error

You must change the directory to “/var/lib/boinc” and run the command again. You may chown the directory to the boinc user. A directory for the project is created under “projects/” and a configuration file is created with name “account_boinc.bakerlab.org_rosetta.xml”.

root@srv ~ # cd /var/lib/boinc
root@srv /var/lib/boinc # boinccmd --project_attach "https://boinc.bakerlab.org/rosetta/" "1111_111111111111111111111111111"
root@srv chown -R boinc:boinc /var/lib/boinc
root@srv /var/lib/boinc # ls -altr projects/boinc.bakerlab.org_rosetta/
total 8
drwxrwx--x 4 boinc boinc 4096 Apr  4 03:01 ..
drwxrwx--x 2 boinc boinc 4096 Apr  4 03:01 .
root@srv /var/lib/boinc # cat account_boinc.bakerlab.org_rosetta.xml
<account>
    <master_url>https://boinc.bakerlab.org/rosetta/</master_url>
    <authenticator>1111_111111111111111111111111111</authenticator>
    <project_name>Rosetta@home</project_name>
<project_preferences>

<resource_share>15</resource_share>
<project_specific>
<color_scheme>Tahiti Sunset</color_scheme>
</project_specific>
</project_preferences>
<gui_urls>

    <gui_url>
        <name>Message boards</name>
        <description>Correspond with other users on the Rosetta@home message boards</description>
        <url>http://boinc.bakerlab.org/rosetta/forum_index.php</url>
    </gui_url>
    <gui_url>
        <name>Your account</name>
        <description>View your account information</description>
        <url>http://boinc.bakerlab.org/rosetta/home.php</url>
    </gui_url>
    <gui_url>
        <name>Your tasks</name>
        <description>View the last week or so of computational work</description>
        <url>http://boinc.bakerlab.org/rosetta/results.php?userid=xxxx</url>
    </gui_url>
    
</gui_urls>
</account>

The simplest nagios setup to make a phone call on a critical notification – using twilio service

The aim of this article is to show you the simplest way you can achieve your monitoring Nagios system to make a phone call on a critical, in our example CRITICAL host DOWN (the host is unreachable)! You will not need any server software to setup (including VoiceOverIP server), the only thing you will need is an account in https://www.twilio.com/, which even could be a free/trial account. The idea here is to be simple, cheap and easy to be accomplished.
To summarize it up:

to make a phone call to a real phone number on a CRITICAL Nagios notification

Here is what you need:

  1. A https://www.twilio.com/ trial/free account.
  2. root access to the Nagios server, because you will put a simple bash script, which uses “curl” to open an URL

The idea here is to make a phone call on a really CRITICAL issue to be able to wake up the person on duty to check the monitoring system and the SMS messages he received! So the phone call might not be accepted, at all – the ring of the phone (or continues vibrating of your smart band on your wrist!) should be enough to get a second different type of notification after the first (only and most cases only?) SMS messaging (which has the infromation for the problem!).
Keep on reading!

rsync and selinux – opendir failed: Permission denied

Selinux could sometime mess up with your setup. Let’s say you configured your rsync daemon but still, you get the error related to permissions when executing the rsync to copy files!

rsync: opendir "/." (in backup2) failed: Permission denied (13)

Apparently, the rsync client connects to the server and it finds there is a section name “backup2”, but still no permission despite you explicitly set in the section uid and ig to be root (uid=0 and gid=0 in the section)!

The most common reason is

selinux denies rsync process to open the directory exported by the path in your rsync configuration file.

By default, Selinux will deny access to any of the files and directories in your system! In most cases here what can you help:

setsebool -P rsync_export_all_ro=1

rsync_export_all_ro will export any files and directories read-only and requests like above will not be denied.
The capital letter “-P” is to set it permanently for the system over reboots.
Keep on reading!

The impact of enabling MySQL sync_binlog – really high disk IO

If you enable this feature in your MySQL you could

increase your disk IO time and write by 8-10x times.

Generally, this feature could save your replication scheme if a power failure occurs or OS crash and it could guarantee that no transaction is lost from the binary log. When enabled the binary log is synchronized on disk before transactions are committed. You can check the manual here: https://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#sysvar_sync_binlog and it also says there could be a great impact on disk writes but how many?
So here are two setups:

SETUP 1) 2 x 3T hard drives TOSHIBA DT01ACA300 in software RAID1

The impact of setting the sync_binlog=1 is 8-10 times the IO time and IO writes. Here is images of several hours of sync_binlog=1 and then we disabled it online:

SCREENSHOT 1) Enable the binary log synchronization with sync_binlog=1.

As you can see the increase in the disk IO time and disk write IOPS are significant – somewhere between 5 and 6 times more! The load is not increased more than 1.5x as normal, but it should be noted the server is off-peak and it has plenty of RAM 32G. Still mush load when some other IO appears.

main menu
Set MySQL sync_binlog=1 in a software raid of two hard drives

SCREENSHOT 2) Disabling the binary log synchronization with sync_binlog=0.

The decrease of the disk IO time and disk write IOPS are significant – somewhere between 5 and 6 times more! Everything back to normal.

main menu
Set MySQL sync_binlog=0 in a software raid of two hard drives.

SCREENSHOT 3) Enable the binary log synchronization with sync_binlog=1.

As you can see the increase in the disk IO time and disk write IOPS are significant – somewhere between 8 and 10 times more! The load is not increased, but it should be noted the server is off-peak and it has plenty of RAM 192G. Still mush load when some other IO appears.

SET GLOBAL sync_binlog=0;

SETUP 2) 2 x 960G SSD SAMSUNG SM863 in software RAID1

The impact of setting the sync_binlog=1 is also 8-10 times the IO time and IO writes. Here is images of several hours of sync_binlog=1 and then we disabled it online:

main menu
Set MySQL sync_binlog=1 in a software raid of two enterprise SSDs

SCREENSHOT 4) Disabling the binary log synchronization with sync_binlog=0.

The decrease of the disk IO time and disk write IOPS are significant – somewhere between 8 and 10 times more and even more! Everything back to normal.

main menu
Set MySQL sync_binlog=0 in a software raid of two enterprise SSDs

SCREENSHOT 5) Enable the binary log synchronization with sync_binlog=1.

Just the period of the graphs are bigger. As you can see the increase in the disk IO time and disk write IOPS are significant – somewhere between 8 and 10 times more! The load is not increased, but it should be noted the server is off-peak and it has plenty of RAM 192G. Still mush load when some other IO appears.

main menu
Set MySQL sync_binlog=1 in a software raid of two enterprise SSDs (big period)

SCREENSHOT 6) Disabling the binary log synchronization with sync_binlog=0.

Just the period of the graphs are bigger. The decrease of the disk IO time and disk write IOPS are significant – somewhere between 8 and 10 times more and even more! Everything back to normal.

main menu
Set MySQL sync_binlog=0 in a software raid of two enterprise SSDs (big period)

BONUS – MySQL changed the default value from 0 (disabled) to 1 (enabled) from 5.7 (in fact MySQL >= 5.7.7).

SO BE CAREFUL now when upgrading from older versions like MySQL 5.1, 5.5, 5.6 – you would probably need to disable it in the MySQL configuration file my.cnf.