Can't do anything with locked LV

to fix the "locked" error, you first need to deactivate your lv
# lvchange -an /dev/vg/lv
then edit your vg backup (/etc/lvm/backup/vg) and remove "LOCKED" in the lv status line.
after that do
# vgcfgrestore vg
# lvchange -ay /dev/vg/lv

when doing lvreduce now, everything should work properly.

| Can't do anything with locked LV | | 2014.05.09-16:44.00

Trying to remove ?failed? drive from LVM VG

 Cannot change VG vgname while PVs are missing..
vgextend --restoremissing VG
vgreduce VG /dev/broken-device?

| Trying to remove ?failed? drive from LVM VG | | 2014.03.31-13:20.00

hdparm on WD Black 4TB

hdparm -tT /dev/sdi

/dev/sdi:
 Timing cached reads:   11402 MB in  2.00 seconds = 5706.30 MB/sec
 Timing buffered disk reads: 502 MB in  3.01 seconds = 166.74 MB/sec

| hdparm on WD Black 4TB | | 2014.03.21-14:27.00

PowerTOP Limbo - How Low Can You Go?

  1. Samsung NF310, no Xorg, 1366x768, RAMdisk, 2.6.36, display OFF = 3.6W
  2. Samsung NF310, no Xorg, 1366x768, RAMdisk, 2.6.36 = 5.0W
  3. Samsung NF310, no Xorg, RAMdisk, 2.6.36, display OFF, charging N900 via USB = 6.0W
  4. Compaq 6910P, no Xorg, no wifi = 12.2W
  5. (~2011 Jan)
  6. Lenovo T420s, Xorg 1600x900, WiFi, IntelSSD 525, additional RAM (12G) =~ 10.4 W

| PowerTOP Limbo - How Low Can You Go? | | 2014.03.17-22:45.00

RAID1 vs MIRROR in LVM ( --type SegmentType )

- RAID1 is new reimplementation of mirror - MIRROR is legacy - tools use mirror as default ( remember to change it because: )
  1. New implementation re-uses linux software raid infrastructure ( better tuned, widely used )
  2. raid1 handles transient errors, mirror doesn't
  3. mirror uses mirrorlog/corelog - single intent log, kept either in memory or on single physical disk, raid1 uses redundant bitmap area for each log, resulting in fault tolerance.
  4. raid1 doesn't work with clustered LVM.

| RAID1 vs MIRROR in LVM ( --type SegmentType ) | | 2014.01.24-09:56.00

Using lvm mirrors

host0328:/home/eyck# lvs -a -o +devices|grep puppet
  puppet                 s    -wi-ao--   1.00g                                            /dev/sdb2(927960)        

host0328:/home/eyck# pvscan 
  PV /dev/sda5           VG s    lvm2 [1.82 TiB / 8.35 GiB free]
  PV /dev/sdb2           VG s    lvm2 [3.63 TiB / 998.04 GiB free]
  Total: 3 [7.27 TiB] / in use: 3 [7.27 TiB] / in no VG: 0 [0   ]

host0328:/home/eyck# lvconvert -m1 s/puppet
  s/puppet: Converted: 0.0%
  s/puppet: Converted: 15.6%
  s/puppet: Converted: 33.6%
  s/puppet: Converted: 51.2%
  s/puppet: Converted: 67.6%
  s/puppet: Converted: 84.8%
  s/puppet: Converted: 100.0%


host0328:/home/eyck# lvs -a -o +devices|grep puppet
  puppet                 s    mwi-aom-   1.00g                         puppet_mlog 100.00         puppet_mimage_0(0),puppet_mimage_1(0)
  [puppet_mimage_0]      s    iwi-aom-   1.00g                                                  /dev/sdb2(927960)                
  [puppet_mimage_1]      s    iwi-aom-   1.00g                                                  /dev/sda5(204530)                
  [puppet_mlog]          s    lwi-aom-   4.00m                                                  /dev/sdb2(363599)        


host0328:/home/eyck# lvconvert -i 1 -m0 s/puppet
  Logical volume puppet converted.

host0328:/home/eyck# lvs -a -o +devices|grep puppet
  puppet                 s    -wi-ao--   1.00g                                            /dev/sdb2(927960)  
host0328:/home/eyck# lvconvert -i 1 --type mirror -m1 s/puppet
  s/puppet: Converted: 0.0%
  s/puppet: Converted: 1.2%
  s/puppet: Converted: 2.3%
  s/puppet: Converted: 3.5%
  s/puppet: Converted: 5.5%
  s/puppet: Converted: 6.6%
  s/puppet: Converted: 8.2%
  s/puppet: Converted: 10.2%
  s/puppet: Converted: 11.3%
  s/puppet: Converted: 12.5%
  s/puppet: Converted: 14.1%
  s/puppet: Converted: 14.8%
  s/puppet: Converted: 16.4%
  s/puppet: Converted: 17.2%
  s/puppet: Converted: 18.4%
  s/puppet: Converted: 19.5%
  s/puppet: Converted: 21.1%
  s/puppet: Converted: 23.0%
  s/puppet: Converted: 24.6%
  s/puppet: Converted: 25.8%
  s/puppet: Converted: 26.6%
  s/puppet: Converted: 28.1%
  s/puppet: Converted: 29.3%
  s/puppet: Converted: 31.2%
  s/puppet: Converted: 32.4%
  s/puppet: Converted: 34.0%
  s/puppet: Converted: 35.2%
  s/puppet: Converted: 36.3%
  s/puppet: Converted: 37.9%
  s/puppet: Converted: 38.7%
  s/puppet: Converted: 39.8%
  s/puppet: Converted: 41.0%
  s/puppet: Converted: 42.2%
  s/puppet: Converted: 43.8%
  s/puppet: Converted: 44.9%
  s/puppet: Converted: 46.1%
  s/puppet: Converted: 46.9%
  s/puppet: Converted: 48.0%
  s/puppet: Converted: 49.2%
  s/puppet: Converted: 50.4%
  s/puppet: Converted: 51.6%
  s/puppet: Converted: 52.0%
  s/puppet: Converted: 53.5%
  s/puppet: Converted: 54.3%
  s/puppet: Converted: 55.5%
  s/puppet: Converted: 56.6%
  s/puppet: Converted: 58.2%
  s/puppet: Converted: 59.8%
  s/puppet: Converted: 60.9%
  s/puppet: Converted: 62.5%
  s/puppet: Converted: 63.7%
  s/puppet: Converted: 64.8%
  s/puppet: Converted: 66.0%
  s/puppet: Converted: 67.2%
  s/puppet: Converted: 68.4%
  s/puppet: Converted: 69.5%
  s/puppet: Converted: 70.3%
  s/puppet: Converted: 71.1%
  s/puppet: Converted: 72.3%
  s/puppet: Converted: 73.0%
  s/puppet: Converted: 73.8%
  s/puppet: Converted: 75.4%
  s/puppet: Converted: 77.3%
  s/puppet: Converted: 77.7%
  s/puppet: Converted: 78.9%
  s/puppet: Converted: 80.1%
  s/puppet: Converted: 80.9%
  s/puppet: Converted: 82.0%
  s/puppet: Converted: 82.8%
  s/puppet: Converted: 83.6%
  s/puppet: Converted: 84.8%
  s/puppet: Converted: 85.5%
  s/puppet: Converted: 86.7%
  s/puppet: Converted: 87.5%
  s/puppet: Converted: 88.3%
  s/puppet: Converted: 89.1%
  s/puppet: Converted: 89.8%
  s/puppet: Converted: 91.0%
  s/puppet: Converted: 91.4%
  s/puppet: Converted: 92.6%
  s/puppet: Converted: 93.4%
  s/puppet: Converted: 94.5%
  s/puppet: Converted: 96.1%
  s/puppet: Converted: 96.5%
  s/puppet: Converted: 98.0%
  s/puppet: Converted: 99.2%
  s/puppet: Converted: 100.0%

host0328:/home/eyck# lvs -a -o +devices|grep puppet
  puppet                 s    mwi-aom-   1.00g                         puppet_mlog 100.00         puppet_mimage_0(0),puppet_mimage_1(0)
  [puppet_mimage_0]      s    iwi-aom-   1.00g                                                  /dev/sdb2(927960)                
  [puppet_mimage_1]      s    iwi-aom-   1.00g                                                  /dev/sda5(204530)                
  [puppet_mlog]          s    lwi-aom-   4.00m                                                  /dev/sdb2(363599)   

host0328:/home/eyck# lvconvert -i 1 --type raid1 -m1 s/puppet
host0328:/home/eyck# lvs -a -o +devices|grep puppet
  puppet                 s    rwi-aom-   1.00g                              62.89         puppet_rimage_0(0),puppet_rimage_1(0)
  [puppet_rimage_0]      s    Iwi-aor-   1.00g                                            /dev/sdb2(927960)                
  [puppet_rimage_1]      s    Iwi-aor-   1.00g                                            /dev/sda5(204531)                
  [puppet_rmeta_0]       s    ewi-aor-   4.00m                                            /dev/sdb2(814855)                
  [puppet_rmeta_1]       s    ewi-aor-   4.00m                                            /dev/sda5(204530)  

| Using lvm mirrors | | 2014.01.24-09:38.00

Package XX:amd64 cannot be configured because XX:i386 is at a different version

 package libcurl3:amd64 7.26.0-1+wheezy3 cannot be configured because libcurl3:i386 is at a different version (7.26.0-1+wheezy2)                                                                                                                                                                                                                                                                                                      
