Skip to content

Instantly share code, notes, and snippets.

2012-06-01 14:28:23 CEST [2109] mogilefs@mogilefs ERROR: duplicate key value violates unique constraint "file_to_delete2_pkey"
2012-06-01 14:28:23 CEST [2109] mogilefs@mogilefs DETAIL: Key (fid)=(7610499) already exists.
2012-06-01 14:28:23 CEST [2109] mogilefs@mogilefs STATEMENT: INSERT INTO file_to_delete2 (fid, nexttry) VALUES ($1,EXTRACT(epoch FROM NOW())::int4 + 0)
2012-06-01 14:37:42 CEST [2813] mogilefs@mogilefs ERROR: duplicate key value violates unique constraint "file_dmid_dkey_key"
2012-06-01 14:37:42 CEST [2813] mogilefs@mogilefs DETAIL: Key (dmid, dkey)=(1, /public/data/111/RE0002915/ads/170/RE0002915-12-023751/img/9915228.jpeg) already exists.
2012-06-01 14:37:42 CEST [2813] mogilefs@mogilefs STATEMENT: INSERT INTO file (fid, dmid, dkey, length, classid, devcount) VALUES ($1, $2, $3, $4, $5, $6)
2012-06-01 14:37:42 CEST [2408] mogilefs@mogilefs ERROR: duplicate key value violates unique constraint "file_to_delete2_pkey"
2012-06-01 14:37:42 CEST [2408] mogilefs@mogilefs DETAIL: Key (fid)=
@haad
haad / gist:2634549
Created May 8, 2012 12:23
git pull problem on NetBSD jsonn/src repo
[haad@musasi gsrc]$ git pull
remote: Counting objects: 4365, done.
remote: Compressing objects: 100% (465/465), done.
remote: Total 2517 (delta 1982), reused 2505 (delta 1970)
Receiving objects: 100% (2517/2517), 3.45 MiB | 181 KiB/s, done.
Resolving deltas: 100% (1982/1982), completed with 471 local objects.
From git://github.com/jsonn/src
+ 7f5b29e...e0faadd trunk -> origin/trunk (forced update)
a5dd56e..3b6ef9c JSEWARD -> origin/JSEWARD
* [new branch] agc_netpgp_standalone -> origin/agc_netpgp_standalone
@haad
haad / gist:2584378
Created May 3, 2012 08:29
Find a server-name in a list of created devices on VIO server and print it's vhost
/usr/ios/cli/ioscli lsmap -all | egrep 'VTD|vhost' | perl -e 'my $old; while (my $line = <STDIN> ) { if ($line =~ /server-name/) { print "$old$line"; next; } $old = $line; }'
/usr/ios/cli/ioscli lsmap -all | egrep 'VTD|vhost' | awk '$0 ~= /server-name/ {print $0" "old;} {old=$0;}'
/usr/ios/cli/ioscli lsmap -all | egrep 'VTD|vhost' | awk '/server-name/{print old"\n "$0;} /vhost/{old=$0;}'
@haad
haad / gist:2584354
Created May 3, 2012 08:26
convert mask variable in hex notation to dotted notation in plain ksh
mask=$(echo $a | sed 's/^0x//g;s/\(..\)/\1\,/g;s/,$//g;'| tr ',' '\n' | while read w; do printf ".%d" 0x$w; done|sed -e 's/^\.//');echo "Netmask $a converted to dotted notation is $mask";
2012/04/21 23:41:10 [debug] 7200#0: *1058 http request line: "GET /share/file.html HTTP/1.0"
2012/04/21 23:41:10 [debug] 7200#0: *1058 http uri: "/share/file.html"
2012/04/21 23:41:10 [debug] 7200#0: *1058 http args: ""
2012/04/21 23:41:10 [debug] 7200#0: *1058 http exten: "html"
2012/04/21 23:41:10 [debug] 7200#0: *1058 http process request header line
2012/04/21 23:41:10 [debug] 7200#0: *1058 http header: "User-Agent: Wget/1.11.4 Red Hat modified"
2012/04/21 23:41:10 [debug] 7200#0: *1058 http header: "Accept: */*"
2012/04/21 23:41:10 [debug] 7200#0: *1058 http header: "Host: 192.168.200.64"
2012/04/21 23:41:10 [debug] 7200#0: *1058 http header: "Connection: Keep-Alive"
2012/04/21 23:41:10 [debug] 7200#0: *1058 http header done
# ab -t 30 -c 200 http://192.168.200.64/share/public/110/RE0000003/ads/133/RE0000003-11-000017/img/8011263.jpeg
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.200.64 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Finished 19951 requests
location = /memc {
internal;
memc_connect_timeout 100ms;
memc_send_timeout 100ms;
memc_read_timeout 100ms;
set $memc_key $query_string;
set $memc_exptime 300;
memc_pass memcached_servers;
@haad
haad / gist:2427733
Created April 20, 2012 10:43
mogilefs + memcached
# mogadm settings list
memcache_servers = 127.0.0.1:11211
# memcached-tool localhost:11211 stats
#localhost:11211 Field Value
accepting_conns 1
auth_cmds 0
auth_errors 0
bytes 0
bytes_read 303
[haad@ BG2]$ cat ../../.GemRB/GemRB.cfg | grep -v '#' | uniq
GameType=bg2
GameName=Baldur's Gate 2
Width=1024
Height=768
@haad
haad / Log-1
Created February 19, 2012 00:50
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: GemRB Core Version v0.7.0-git Loading...
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Core]: Initializing the Event Manager...[Core]: Initializing Lists Dictionary...[Core]: Initializing Variables Dictionary...[OK]
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Config]: Trying to open GemRB.cfg [NOT FOUND]
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Config]: Trying to open /Users/haad/.GemRB/GemRB.cfg [OK]
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Core]: Starting Plugin Manager...
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [PluginMgr]: Loading Plugins from GemRB.app/Contents/Plugins/
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [PluginMgr]: Loading: GemRB.app/Contents/Plugins/2DAImporter.so... 2DA File Importer...[OK]
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Plugi