dpkg: dependency problems prevent configuration of libcurl3-gnutls:amd64:                                                                                                                                                                                                                                                                                                                                                             
 libcurl3-gnutls:amd64 depends on libgnutls26 (>= 2.12.17-0); however:                                                                                                                                                                                                                                                                                                                                                                
  Package libgnutls26:amd64 is not configured yet.                                                                                                                                                                                                                                                                                                                                                                                    
 libcurl3-gnutls:amd64 depends on libgssapi-krb5-2 (>= 1.10+dfsg~); however:                                                                                                                                                                                                                                                                                                                                                          
  Package libgssapi-krb5-2:amd64 is not configured yet.                                                                                                                                                                                                                                                                                                                                                                               
 libcurl3-gnutls:amd64 depends on libldap-2.4-2 (>= 2.4.7); however:                                                                                                                                                                                                                                                                                                                                                                  
  Package libldap-2.4-2:amd64 is not configured yet.                                                                                                                                                                                                                                                                                                                                                                                  
 libcurl3-gnutls:amd64 depends on librtmp0 (>= 2.3); however:                                                                                                                                                                                                                                                                                                                                                                         
  Package librtmp0:amd64 is not configured yet.                                                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                                                                                      
dpkg: error processing libcurl3-gnutls:amd64 (--configure):                                                                                                                                                                                                                                                                                                                                                                           
 dependency problems - leaving unconfigured                                                                                                                                                                                                                                                                                                                                                                                           
dpkg: error processing libxext6:amd64 (--configure):                                                                                                                                                                                                                                                                                                                                                                                  
 package libxext6:amd64 2:1.3.1-2+deb7u1 cannot be configured because libxext6:i386 is at a different version (2:1.3.1-2)                                                                                                                                                                                                                                                                                                             
dpkg: dependency problems prevent configuration of openssh-client:                                                                                                                                                                                                                                                                                                                                                                    
 openssh-client depends on libgssapi-krb5-2 (>= 1.10+dfsg~); however:                                                                                                                                                                                                                                                                                                                                                                 
  Package libgssapi-krb5-2:amd64 is not configured yet.        

On per-package basis, it can be fixed by removing, and then re-installing given package. If the problem is wide-spread, it may be caused by this:

root@wheezy:~# dpkg --print-foreign-architectures
root@wheezy:~# dpkg --print-architecture         
amd64
IE, system is multi-arch, but thinks that it's amd64-only. the solution is this:
dpkg --add-architecture i386
apt-get update

| Package XX:amd64 cannot be configured because XX:i386 is at a different version | | 2013.07.19-17:15.00

Emerge

localhost:/# emerge default/linux/amd64/13.0

!!! Your current profile is deprecated and not supported anymore.
!!! Use eselect profile to update your profile.
!!! Please upgrade to the following profile if possible:
        default/linux/amd64/13.0

!!! 'default/linux/amd64/13.0' is not a valid package atom.
!!! Please check ebuild(5) for full details.
localhost:/# ls -l /etc/portage/make.profile
ls: cannot access /etc/portage/make.profile: No such file or directory
localhost:/# ls -l /etc/portage/            
total 16
drwxr-xr-x 2 root root 4096 Feb  6  2012 bin
-rw-r--r-- 1 root root  400 Jan  8 18:24 package.use
drwxr-xr-x 2 root root 4096 Feb  6  2012 postsync.d
drwxr-xr-x 3 root root 4096 Sep 24  2011 savedconfig


localhost / # eselect  news  read 9
2013-02-10-new-13-profiles
  Title                     New 13.0 profiles and deprecation of 10.0 profiles
  Author                    Andreas K. Huettel <dilfridge@gentoo.org>
  Posted                    2013-02-10
  Revision                  1

We have generated a new set of profiles for Gentoo installation. These are now 
called 13.0 instead of 10.0. Everyone should upgrade as soon as possible (but 
please make sure sys-apps/portage is updated to current stable *before* you
switch profile).
This brings (nearly) no user-visible changes. Some new files have been added
to the profile directories that make it possible for the developers to do more 
fine-grained use flag masking (see PMS-5 for the details), and this formally 
requires a new profile tree with EAPI=5.


localhost:/# eselect profile list
Available profile symlink targets:
  [1]   default/linux/amd64/13.0
  [2]   default/linux/amd64/13.0/selinux
  [3]   default/linux/amd64/13.0/desktop
  [4]   default/linux/amd64/13.0/desktop/gnome
  [5]   default/linux/amd64/13.0/desktop/kde
  [6]   default/linux/amd64/13.0/developer
  [7]   default/linux/amd64/13.0/no-multilib
  [8]   default/linux/amd64/13.0/x32
  [9]   hardened/linux/amd64
  [10]  hardened/linux/amd64/selinux
  [11]  hardened/linux/amd64/no-multilib
  [12]  hardened/linux/amd64/no-multilib/selinux
  [13]  hardened/linux/uclibc/amd64

localhost:/# eselect profile set 1
localhost:/# emerge --sync

....

xfce-extra/xfce4-xkb-plugin/

Number of files: 164779
Number of files transferred: 34766
Total file size: 281.68M bytes
Total transferred file size: 81.40M bytes
Literal data: 81.40M bytes
Matched data: 0 bytes
File list size: 3.89M
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 708.22K
Total bytes received: 86.95M

sent 708.22K bytes  received 86.95M bytes  410.60K bytes/sec
total size is 281.68M  speedup is 3.21

Performing Global Updates:
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  #='/var/db update'  @='/var/db move'
  s='/var/db SLOT move'  %='binary move'  S='binary SLOT move'
  p='update /etc/portage/package.*'
/usr/portage/profiles/updates/1Q-2013..................................................................................................
/usr/portage/profiles/updates/2Q-2013..........



 * IMPORTANT: 11 config files in '/etc' need updating.
 * See the CONFIGURATION FILES section of the emerge
 * man page to learn how to update config files.

 * An update to portage is available. It is _highly_ recommended
 * that you update portage now, before any other packages are updated.

 * To update portage, run 'emerge portage' now.


 * IMPORTANT: 4 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.



| Emerge | | 2013.04.10-16:49.00

Desecuring your nagios

 dpkg-statoverride --update --add root root 4755 /usr/lib/nagios/plugins/check_icmp 

| Desecuring your nagios | | 2013.04.04-13:56.00

lxc-attach is in da haus...

Woot:
host3# lxc-attach -e --name services  -- /bin/sh
# hostname
services

| lxc-attach is in da haus... | | 2013.04.03-16:14.00

Getting Started With Knife


ghost eyck 17:48 ~/.chef >knife configure -i 
Overwrite /home/eyck/.chef/knife.rb? (Y/N) Y
Please enter the chef server URL: [http://pokurcz:4000] http://chef.safo.in:4000 
Please enter a clientname for the new client: [eyck] 
Please enter the existing admin clientname: [chef-webui] 
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem] 
Please enter the validation clientname: [chef-validator] 
Please enter the location of the validation key: [/etc/chef/validation.pem] 
Please enter the path to a chef repository (or leave blank): 
Creating initial API user...
Created client[eyck]
Configuration file written to /home/eyck/.chef/knife.rb


knife bootstrap git.safo.in
Bootstrapping Chef on git.safo.in
Failed to authenticate root - trying password auth
Enter your password:
git.safo.in --2013-02-26 19:41:00--  http://opscode.com/chef/install.sh
git.safo.in Resolving opscode.com...
git.safo.in 184.106.28.82
git.safo.in Connecting to opscode.com|184.106.28.82|:80...
git.safo.in connected.
git.safo.in HTTP request sent, awaiting response...
git.safo.in 301 Moved Permanently
git.safo.in Location: http://www.opscode.com/chef/install.sh [following]
git.safo.in --2013-02-26 19:41:00--  http://www.opscode.com/chef/install.sh
git.safo.in Resolving www.opscode.com...
git.safo.in 184.106.28.83
git.safo.in Connecting to www.opscode.com|184.106.28.83|:80...
git.safo.in connected.
git.safo.in HTTP request sent, awaiting response...
git.safo.in 200 OK
git.safo.in Length: 6470 (6.3K) [application/x-sh]
git.safo.in Saving to: āSTDOUTā
git.safo.in
 0% [                                       ] 0           --.-K/s
100%[======================================>] 6,470       --.-K/s   in 0.1s
git.safo.in
git.safo.in 2013-02-26 19:41:01 (47.7 KB/s) - written to stdout [6470/6470]
git.safo.in
git.safo.in Downloading Chef 10.12.0 for debian...
git.safo.in Installing Chef 10.12.0
git.safo.in Selecting previously deselected package chef.
git.safo.in (Reading database ...
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 17135 files and directories currently installed.)
git.safo.in Unpacking chef (from .../chef_10.12.0_amd64.deb) ...
git.safo.in Setting up chef (10.12.0-1.debian.6.0.4) ...
git.safo.in Thank you for installing Chef!
git.safo.in [Tue, 26 Feb 2013 19:41:35 +0100] INFO: *** Chef 10.12.0 ***
git.safo.in [Tue, 26 Feb 2013 19:41:36 +0100] INFO: Client key /etc/chef/client.pem is not present - registering
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: HTTP Request Returned 404 Not Found: Cannot load node git
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Setting the run_list to [] from JSON
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Run List is []
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Run List expands to []
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Starting Chef Run for git
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Running start handlers
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Start handlers complete.
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Loading cookbooks []
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] WARN: Node git has an empty run list.
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Chef Run complete in 0.182019967 seconds
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Running report handlers
git.safo.in [Tue, 26 Feb 2013 19:41:37 +0100] INFO: Report handlers complete

knife client list|grep git
  git

| Getting Started With Knife | | 2013.02.26-19:43.00

Adding write-intent bitmap to help with rebuild times.

surfer root 9:33 /etc/firewall/up.d #cat /proc/mdstat 
Personalities : [raid1] 
md2 : active raid1 sda6[0] sdb6[1]
      385744640 blocks [2/2] [UU]
      
md1 : active raid1 sda5[0] sdb5[1]
      99996480 blocks [2/2] [UU]
      
unused devices: <none>
surfer root 12:37 /etc/firewall/up.d #time mdadm --grow --bitmap=internal /dev/md1
mdadm --grow --bitmap=internal /dev/md1  0.00s user 0.01s system 5% cpu 0.189 total
surfer root 12:37 /etc/firewall/up.d #time mdadm --grow --bitmap=internal /dev/md2
mdadm --grow --bitmap=internal /dev/md2  0.00s user 0.01s system 4% cpu 0.150 total
surfer root 12:37 /etc/firewall/up.d #cat /proc/mdstat                            
Personalities : [raid1] 
md2 : active raid1 sda6[0] sdb6[1]
      385744640 blocks [2/2] [UU]
      bitmap: 3/3 pages [12KB], 65536KB chunk

md1 : active raid1 sda5[0] sdb5[1]
      99996480 blocks [2/2] [UU]
      bitmap: 1/1 pages [4KB], 65536KB chunk


| Adding write-intent bitmap to help with rebuild times. | | 2013.02.22-12:39.00

Virtual Serial Port is currently in use by another session.


</>hpiLO-> vsp

status=2
status_tag=COMMAND PROCESSING FAILED
error_tag=COMMAND ERROR-UNSPECIFIED
Tue Jan 26 16:28:54 1943

Virtual Serial Port is currently in use by another session.




</>hpiLO-> stop /system1/oemhp_vsp1

status=0
status_tag=COMMAND COMPLETED
Tue Jan 26 16:29:22 1943





</>hpiLO-> start /system1/oemhp_vsp1

Virtual Serial Port Active: COM1

Starting virtual serial port.
Press 'ESC (' to return to the CLI Session.

| Virtual Serial Port is currently in use by another session. | | 2013.01.25-16:30.00

EnhanceIO linux

#./eio create  -d /dev/s/test -s /dev/s/eiotst -p lru -c CACHE
Cache Name       : CACHE
Source Device    : /dev/s/test
SSD Device       : /dev/s/eiotst
Policy           : lru
Mode             : Write Through
Block Size       : 4096
Associativity     : 256
# ./eio  info
Cache Name       : CACHE
Source Device    : /dev/s/test
SSD Device       : /dev/s/eiotst
Policy           : lru
Mode             : Write Through
Block Size       : 4096
Associativity     : 256

For more information look at /proc/enhanceio/<cache_name>/config
cat /proc/enhanceio/CACHE/stats
reads                                 0
writes                                0
read_hits                             0
read_hit_pct                          0
write_hits                            0
write_hit_pct                         0
dirty_write_hits                      0
dirty_write_hit_pct                   0
cached_blocks                         0
rd_replace                            0
wr_replace                            0
noroom                                0
cleanings                             0
md_write_dirty                        0
md_write_clean                        0
md_ssd_writes                         0
do_clean                              0
nr_blocks                        260864
nr_dirty                              0
nr_sets                            1019
clean_index                           0
uncached_reads                        0
uncached_writes                       0
uncached_map_size                     0
uncached_map_uncacheable              0
disk_reads                            0
disk_writes                           0
ssd_reads                             0
ssd_writes                            0
ssd_readfills                         0
ssd_readfill_unplugs                  0
readdisk                              0
writedisk                             0
readcache                             0
readfill                              0
writecache                            0
readcount                             0
writecount                            0
kb_reads                              0
kb_writes                             0
rdtime_ms                             0
wrtime_ms                             0


# dd if=/dev/zero of=TST.TODEL bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.285829 s, 367 MB/s
root@ghost2:/fs/v/test# cat /proc/enhanceio/CACHE/stats
reads                              1232
writes                           123200
read_hits                             0
read_hit_pct                          0
write_hits                            0
write_hit_pct                         0
dirty_write_hits                      0
dirty_write_hit_pct                   0
cached_blocks                     15554
rd_replace                            0
wr_replace                            0
noroom                                0
cleanings                             0
md_write_dirty                        0
md_write_clean                        0
md_ssd_writes                         0
do_clean                              0
nr_blocks                        260864
nr_dirty                              0
nr_sets                            1019
clean_index                           0
uncached_reads                      154
uncached_writes                     121
uncached_map_size                     0
uncached_map_uncacheable              0
disk_reads                         1232
disk_writes                      123200
ssd_reads                             0
ssd_writes                       124432
ssd_readfills                      1232
ssd_readfill_unplugs                113
readdisk                            154
writedisk                           154
readcache                             0
readfill                            154
writecache                        15554
readcount                           154
writecount                          121
kb_reads                            616
kb_writes                         61600
rdtime_ms                          1030
wrtime_ms                        104060

| EnhanceIO linux | | 2013.01.20-15:25.00

Rockbox taking 10-12s to swtich between songs

Problem:
$ id3v2 -l song.mp3

id3v1 tag song.mp3:
Title  : Song Title                  Artist: singer
Album  : Album Name  Year: 2013, Genre: Unknown (255)
Comment:                                 Track: 2
id3v2 tag info song.mp3
TALB (Album/Movie/Show title): Long Song Title
TPE1 (Lead performer(s)/Soloist(s)): singer
TCON (Content type): Chart Hits (255)
TIT2 (Title/songname/content description): Song Title
TRCK (Track number/Position in set): 2
TYER (Year): 2013
APIC (Attached picture): ()[, 3]: image/jpeg, 371742 bytes
300k jpg for album art seems quite problematic for rockbox (although native Sansa firmware processes it very quickly ) Solution (stripping all id3v2 information, mainly to get rid off APIC)
id3v2 -d *.mp3

| Rockbox taking 10-12s to swtich between songs | | 2013.01.12-19:11.00

PPC64 chroot on debian powerpc ( 32bit )


# debootstrap --arch=ppc64 wheezy /fs/btr/ppc64
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id 9FED2BCBDCD29CDF762678CBAED4B06F473041FA)
E: Invalid Release file, no entry for main/binary-ppc64/Packages



root@powerdeb:/fs/btr/ppc64# debootstrap --no-check-gpg --arch=ppc64 --variant=buildd sid /fs/btr/ppc64 http://ftp.de.debian.org/debian-ports
I: Retrieving InRelease
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional required dependencies: insserv libbz2-1.0 libdb5.1 libsemanage-common libsemanage1 libslang2 libustr-1.0-1 
I: Found additional base dependencies: binutils bzip2 cpp cpp-4.6 debian-archive-keyring dpkg-dev g++ g++-4.6 gcc gcc-4.6 gcc-4.6-base gnupg gpgv libapt-pkg4.12 libc-dev-bin libc6-dev libclass-isa-perl libdpkg-perl libgdbm3 libgmp10 libgomp1 libmpc2 libmpfr4 libreadline6 libstdc++6 libstdc++6-4.6-dev libswitch-perl libtimedate-perl libusb-0.1-4 linux-libc-dev make patch perl perl-modules readline-common 
I: Checking component main on http://ftp.de.debian.org/debian-ports...
I: Retrieving debconf-i18n
I: Validating debconf-i18n
I: Retrieving debconf
I: Validating debconf
I: Retrieving debian-archive-keyring
I: Validating debian-archive-keyring
I: Retrieving dpkg-dev
I: Validating dpkg-dev
I: Retrieving libclass-isa-perl
I: Validating libclass-isa-perl
I: Retrieving libdpkg-perl
I: Validating libdpkg-perl
I: Retrieving libpam-runtime
I: Validating libpam-runtime
I: Retrieving libsemanage-common
I: Validating libsemanage-common
I: Retrieving libswitch-perl
I: Validating libswitch-perl
I: Retrieving libtext-wrapi18n-perl
I: Validating libtext-wrapi18n-perl
I: Retrieving libtimedate-perl
I: Validating libtimedate-perl
I: Retrieving lsb-base
I: Validating lsb-base
I: Retrieving ncurses-base
I: Validating ncurses-base
I: Retrieving perl-modules
I: Validating perl-modules
I: Retrieving readline-common
I: Validating readline-common
I: Retrieving sensible-utils
I: Validating sensible-utils
I: Retrieving sysv-rc
I: Validating sysv-rc
I: Retrieving tzdata
I: Validating tzdata
I: Retrieving apt
I: Validating apt
I: Retrieving base-files
I: Validating base-files
I: Retrieving base-passwd
I: Validating base-passwd
I: Retrieving bash
I: Validating bash
I: Retrieving binutils
I: Validating binutils
I: Retrieving bsdutils
I: Validating bsdutils
I: Retrieving build-essential
I: Validating build-essential
I: Retrieving bzip2
I: Validating bzip2
I: Retrieving coreutils

| PPC64 chroot on debian powerpc ( 32bit ) | | 2013.01.11-11:55.00

avconv using altivec

avconv version 0.8.4-6:0.8.4-1, Copyright (c) 2000-2012 the Libav developers
  built on Oct 23 2012 07:26:37 with gcc 4.6.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DSC_0014.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 537331968
    compatible_brands: qt  niko
    creation_time   : 2012-12-24 21:10:32
  Duration: 00:04:58.68, start: 0.000000, bitrate: 19655 kb/s
    Stream #0.0(eng): Video: h264 (High), yuvj420p, 1920x1080 [PAR 1:1 DAR 16:9], 18111 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
    Metadata:
      creation_time   : 2012-12-24 21:10:32
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Metadata:
      creation_time   : 2012-12-24 21:10:32
[buffer @ 0x104ad3e0] w:1920 h:1080 pixfmt:yuvj420p
[libx264 @ 0x104aab20] using SAR=1/1
[libx264 @ 0x104aab20] using cpu capabilities: Altivec
[libx264 @ 0x104aab20] profile Main, level 4.0
[libx264 @ 0x104aab20] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=84 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=1:1.00
Output #0, matroska, to '014.mkv':
  Metadata:
    major_brand     : qt
    minor_version   : 537331968
    compatible_brands: qt  niko
    creation_time   : 2012-12-24 21:10:32
    encoder         : Lavf53.21.0
    Stream #0.0(eng): Video: libx264, yuvj420p, 1920x1080 [PAR 1:1 DAR 16:9], q=-1--1, 1k tbn, 25 tbc
    Metadata:
      creation_time   : 2012-12-24 21:10:32
    Stream #0.1(eng): Audio: libvorbis, 48000 Hz, 2 channels, s16
    Metadata:
      creation_time   : 2012-12-24 21:10:32
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (pcm_s16le -> libvorbis)
Press ctrl-c to stop encoding
frame= 7467 fps=  7 q=-17846560.0 Lsize=  349032kB time=298.64 bitrate=9574.3kbits/s
video:345989kB audio:2857kB global headers:4kB muxing overhead 0.052394%
[libx264 @ 0x104aab20] frame I:77    Avg QP:23.22  size: 99434
[libx264 @ 0x104aab20] frame P:5133  Avg QP:24.98  size: 57773
[libx264 @ 0x104aab20] frame B:2257  Avg QP:27.19  size: 22191
[libx264 @ 0x104aab20] consecutive B-frames: 48.3% 26.2% 23.7%  1.8%
[libx264 @ 0x104aab20] mb I  I16..4: 46.9%  0.0% 53.1%
[libx264 @ 0x104aab20] mb P  I16..4:  9.9%  0.0%  8.5%  P16..4: 61.8% 11.6%  5.6%  0.0%  0.0%    skip: 2.7%
[libx264 @ 0x104aab20] mb B  I16..4:  0.9%  0.0%  0.9%  B16..8: 42.7%  3.5%  0.6%  direct:19.6%  skip:31.8%  L0:45.8% L1:50.3% BI: 3.9%
[libx264 @ 0x104aab20] coded y,uvDC,uvAC intra: 45.4% 97.5% 77.4% inter: 20.7% 75.2% 24.6%
[libx264 @ 0x104aab20] i16 v,h,dc,p: 26% 23% 15% 36%
[libx264 @ 0x104aab20] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 22% 23%  6%  7%  6%  7%  5%  5%
[libx264 @ 0x104aab20] i8c dc,h,v,p: 54% 17% 16% 13%
[libx264 @ 0x104aab20] Weighted P-Frames: Y:2.2% UV:1.4%
[libx264 @ 0x104aab20] ref P L0: 74.3% 11.8%  8.9%  4.9%  0.1%
[libx264 @ 0x104aab20] ref B L0: 94.7%  5.3%
[libx264 @ 0x104aab20] kb/s:9489.54

real    17m23.482s
user    149m36.511s
sys     1m31.710s
root@powerdeb:/fs/btr/tmp/2012-12-wigilia# ls
014.mkv  014.mp4  DSC_0014.MOV  DSC_0015.MOV
root@powerdeb:/fs/btr/tmp/2012-12-wigilia# time nice avconv -i DSC_0015.MOV 015.mkv
avconv version 0.8.4-6:0.8.4-1, Copyright (c) 2000-2012 the Libav developers
  built on Oct 23 2012 07:26:37 with gcc 4.6.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DSC_0015.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 537331968
    compatible_brands: qt  niko
    creation_time   : 2012-12-24 21:18:22
  Duration: 00:02:25.56, start: 0.000000, bitrate: 19751 kb/s
    Stream #0.0(eng): Video: h264 (High), yuvj420p, 1920x1080 [PAR 1:1 DAR 16:9], 18201 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
    Metadata:
      creation_time   : 2012-12-24 21:18:22
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Metadata:
      creation_time   : 2012-12-24 21:18:22
[buffer @ 0x1016f8e0] w:1920 h:1080 pixfmt:yuvj420p
[libx264 @ 0x1016ab40] using SAR=1/1
[libx264 @ 0x1016ab40] using cpu capabilities: Altivec
[libx264 @ 0x1016ab40] profile Main, level 4.0
[libx264 @ 0x1016ab40] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=84 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=1:1.00
Output #0, matroska, to '015.mkv':
  Metadata:
    major_brand     : qt
    minor_version   : 537331968
    compatible_brands: qt  niko
    creation_time   : 2012-12-24 21:18:22
    encoder         : Lavf53.21.0
    Stream #0.0(eng): Video: libx264, yuvj420p, 1920x1080 [PAR 1:1 DAR 16:9], q=-1--1, 1k tbn, 25 tbc
    Metadata:
      creation_time   : 2012-12-24 21:18:22
    Stream #0.1(eng): Audio: libvorbis, 48000 Hz, 2 channels, s16
    Metadata:
      creation_time   : 2012-12-24 21:18:22
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (pcm_s16le -> libvorbis)
Press ctrl-c to stop encoding

| avconv using altivec | | 2013.01.08-13:02.00

find -delete vs find -print0 | xargs

time nice find /path/ -mtime -print0 > /var/tmp/TODEL.file

real    1199m23.243s
...

time nice cat /var/tmp/TODEL.file |xargs -0 -L 50 rm

real    25m43.463s
user    0m9.105s
sys     4m34.465s

| find -delete vs find -print0 | xargs | | 2012.08.24-13:22.00

Day of Week calculation in tight loop

It seems that converting from time to localtime is the most expensive:
perl -le 'use POSIX qw(strftime);use Benchmark qw(:all);use Date::Calc qw(:all);timethis(1000000,"(\$d,\$m,\$y)=Today();\$dow=Day_of_Week(\$d,\$m,\$y)");        timethis(1000000,"\$q=strftime(\"%a\",localtime())");                           timethis(1000000,"\$q=strftime(\"%u\",localtime())");                           timethis(1000000,"\$q=strftime(\"%w\",localtime())");                           timethis(1000000,"\$q=localtime");                                              timethis(1000000,"\$q=time");   '
timethis 1000000: 20 wallclock secs (17.12 usr +  1.85 sys = 18.97 CPU) @ 52714.81/s (n=1000000)

timethis 1000000:  7 wallclock secs ( 3.42 usr +  3.48 sys =  6.90 CPU) @ 144927.54/s (n=1000000)

timethis 1000000:  7 wallclock secs ( 3.26 usr +  3.72 sys =  6.98 CPU) @ 143266.48/s (n=1000000)

timethis 1000000:  7 wallclock secs ( 3.40 usr +  3.60 sys =  7.00 CPU) @ 142857.14/s (n=1000000)

timethis 1000000:  5 wallclock secs ( 2.47 usr +  1.46 sys =  3.93 CPU) @ 254452.93/s (n=1000000)

timethis 1000000:  0 wallclock secs ( 0.25 usr +  0.38 sys =  0.63 CPU) @ 1587301.59/s (n=1000000)

#!/usr/bin/perl
use strict;
use warnings;


use POSIX qw(strftime);
use Benchmark qw(:all);
use Date::Calc qw(:all);

#perl -le 'use Date::Calc qw(:all);print  Date_to_Time(2012,1,2, 0,0,0);
#'
#1325462400


print "DateCalc:\n";
timethis(1000000,"(\$d,\$m,\$y)=Today();\$dow=Day_of_Week(\$d,\$m,\$y)");
print "Localtime:\n";
timethis(2000000,"\$q=strftime(\"%a\",localtime())");
timethis(2000000,"\$q=strftime(\"%u\",localtime())");
timethis(2000000,"\$q=strftime(\"%w\",localtime())");

timethis(2000000,"\$q=localtime");
print "Time:\n";
timethis(2000000,"\$q=time");
timethis(2000000,"\$q=time;\$mm=\$m;\$m=(( \$q-1325376000 ) % 86400 )% 7;\$mm=\$m; " );



DateCalc:
timethis 1000000: 19 wallclock secs (16.64 usr +  1.79 sys = 18.43 CPU) @ 54259.36/s (n=1000000)
Localtime:
timethis 2000000: 14 wallclock secs ( 6.27 usr +  7.29 sys = 13.56 CPU) @ 147492.63/s (n=2000000)
timethis 2000000: 14 wallclock secs ( 6.54 usr +  7.04 sys = 13.58 CPU) @ 147275.41/s (n=2000000)
timethis 2000000: 14 wallclock secs ( 6.90 usr +  6.77 sys = 13.67 CPU) @ 146305.78/s (n=2000000)
timethis 2000000:  7 wallclock secs ( 4.64 usr +  3.08 sys =  7.72 CPU) @ 259067.36/s (n=2000000)
Time:
timethis 2000000:  1 wallclock secs ( 0.39 usr +  0.79 sys =  1.18 CPU) @ 1694915.25/s (n=2000000)
timethis 2000000:  2 wallclock secs ( 1.24 usr +  0.62 sys =  1.86 CPU) @ 1075268.82/s (n=2000000)


| Day of Week calculation in tight loop | | 2012.08.23-12:59.00

x11perf


Desktop:
Radeon HD 4650, Core i5-750
kernel: 3.5.2, xorg: 1.7.7,xserver-xorg-video-radeon: 1:6.14.3-2
 x11perf -aa10text
x11perf - X11 performance program, version 1.2
The X.Org Foundation server version 11104000 on :0.0
from pokurcz
Tue Aug 21 12:52:37 2012

Sync time adjustment is 0.1925 msecs.

4800000 reps @   0.0011 msec (882000.0/sec): Char in 80-char aa line (Charter 10)
4800000 reps @   0.0009 msec (1090000.0/sec): Char in 80-char aa line (Charter 10)
4800000 reps @   0.0012 msec (848000.0/sec): Char in 80-char aa line (Charter 10)
q4800000 reps @   0.0016 msec (642000.0/sec): Char in 80-char aa line (Charter 10)
4800000 reps @   0.0011 msec (905000.0/sec): Char in 80-char aa line (Charter 10)
24000000 trep @   0.0012 msec (849000.0/sec): Char in 80-char aa line (Charter 10)


Laptop:
Sandybridge Mobile (GT2+),Core i5-2540M
kernel: 3.5.2, xorg: 1.7.7, xserver-xorg-video-intel              2:2.19.0-5
x11perf --aa10text
        -> -aa10text    Char in 80-char aa line (Charter 10)
x11perf - X11 performance program, version 1.2
The X.Org Foundation server version 11203000 on :0.0
from ghoul
Tue Aug 21 12:51:32 2012

Sync time adjustment is 0.0546 msecs.

40000000 reps @   0.0001 msec (6770000.0/sec): Char in 80-char aa line (Charter 10)
40000000 reps @   0.0001 msec (6780000.0/sec): Char in 80-char aa line (Charter 10)
40000000 reps @   0.0001 msec (6780000.0/sec): Char in 80-char aa line (Charter 10)
40000000 reps @   0.0001 msec (6770000.0/sec): Char in 80-char aa line (Charter 10)
40000000 reps @   0.0001 msec (6770000.0/sec): Char in 80-char aa line (Charter 10)
200000000 trep @   0.0001 msec (6780000.0/sec): Char in 80-char aa line (Charter 10)

Desktop:

Radeon HD 4200, Athlon X2 240
kernel: 3.5.0, xorg: 1.7.7,xserver-xorg-video-radeon: 1:6.14.3-2

x11perf --aa10text
        -> -aa10text    Char in 80-char aa line (Charter 10)
x11perf - X11 performance program, version 1.2
The X.Org Foundation server version 11104000 on :0
from photon2
Tue Aug 21 13:23:47 2012

Sync time adjustment is 0.2559 msecs.

4000000 reps @   0.0010 msec (1010000.0/sec): Char in 80-char aa line (Charter 10)
4000000 reps @   0.0008 msec (1210000.0/sec): Char in 80-char aa line (Charter 10)
4000000 reps @   0.0008 msec (1210000.0/sec): Char in 80-char aa line (Charter 10)
4000000 reps @   0.0008 msec (1200000.0/sec): Char in 80-char aa line (Charter 10)
4000000 reps @   0.0009 msec (1070000.0/sec): Char in 80-char aa line (Charter 10)
20000000 trep @   0.0009 msec (1130000.0/sec): Char in 80-char aa line (Charter 10)



| x11perf | | 2012.08.21-13:23.00

Linux bridging loosing packets

root@upcg:/# tcpdump  -n -i eth0 port 3389 or port 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:09:49.980926 IP iptwo2.22 > ipone1.39951: Flags [P.], seq 2809267452:2809268236, ack 2122537092, win 66, options [nop,nop,TS val 1899064684 ecr 34412186], length 784
14:09:50.806325 IP ipone1.39951 > iptwo2.22: Flags [F.], seq 1, ack 0, win 115, options [nop,nop,TS val 34415048 ecr 1899036871], length 0
14:09:50.806944 IP iptwo2.22 > ipone1.39951: Flags [F.], seq 784, ack 2, win 66, options [nop,nop,TS val 1899065510 ecr 34415048], length 0
14:09:50.826539 IP ipone1.39951 > iptwo2.22: Flags [R], seq 2122537093, win 0, length 0
14:09:51.182154 IP ipone1.39952 > iptwo2.22: Flags [S], seq 2549144643, win 14600, options [mss 1460,sackOK,TS val 34415085 ecr 0,nop,wscale 7], length 0
14:09:51.182180 IP iptwo2.22 > ipone1.39952: Flags [S.], seq 3274778727, ack 2549144644, win 5792, options [mss 1460,sackOK,TS val 1899065885 ecr 34415085,nop,wscale 7], length 0
14:09:51.203521 IP ipone1.39952 > iptwo2.22: Flags [.], ack 1, win 115, options [nop,nop,TS val 34415087 ecr 1899065885], length 0
14:09:51.209167 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 1:42, ack 1, win 46, options [nop,nop,TS val 1899065912 ecr 34415087], length 41
14:09:51.228643 IP ipone1.39952 > iptwo2.22: Flags [.], ack 42, win 115, options [nop,nop,TS val 34415090 ecr 1899065912], length 0
14:09:51.228909 IP ipone1.39952 > iptwo2.22: Flags [P.], seq 1:33, ack 42, win 115, options [nop,nop,TS val 34415090 ecr 1899065912], length 32
14:09:51.228932 IP iptwo2.22 > ipone1.39952: Flags [.], ack 33, win 46, options [nop,nop,TS val 1899065932 ecr 34415090], length 0
14:09:51.229630 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 42:826, ack 33, win 46, options [nop,nop,TS val 1899065932 ecr 34415090], length 784
14:09:51.249104 IP ipone1.39952 > iptwo2.22: Flags [P.], seq 33:1305, ack 42, win 115, options [nop,nop,TS val 34415092 ecr 1899065932], length 1272
14:09:51.289171 IP iptwo2.22 > ipone1.39952: Flags [.], ack 1305, win 66, options [nop,nop,TS val 1899065992 ecr 34415092], length 0
14:09:51.448921 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 42:826, ack 1305, win 66, options [nop,nop,TS val 1899066152 ecr 34415092], length 784
14:09:51.888928 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 42:826, ack 1305, win 66, options [nop,nop,TS val 1899066592 ecr 34415092], length 784
14:09:52.768938 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 42:826, ack 1305, win 66, options [nop,nop,TS val 1899067472 ecr 34415092], length 784
14:09:54.528928 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 42:826, ack 1305, win 66, options [nop,nop,TS val 1899069232 ecr 34415092], length 784
14:09:58.048926 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 42:826, ack 1305, win 66, options [nop,nop,TS val 1899072752 ecr 34415092], length 784
14:10:05.088926 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 42:826, ack 1305, win 66, options [nop,nop,TS val 1899079792 ecr 34415092], length 784
14:10:19.168927 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 42:826, ack 1305, win 66, options [nop,nop,TS val 1899093872 ecr 34415092], length 784
14:10:36.277078 IP ipone1.39952 > iptwo2.22: Flags [F.], seq 1305, ack 42, win 115, options [nop,nop,TS val 34419595 ecr 1899065932], length 0
14:10:36.277812 IP iptwo2.22 > ipone1.39952: Flags [F.], seq 826, ack 1306, win 66, options [nop,nop,TS val 1899110980 ecr 34419595], length 0
14:10:36.297563 IP ipone1.39952 > iptwo2.22: Flags [R], seq 2549145949, win 0, length 0

riddick root 12:09 #tcpdump -n -i eth1 port 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
12:09:50.806297 IP ipone1.39951 > iptwo2.22: Flags [F.], seq 2122537092, ack 2809267452, win 115, options [nop,nop,TS val 34415048 ecr 1899036871], length 0
12:09:50.806985 IP iptwo2.22 > ipone1.39951: Flags [F.], seq 785, ack 1, win 66, options [nop,nop,TS val 1899065510 ecr 34415048], length 0
12:09:50.826514 IP ipone1.39951 > iptwo2.22: Flags [R], seq 2122537093, win 0, length 0
12:09:51.182110 IP ipone1.39952 > iptwo2.22: Flags [S], seq 2549144643, win 14600, options [mss 1460,sackOK,TS val 34415085 ecr 0,nop,wscale 7], length 0
12:09:51.182204 IP iptwo2.22 > ipone1.39952: Flags [S.], seq 3274778727, ack 2549144644, win 5792, options [mss 1460,sackOK,TS val 1899065885 ecr 34415085,nop,wscale 7], length 0
12:09:51.203499 IP ipone1.39952 > iptwo2.22: Flags [.], ack 1, win 115, options [nop,nop,TS val 34415087 ecr 1899065885], length 0
12:09:51.209224 IP iptwo2.22 > ipone1.39952: Flags [P.], seq 1:42, ack 1, win 46, options [nop,nop,TS val 1899065912 ecr 34415087], length 41
12:09:51.228620 IP ipone1.39952 > iptwo2.22: Flags [.], ack 42, win 115, options [nop,nop,TS val 34415090 ecr 1899065912], length 0
12:09:51.228890 IP ipone1.39952 > iptwo2.22: Flags [P.], seq 1:33, ack 42, win 115, options [nop,nop,TS val 34415090 ecr 1899065912], length 32
12:09:51.228956 IP iptwo2.22 > ipone1.39952: Flags [.], ack 33, win 46, options [nop,nop,TS val 1899065932 ecr 34415090], length 0
12:09:51.249077 IP ipone1.39952 > iptwo2.22: Flags [P.], seq 33:1305, ack 42, win 115, options [nop,nop,TS val 34415092 ecr 1899065932], length 1272
12:09:51.289198 IP iptwo2.22 > ipone1.39952: Flags [.], ack 1305, win 66, options [nop,nop,TS val 1899065992 ecr 34415092], length 0
12:10:36.277035 IP ipone1.39952 > iptwo2.22: Flags [F.], seq 1305, ack 42, win 115, options [nop,nop,TS val 34419595 ecr 1899065932], length 0
12:10:36.277861 IP iptwo2.22 > ipone1.39952: Flags [F.], seq 826, ack 1306, win 66, options [nop,nop,TS val 1899110980 ecr 34419595], length 0
12:10:36.297516 IP ipone1.39952 > iptwo2.22: Flags [R], seq 2549145949, win 0, length 0


| Linux bridging loosing packets | | 2012.08.04-12:13.00

OpenVSwitch vs kernel 3.5.x

Module name changed from openvswitch_mod to openvswitch
/usr/share/openvswitch/scripts/ovs-ctl:insert_openvswitch_mod_if_required () {
/usr/share/openvswitch/scripts/ovs-ctl:    # If openvswitch_mod is already loaded then we're done.
/usr/share/openvswitch/scripts/ovs-ctl:    test -e /sys/module/openvswitch_mod && return 0
/usr/share/openvswitch/scripts/ovs-ctl:    # Load openvswitch_mod.  If that's successful then we're done.
/usr/share/openvswitch/scripts/ovs-ctl:    action "Inserting openvswitch module" modprobe openvswitch_mod && return 0
/usr/share/openvswitch/scripts/ovs-ctl:    # openvswitch_mod.  Try to unload it, if there are no bridges.
/usr/share/openvswitch/scripts/ovs-ctl:    # Try loading openvswitch_mod again.
/usr/share/openvswitch/scripts/ovs-ctl:    action "Inserting openvswitch module" modprobe openvswitch_mod
/usr/share/openvswitch/scripts/ovs-ctl:    insert_openvswitch_mod_if_required || return 1
/usr/share/openvswitch/scripts/ovs-ctl:    if test -e /sys/module/openvswitch_mod; then
/usr/share/openvswitch/scripts/ovs-ctl:        action "Removing openvswitch module" rmmod openvswitch_mod

| OpenVSwitch vs kernel 3.5.x | | 2012.07.29-13:34.00

Citrix receiver on debian wheezy ( newer then ~2012.05 )

Warning: translation table syntax error: Unknown keysym name:  osfActivate
Warning: ... found while parsing ':<Key>osfActivate:            ManagerParentActivate()'
Warning: String to TranslationTable conversion encountered errors
Warning: translation table syntax error: Unknown keysym name:  osfBeginLine
Warning: ... found while parsing ':<Key>osfBeginLine:           ManagerGadgetTraverseHome()'
Warning: String to TranslationTable conversion encountered errors
Warning: translation table syntax error: Unknown keysym name:  osfHelp
Warning: ... found while parsing ':<Key>osfHelp:                        ManagerGadgetHelp()'

http://snapshot.debian.org/archive/debian/20100908T090829Z/pool/non-free/o/openmotif/libmotif4_2.3.3-5_i386.deb

| Citrix receiver on debian wheezy ( newer then ~2012.05 ) | | 2012.06.26-13:51.00

rfkill soft disabled

/etc/init.d/dbus stop

| rfkill soft disabled | | 2012.06.24-23:26.00

painfull migration from SVK to git-svn

Typicall workflow:
svk sync -a
Find all directories using git-svn, enter them, and then run 'git svn fetch' in each and every one
svk update
git svn rebase
svk add Directory;svk commit Directory
git add Directory;git commit Directory;git svn dcommit Directory

| painfull migration from SVK to git-svn | | 2012.05.26-21:08.00

LVM ignores USB devices

    # List of pairs of additional acceptable block device types found
    # in /proc/devices with maximum (non-zero) number of partitions.
    # types = [ "fd", 16 ]
    types = [ "ub", 8 ]

| LVM ignores USB devices | | 2012.05.16-16:19.00

How to upgrade PgBouncer without dropping connections?


This is as easy as launching new PgBouncer process with -R switch and same config:

$ pgbouncer -R -d config.ini
The -R (reboot) switch makes new process connect to console of the old process (dbname=pgbouncer) via unix socket and issue following commands:

SUSPEND;
SHOW FDS;
SHUTDOWN;
After that if new one notices old one gone it resumes work with old connections. The magic happens during SHOW FDS command which transports actual file descriptors to new process.

If the takeover does not work for whatever reason, the new process can be simply killed, old one notices this and resumes work.

| How to upgrade PgBouncer without dropping connections? | | 2012.05.10-11:32.00

NAP Bluetooth Accesspoint for iPad/iPhone/mobile devices on modern debian

hciconfig hci0 lm MASTER,ACCEPT
brctl addbr blue
bt-network -s nap blue

ifconfig blue 192.168.99.1
bluez-simple-agent ( for pairing )
udhcpd on blue device
masquerade from blue device to the internet

| NAP Bluetooth Accesspoint for iPad/iPhone/mobile devices on modern debian | | 2012.05.02-17:18.00

xfsrestore corrupt extent header


time nice ionice -c 3 xfsdump - /dev/s/home | xfsrestore - ./
xfsrestore: using file dump (drive_simple) strategy
xfsrestore: version 3.0.6 (dump format 3.0) - Running single-threaded
xfsdump: using file dump (drive_simple) strategy
xfsdump: version 3.0.6 (dump format 3.0) - Running single-threaded
xfsdump: WARNING: most recent level 0 dump was interrupted, but not resuming that dump since resume (-R) option not specified
xfsdump: level 0 dump of pokurcz:/home
xfsdump: dump date: Mon Feb 27 14:47:47 2012
xfsdump: session id: 7bb62f13-dfd9-40ea-a0c4-43dcca7d7897
xfsdump: session label: ""
xfsrestore: searching media for dump
xfsdump: ino map phase 1: constructing initial dump list
xfsdump: ino map phase 2: skipping (no pruning necessary)
xfsdump: ino map phase 3: skipping (only one dump stream)
xfsdump: ino map construction complete
xfsdump: estimated dump size: 41947280896 bytes
xfsdump: creating dump session media file 0 (media 0, file 0)
xfsdump: dumping ino map
xfsdump: dumping directories
xfsrestore: examining media file 0
xfsrestore: dump description:
xfsrestore: hostname: pokurcz
xfsrestore: mount point: /home
xfsrestore: volume: /dev/mapper/s-home
xfsrestore: session time: Mon Feb 27 14:47:47 2012
xfsrestore: level: 0
xfsrestore: session label: ""
xfsrestore: media label: ""
xfsrestore: file system id: 9c620277-a63d-4a5b-bb82-64df562b6ddd
xfsrestore: session id: 7bb62f13-dfd9-40ea-a0c4-43dcca7d7897
xfsrestore: media id: 1dd3dc69-4ef5-4fe5-8f5b-d8c4aeb7761f
xfsrestore: searching media for directory dump
xfsrestore: reading directories
xfsdump: dumping non-directory files
xfsrestore: 98210 directories and 645968 entries processed
xfsrestore: directory post-processing
xfsrestore: restoring non-directory files
xfsdump: WARNING: could not open regular file ino 109308 mode 0x00008180: Stale NFS file handle: not dumped
xfsdump: WARNING: could not get list of non-root attributes for nondir ino 109308: Stale NFS file handle (116)
xfsdump: WARNING: could not get list of root attributes for nondir ino 109308: Stale NFS file handle (116)
xfsdump: WARNING: could not get list of secure attributes for nondir ino 109308: Stale NFS file handle (116)
xfsrestore: WARNING: corrupt extent header
xfsrestore: WARNING: unable to resync media file: some portion of dump will NOT be restored
xfsrestore: restore complete: 27 seconds elapsed
xfsrestore: Restore Status: SUCCESS
xfsdump: ending media file
xfsdump: media file size 198770688 bytes
xfsdump: dump size (non-dir files) : 97237608 bytes
xfsdump: NOTE: dump interrupted: 27 seconds elapsed: may resume later using -R option
xfsdump: Dump Status: INTERRUPT

real    0m27.792s
user    0m1.530s
sys     0m11.190s

| xfsrestore corrupt extent header | | 2012.02.27-15:38.00

mdadm zero superblock



 mdadm --add /dev/md2 /dev/sda6
mdadm: /dev/sda6 reports being an active member for /dev/md2, but a --re-add fails.
mdadm: not performing --add as that would convert /dev/sda6 in to a spare.
mdadm: To make this a spare, use "mdadm --zero-superblock /dev/sda6" first.
pokurcz:/home/eyck# mdadm --zero-superblock /dev/sda6
pokurcz:/home/eyck# mdadm --add /dev/md2 /dev/sda6
mdadm: added /dev/sda6
pokurcz:/home/eyck# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda6[2] sdd6[3]
      1851851521 blocks super 1.2 [2/1] [U_]
      [>....................]  recovery =  0.0% (57792/1851851521) finish=1601.6min speed=19264K/sec

| mdadm zero superblock | | 2012.02.09-13:03.00

How much does 120g squash racket/racquet weigh?

Karakal 120g ( + strings, crash tape, overgrip ): 160g
Wilson 143g ( + strings, crash tape, overgrip ): 163g
Artengo 155g ( + strings, crash tape, overgrip): 183g
Artengo 182g ( + strings, no crash tape, no overgrip): 185g

| How much does 120g squash racket/racquet weigh? | | 2012.02.09-13:02.00

btrfs vs filesystem problems/recovery tool

mount -o recovery /dev/btrfs /btrfs



device fsid b45b8c51-33eb-4ab0-9a33-4741cf8c6a6a devid 1 transid 18732 /dev/ubf6
btrfs: enabling auto recoveryparent transid verify failed on 57569280 wanted 18732 found 18734
parent transid verify failed on 57569280 wanted 18732 found 18734
parent transid verify failed on 57569280 wanted 18732 found 18734
parent transid verify failed on 57569280 wanted 18732 found 18734
parent transid verify failed on 57569280 wanted 18732 found 18734
parent transid verify failed on 57569280 wanted 18732 found 18734
parent transid verify failed on 9799873626169147392 wanted 9799873626169212927 found 0
------------[ cut here ]------------
kernel BUG at fs/btrfs/volumes.c:2860!
invalid opcode: 0000 [#1] SMP
CPU 1
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 veth ftdi_sio usbserial ext3 jbd isofs loop nls_iso8859_1 nls_cp437 vfat fat sg intel_agp intel_gtt radeon ttm drm_kms_helper drm i2c_algo_bit iptable_filter ip_tables ebtable_nat ebtables x_tables acpi_cpufreq mperf cpufreq_userspace cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table parport_pc ppdev lp parport bnep rfcomm binfmt_misc fuse tun nfs lockd fscache auth_rpcgss nfs_acl sunrpc bridge ipheth 8021q garp stp ext4 mbcache jbd2 zram(C) kvm_intel kvm snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec btusb snd_pcm_oss snd_mixer_oss snd_pcm bluetooth psmouse rfkill snd_timer i2c_i801 i7core_edac pcspkr i2c_core button snd edac_core processor soundcore rtc_cmos snd_page_alloc crc16 serio_raw evdev thermal_sys xfs btrfs zlib_deflate crc32c libcrc32c dm_mod raid1 md_mod sd_mod crc_t10dif usb_storage uas ub usbhid hid r8169 mii ahci libahci firewire_ohci libata firewire_core crc_itu_t scsi_mod ehci_hcd usbcore usb_common [last unloaded: scsi_wait_scan]

Pid: 18418, comm: mount Tainted: G         C   3.2.1 #1 Hewlett-Packard HP Elite 7000 Microtower PC/2A90h
RIP: 0010:[<ffffffffa0197fa7>]  [<ffffffffa0197fa7>] btrfs_num_copies+0x37/0x82 [btrfs]
RSP: 0018:ffff88006a2c3ac8  EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8800ab266108 RCX: ffffffffffffffff
RDX: 00000078c9e30000 RSI: 880025241b880000 RDI: ffff88019742e1b8
RBP: ffff88006a2c3ae8 R08: 880025241b88ffff R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 880025241b880000
R13: 0000000000000000 R14: ffff88005d2b8a00 R15: 0000000000000000
FS:  00007f55305927e0(0000) GS:ffff88022fc40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002b0d47c59000 CR3: 00000001f0ab6000 CR4: 00000000000026e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process mount (pid: 18418, threadinfo ffff88006a2c2000, task ffff8802221cdbe0)
Stack:
 ffff880047a2e400 0000000000001000 ffff88005d2b89d8 ffff880047a2e400
 ffff88006a2c3b48 ffffffffa0175b2b 00000000000000ff 880025241b88ffff
 ffff88004e58e570 00000000ab266000 ffff880047a2e400 ffff88005d2b89d8
Call Trace:
 [<ffffffffa0175b2b>] btree_read_extent_buffer_pages+0x9d/0xbc [btrfs]
 [<ffffffffa01767b0>] read_tree_block+0x30/0x43 [btrfs]
 [<ffffffffa017a992>] open_ctree+0xf12/0x154c [btrfs]
 [<ffffffffa0160145>] btrfs_mount+0x3aa/0x565 [btrfs]
 [<ffffffff810cc527>] ? __free_pages+0x1b/0x24
 [<ffffffff810cc56f>] ? free_pages+0x3f/0x46
 [<ffffffff811853b4>] ? smack_sb_copy_data+0xf6/0x107
 [<ffffffff81112d8f>] mount_fs+0x6b/0x14f
 [<ffffffff810e1474>] ? __alloc_percpu+0xb/0xd
 [<ffffffff81127e21>] vfs_kern_mount+0x60/0x98
 [<ffffffff811291cd>] do_kern_mount+0x48/0xd8
 [<ffffffff81129940>] do_mount+0x6e3/0x746
 [<ffffffff810f6c25>] ? alloc_pages_current+0xaa/0xcd
 [<ffffffff81129a26>] sys_mount+0x83/0xbd
 [<ffffffff81337492>] system_call_fastpath+0x16/0x1b
Code: fb 48 83 ec 10 48 8d 7f 08 48 89 55 e8 e8 56 ea 19 e1 48 8b 55 e8 4c 89 e6 48 89 df e8 83 30 ff ff f0 48 ff 43 08 48 85 c0 75 04 <0f> 0b eb fe 48 8b 50 18 4c 39 e2 77 09 48 03 50 20 4c 39 e2 73
RIP  [<ffffffffa0197fa7>] btrfs_num_copies+0x37/0x82 [btrfs]
 RSP <ffff88006a2c3ac8>
---[ end trace ea074e24971fab1f ]---


./btrfsck  /dev/ubf6
parent transid verify failed on 58155008 wanted 18733 found 18661
parent transid verify failed on 58155008 wanted 18733 found 18661
parent transid verify failed on 58155008 wanted 18733 found 18661
parent transid verify failed on 58155008 wanted 18733 found 18661
Ignoring transid failure
leaf 58155008 items 6 free space 169 generation 18661 owner 7
fs uuid b45b8c51-33eb-4ab0-9a33-4741cf8c6a6a
chunk uuid ab8e0c05-f526-4614-a74e-59d6260a7a26
        item 0 key (EXTENT_CSUM EXTENT_CSUM 390792507392) itemoff 3839 itemsize 156
                extent csum item
        item 1 key (EXTENT_CSUM EXTENT_CSUM 390792667136) itemoff 3167 itemsize 672
                extent csum item
        item 2 key (EXTENT_CSUM EXTENT_CSUM 390793355264) itemoff 2431 itemsize 736
                extent csum item
        item 3 key (EXTENT_CSUM EXTENT_CSUM 390794108928) itemoff 1631 itemsize 800
                extent csum item
        item 4 key (EXTENT_CSUM EXTENT_CSUM 390794928128) itemoff 959 itemsize 672
                extent csum item
        item 5 key (EXTENT_CSUM EXTENT_CSUM 390795616256) itemoff 319 itemsize 640
                extent csum item
failed to find block number 74158080
Aborted

pokurcz:git/btrfs-recvo/recovery-beta# ./find-root  /dev/ubf6
Super think's the tree root is at 53374976, chunk root 20975616
Well block 4194304 seems great, but generation doesn't match, have=3, want=18734
Well block 4206592 seems great, but generation doesn't match, have=4, want=18734
Found tree root at 53374976


./btrfs-debug-tree -R /dev/ubf6
root tree: 53374976 level 0
chunk tree: 20975616 level 1
extent tree key (EXTENT_TREE ROOT_ITEM 0) 53465088 level 2
device tree key (DEV_TREE ROOT_ITEM 0) 26942234624 level 1
fs tree key (FS_TREE ROOT_ITEM 0) 74158080 level 2
checksum tree key (CSUM_TREE ROOT_ITEM 0) 447963000832 level 3
data reloc tree key (DATA_RELOC_TREE ROOT_ITEM 0) 29380608 level 0
btrfs root backup slot 0
        tree root gen 18732 block 57569280
                extent root gen 18732 block 74190848
                chunk root gen 8588 block 20975616
                device root gen 8588 block 26942234624
                csum root gen 18728 block 447963000832
                fs root gen 18732 block 74158080
                360809558016 used 520133771264 total 1 devices
btrfs root backup slot 1
        tree root gen 18733 block 57999360
                extent root gen 18733 block 58003456
                chunk root gen 8588 block 20975616
                device root gen 8588 block 26942234624
                csum root gen 18728 block 447963000832
                fs root gen 18732 block 74158080
                360809553920 used 520133771264 total 1 devices
btrfs root backup slot 2
        tree root gen 18734 block 53374976
                extent root gen 18734 block 53465088
                chunk root gen 8588 block 20975616
                device root gen 8588 block 26942234624
                csum root gen 18728 block 447963000832
                fs root gen 18732 block 74158080
                360809553920 used 520133771264 total 1 devices
btrfs root backup slot 3
        tree root gen 9799873626169212927 block 9799873626169147392
                extent root gen 0 block 0
                chunk root gen 65535 block 9800301589670461439
                device root gen 0 block 0
                csum root gen 0 block 0
                fs root gen 0 block 0
                9800432325723422720 used 0 total 9800432325698322431 devices
total bytes 520133771264
bytes used 360809553920
uuid b45b8c51-33eb-4ab0-9a33-4741cf8c6a6a
Btrfs Btrfs v0.19

Read-only recovery works (as of 2012.02):

time nice ionice -c 3 ./restore -v /dev/btrfs /fs/recovery
Root objectid is 5
Restoring /fs/recovery/home.2011.01.19.tar.lzma
Restoring /fs/recovery/venom
Restoring /fs/recovery/venom/fs.tar.lzop
We seem to be looping a lot on /fs/recovery/venom/fs.tar.lzop, do you want to keep going on ? (y/N): y
We seem to be looping a lot on /fs/recovery/venom/fs.tar.lzop, do you want to keep going on ? (y/N):
Done searching /fs/recovery/venom
Restoring /fs/recovery/out
Restoring /fs/recovery/out/copy
Done searching /fs/recovery/out/copy
Restoring /fs/recovery/out/pdf

...



real    647m2.091s
user    0m0.800s
sys     30m3.790s

( 309G of data recovered from failed btrfs in 10 hours )

| btrfs vs filesystem problems/recovery tool | | 2012.02.08-10:23.00

Converting KVM disk from qcow2 to lvm volume


# file *dsk
sth.dsk: QEMU QCOW Image (v2), 69793218560 bytes

lvcreate  -L69793218560b -n w732 dt

# time qemu-img convert sth.dsk -O raw /dev/dt/w732

real    23m9.403s
user    0m3.130s
sys     1m11.530s

And replace driver info from qcow2 to raw:
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/dev/dt/w732'/>
      <target dev='vda' bus='virtio'/>

| Converting KVM disk from qcow2 to lvm volume | | 2011.11.18-17:14.00

OpenSSL misc

                  sign    verify    sign/s verify/s
rsa  512 bits 0.000241s 0.000019s   4145.7  51455.6
rsa 1024 bits 0.001090s 0.000052s    917.6  19256.4
rsa 2048 bits 0.006173s 0.000167s    162.0   5997.7
rsa 4096 bits 0.039819s 0.000579s     25.1   1727.3
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000190s 0.000219s   5250.9   4573.5
dsa 1024 bits 0.000510s 0.000601s   1960.4   1662.9
dsa 2048 bits 0.001641s 0.001968s    609.3    508.1

| OpenSSL misc | | 2011.11.10-16:48.00

svnadmin obliterate

aka svnadmin dump|svndumpfilter exclude | svnadmin restore

| svnadmin obliterate | | 2011.10.12-13:55.00

Improving update performance of munin with rrdcached: munin 1.4

  • apt-get install rrdcched
  • modify /etc/default/rrdcached
    #OPTS=""
    OPTS="-s munin -l unix:/var/run/rrdcached.sock -j /var/lib/rrdcached/journal/ -F -b /var/lib/munin/ -B"
    
  • chown -R munin.munin /var/lib/rrdcached
  • add
    export RRDCACHED_ADDRESS=/var/run/rrdcached.sock
    
    to /usr/bin/munin-cron

| Improving update performance of munin with rrdcached: munin 1.4 | | 2011.09.16-12:56.00

Errors compiling redhat6 kernel with openvz (circa 2011-09):

fs/buffer.c: In function '__set_page_dirty':
fs/buffer.c:685: error: implicit declaration of function 'ub_io_account_dirty'
make[2]: *** [fs/buffer.o] Error 1
make[2]: *** Waiting for unfinished jobs....
fs/direct-io.c: In function 'submit_page_section':
fs/direct-io.c:701: error: implicit declaration of function 'virtinfo_notifier_call'
fs/direct-io.c:701: error: 'VITYPE_IO' undeclared (first use in this function)
fs/direct-io.c:701: error: (Each undeclared identifier is reported only once
fs/direct-io.c:701: error: for each function it appears in.)
fs/direct-io.c:701: error: 'VIRTINFO_IO_PREPARE' undeclared (first use in this function)
make[2]: *** [fs/direct-io.o] Error 1
make[1]: *** [fs] Error 2




In file included from arch/x86/mm/fault.c:14:
include/linux/hugetlb.h: In function 'hstate_inode':
include/linux/hugetlb.h:255: error: implicit declaration of function 'HUGETLBFS_SB'
include/linux/hugetlb.h:255: warning: assignment makes pointer from integer without a cast
include/linux/hugetlb.h:256: error: dereferencing pointer to incomplete type
make[3]: *** [arch/x86/mm/fault.o] Error 1
make[2]: *** [arch/x86/mm] Error 2
make[1]: *** [arch/x86] Error 2




In file included from kernel/sched.c:2394:
kernel/sched_autogroup.c: In function 'autogroup_move_group':
kernel/sched_autogroup.c:145: error: expected 'while' before 'while_each_thread'
In file included from kernel/sched.c:2396:
kernel/sched_debug.c: In function 'print_cfs_rq':
kernel/sched_debug.c:180: error: implicit declaration of function 'task_group_path'
kernel/sched_debug.c:180: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
kernel/sched_debug.c:180: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
kernel/sched_debug.c: In function 'print_rt_rq':
kernel/sched_debug.c:227: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
kernel/sched_debug.c:227: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
make[2]: *** [kernel/sched.o] Error 1
make[1]: *** [kernel] Error 2



In file included from kernel/sched.c:2394:
kernel/sched_autogroup.c: In function 'autogroup_move_group':
kernel/sched_autogroup.c:145: error: expected 'while' before 'while_each_thread'
make[2]: *** [kernel/sched.o] Error 1
make[1]: *** [kernel] Error 2
make[1]: Leaving directory `/home/eyck/l/vz/linux-2.6.32'



mm/page-writeback.c: In function 'balance_dirty_pages':
mm/page-writeback.c:495: error: implicit declaration of function 'get_io_ub'
mm/page-writeback.c:495: warning: initialization makes pointer from integer without a cast
mm/page-writeback.c:507: error: implicit declaration of function 'ub_dirty_limits'
mm/page-writeback.c:510: error: implicit declaration of function 'ub_dirty_pages'
mm/page-writeback.c: In function 'balance_dirty_pages_ratelimited_nr':
mm/page-writeback.c:669: error: invalid type argument of '->' (have 'int')
mm/page-writeback.c: In function 'write_cache_pages':
mm/page-writeback.c:966: error: implicit declaration of function 'virtinfo_notifier_call'
mm/page-writeback.c:966: error: 'VITYPE_IO' undeclared (first use in this function)
mm/page-writeback.c:966: error: (Each undeclared identifier is reported only once
mm/page-writeback.c:966: error: for each function it appears in.)
mm/page-writeback.c:966: error: 'VIRTINFO_IO_PREPARE' undeclared (first use in this function)
mm/page-writeback.c: In function '__set_page_dirty_nobuffers':
mm/page-writeback.c:1199: error: implicit declaration of function 'ub_io_account_dirty'
mm/page-writeback.c: In function 'test_set_page_writeback':
mm/page-writeback.c:1414: error: implicit declaration of function 'ub_io_account_clean'
make[2]: *** [mm/page-writeback.o] Error 1
make[1]: *** [mm] Error 2

| Errors compiling redhat6 kernel with openvz (circa 2011-09): | | 2011.09.06-11:45.00

lighttpd 417 - Expectation Failed

417 - Expectation Failed Fix with 1.4.29 and:
server.reject-expect-100-with-417       =       "disable"

| lighttpd 417 - Expectation Failed | | 2011.07.22-14:31.00

Restoring iPhone 3G bricked by 'Erase all data and settings' command

Symptoms: Gray apple.
* Press Home and Power simultanously
* keep on holding then both until reboot, and then until iTunes logo appears
* when iTunes logo appears, you can restore using iTunes

| Restoring iPhone 3G bricked by 'Erase all data and settings' command | | 2011.05.04-09:38.00

Xeon 5504 openssl speed

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Xeon(R) CPU           E5504  @ 2.00GHz
stepping        : 5
cpu MHz         : 2000.248
cache size      : 4096 KB
physical id     : 1
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 22
initial apicid  : 22
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 4000.06
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000149s 0.000014s   6697.8  70744.8
rsa 1024 bits 0.000736s 0.000040s   1358.6  24757.7
rsa 2048 bits 0.004563s 0.000138s    219.1   7255.5
rsa 4096 bits 0.032323s 0.000514s     30.9   1945.3
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000148s 0.000155s   6777.9   6453.2
dsa 1024 bits 0.000389s 0.000433s   2567.8   2308.9
dsa 2048 bits 0.001334s 0.001554s    749.5    643.7


| Xeon 5504 openssl speed | | 2011.04.26-17:12.00

 Your lover will never wish to leave you.