CC25650STKは CR2032の電池ボタンで駆動するがこれだと2日しか持たず。基板には 外部バッテリー用の半田付けスペースがあるのでそこに単三 2本を直列でつないで見たがCC2650STK 連続稼働(3)のように1ヶ月も持たない(そもそも、大体の場合、advertising モードに落ちて2分以内に復帰できずに切れる)。
長期稼働のためにいろいろ考えたが、USBで給電するような電池もどきがあるので、楽天で電池型USBパワーコネクター(単三電池2本用) ダミー電池を買った。
これで、iPhoneのおまけについてくる USB電源アダプタを組にして使うことにしてみた。
IIJmio の3つのsimで容量シェアしたときに一番安い組み合わせ(2026/02)
IIJ mio がまた値段を更新した(15G が 1800円から 1500円へ。2026/03から)ので、いつものように計算しなおし。
0=2G=750円,1=5G=850円,2=10G=1300円,3=15G=1500円,4=25G=1900円,5=35G=2300円,6=45G=3200円,7=55G=3800円
では、
000 6 2250 375.0
001 9 2350 261.1111111111111
011 12 2450 204.16666666666666
111 15 2550 170.0
012 17 2900 170.58823529411765
112 20 3000 150.0
013 22 3100 140.9090909090909
113 25 3200 128.0
004 29 3400 117.24137931034483
014 32 3500 109.375
114 35 3600 102.85714285714286
005 39 3800 97.43589743589743
015 42 3900 92.85714285714286
115 45 4000 88.88888888888889
025 47 4350 92.55319148936171
125 50 4450 89.0
035 52 4550 87.5
044 52 4550 87.5
135 55 4650 84.54545454545455
144 55 4650 84.54545454545455
045 62 4950 79.83870967741936
145 65 5050 77.6923076923077
055 72 5350 74.30555555555556
155 75 5450 72.66666666666667
255 80 5900 73.75
355 85 6100 71.76470588235294
445 85 6100 71.76470588235294
455 95 6500 68.42105263157895
555 105 6900 65.71428571428571
556 115 7800 67.82608695652173
557 125 8400 67.2
567 135 9300 68.88888888888889
577 145 9900 68.27586206896552
677 155 10800 69.6774193548387
777 165 11400 69.0909090909091
今は、3回線でほぼ max 20Gでそれもめったにない。12G or 15G くらいなので今回の基本料金の改定はメリットないかな。。。
ubuntu での swapの追加
もう簡単な作業は chatgpt なりに聞いてほぼそのとおりに。
ちょっとメモリ使う演算があるので、メモリが10Gくらいでは足りないので、swapでさらに10G追加することにした。
rootで次の作業であっさり追加。
# swapon --show
NAME TYPE SIZE USED PRIO
/swap.img file 3.8G 3.7G -2
# free -h
total used free shared buff/cache available
Mem: 12Gi 11Gi 146Mi 88Mi 359Mi 187Mi
Swap: 4Gi 0Gi 4Gi
# fallocate -l 10G /swapfile
# chmod 600 /swapfile
# mkswap /swapfile
# swapon /swapfile
# swapon --show
NAME TYPE SIZE USED PRIO
/swap.img file 3.8G 3.7G -2
/swapfile file 10G 0B -3
# free -h
total used free shared buff/cache available
Mem: 12Gi 11Gi 145Mi 88Mi 359Mi 187Mi
Swap: 13Gi 3.7Gi 10Gi
# emacs /etc/fstab
# grep swapfile /etc/fstab
/swapfile none swap sw 0 0
とりあえずこれくらい増やして様子見。
QNAP TS-233 HDD置き換えでの容量増加
RAID1 3Tx2 で組んでいたのを、6Tx2にしようとして、1台ずつ交換。
1本目を入替、rebuild が終了した段階で2本目を入れるということで、データはそのままでまずは移行ができた。
このあと、RAID1の容量増加作業+プールの容量増加という手順で利用可能容量も増やせるというはずだったが、webの管理画面ではRAID1の容量増加メニューが出てこない。
https://docs.qnap.com/operating-system/qts/5.2.x/ja-jp/%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%81%AE%E5%85%A8%E4%BA%A4%E6%8F%9B%E3%81%AB%E3%82%88%E3%82%8B-raid-%E3%82%B0%E3%83%AB%E3%83%BC%E3%83%97%E3%81%AE%E6%8B%A1%E5%BC%B5-8BC47F81.html
には、
すべてのディスクが交換され、リビルドが終了すると、[容量の拡張]ボタンが有効になります。とあるが、これが出てこない。
chatgpt 他に聞くと、どうも armベースのものではGUIで操作はできなくて Intelのものだけでできるということのよう。
対処方法は、
https://blog.frals.se/2017/10/16/manually-expanding-qnap-storage-pool/
で、ssh でログインして、
mdadm --grow /dev/md0 --size=maxを実行。うちは md1 だったが。
これを実行したら、
NAS はビープ音を鳴らし、RAID グループのステータスは[同期中]に変わります。になった。
同期が終了したところで、pool のほうを増やす。こちらはちゃんとGUIで出てきた。
clamav-0.104 on FreeBSD9
IIJmio の3つのsimで容量シェアしたときに一番安い組み合わせ(2025/03)
以前、IIJmio の3つのsimで容量シェアしたときに一番安い組み合わせ で試算した結果を載せていたが、2025年03月から料金体系が少し変わるというので、再度計算しなおしておく。
0=2G=750円,1=5G=850円,2=10G=1300円,3=15G=1700円,4=25G=1900円,5=35G=2300円,6=45G=3200円,7=55G=3800円
ということになっている。
購入パターン、ギガ数、価格、1G当たりの単価
000 6 2250 375.0
001 9 2350 261.1111111111111
011 12 2450 204.16666666666666
111 15 2550 170.0
012 17 2900 170.58823529411765
112 20 3000 150.0
013 22 3300 150.0
004 29 3400 117.24137931034483
014 32 3500 109.375
114 35 3600 102.85714285714286
005 39 3800 97.43589743589743
015 42 3900 92.85714285714286
115 45 4000 88.88888888888889
025 47 4350 92.55319148936171
125 50 4450 89.0
044 52 4550 87.5
144 55 4650 84.54545454545455
045 62 4950 79.83870967741936
145 65 5050 77.6923076923077
055 72 5350 74.30555555555556
155 75 5450 72.66666666666667
255 80 5900 73.75
445 85 6100 71.76470588235294
455 95 6500 68.42105263157895
555 105 6900 65.71428571428571
556 115 7800 67.82608695652173
557 125 8400 67.2
567 135 9300 68.88888888888889
577 145 9900 68.27586206896552
677 155 10800 69.6774193548387
777 165 11400 69.0909090909091
Heaven Is A Place On Earth
2025/02/02の ヴォイスミツシマ でかかった曲。
備忘録として。ゲスト 渡辺未来雄 さん
https://www.nhk.jp/p/voicemitsushima/rs/GVNRZRXZRV/
Belinda Carlisle - Heaven Is A Place On Earth (Official HD Music Video)
https://www.youtube.com/watch?v=j2F4INQFjEI
milter-manager on FreeBSD-14.2で、clamav-milter を認識しない。
FreeBSD-14.0では何も問題が無かった milter関係の設定で、milter-manager --show-config を行うと、インストールしたはずの clamav-milter だけを見つけてくれない。同時にインストールした、spamass,enma,opendkim は見つけてくれるのに。
chagpt に相談したらダメだったけど、claudeだと clamav-milter の設定ファイルの変更に気づかせてくれた。
起動スクリプトが、/usr/local/etc/rc.d/clamav-milter だったのが、/usr/local/etc/rc.d/clamav_milter に変更になっていた。
/usr/ports/UPDATING にも、
20240912:
AFFECTS: security/clamav, security/clamav-lts
AUTHOR: netchildFreeBSD.org
The start scripts of clamav have been renamed to clamav_clamd,
clamav_freshclam and clamav_milter for improved compatibility with
other parts of the system. The automatic start at boot (rc.conf
variable settings) is not affected, but if you have some other
automatism you may want to change
".../etc/rc.d/clamav-clamd" to ".../etc/rc.d/clamav_clamd"
".../etc/rc.d/clamav-freshclam" to ".../etc/rc.d/clamav_freshclam"
".../etc/rc.d/clamav-milter" to ".../etc/rc.d/clamav_milter"
or
"service clamav-clamd ..." to "service clamav_clamd ..."
"service clamav-freshclam" to "service clamav_freshclam ..."
"service clamav-milter ..." to "service clamav_milter ..."
とあって、この名前変更について、milter-manager のほうが追従していない、ということだった。milter-manager も最近はそんなにアップデートされていないから、これはしょうがない。
とりあえず、milter-namager に ln -s して、milter-manager 側の自動認識スクリプトが見つけられるようにすることで解消できた。
NFS mount on QNAP (from FreeBSD)
QNAP(5.2) で NFSサーバを起動して、FreeBSD (Unix)側からマウントするときに、ユーザーマッピングをどうするか?の問題。
といっても、変にマッピングするのではなくて、client側のuid/gid でそのままアクセスに行ってくれればいい。NFSで guest利用のようなことは特に考えていないので。
となると、
https://www.qnap.com/ja-jp/how-to/faq/article/how-to-access-files-on-nas-via-nfs-from-unixlinux-clients
にある、'Example2: SQUASH_NO_USER)' で良いようだ。
セキュリティ的には Example1: SQUASH_ROOT_USER にしておきたい(client側のroot(uid=0)が nfsサーバ側のuidと同権限にするのは・・・)が、何かちゃんとNFSマウントしたトップディレクトリにアクセスできない。
unixbench での比較(mac mini late 2012 vs mac mini M4 2024)
この blogは、mac mini late 2012(Intel Core7i 16G, 1TB ) に vmware fusion 上の FreeBSD で動かしているが、さすがにいつ壊れてもおかしくないと思うので、昨年でた mac mini m4 (24G ,SSD 512G )を購入して、そちらに引っ越そうかと思う。
性能としてどれくらい違うだろうかと思うので、簡単に unixbench でベンチマークを取ってみた。
Mac Mini Late 2012: Intel Core7i
VMware Fusion 12.0
FreeBSD 14.0-Release(amd64) memory 4G
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: mina2_2024: FreeBSD
OS: FreeBSD -- 14.0-RELEASE-p6 -- FreeBSD 14.0-RELEASE-p6 #0: Tue Mar 26 20:26:20 UTC 2024 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC
Machine: amd64 (GENERIC)
Language: C.UTF-8 (charmap="UTF-8")
CPU 0: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (0.0 bogomips)
amd64
CPU 1: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (0.0 bogomips)
amd64
CPU 2: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (0.0 bogomips)
amd64
CPU 3: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (0.0 bogomips)
amd64
11:42AM up 58 days, 16:13, 2 users, load averages: 0.59, 0.48, 0.44;
------------------------------------------------------------------------
Benchmark Run: Tue Jan 07 2025 11:42:53 - 12:10:58
4 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 34585196.7 lps (10.0 s, 7 samples)
Double-Precision Whetstone 5890.6 MWIPS (9.2 s, 7 samples)
Execl Throughput 2271.5 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 311803.4 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 88674.0 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 856946.9 KBps (30.0 s, 2 samples)
Pipe Throughput 1200476.5 lps (10.0 s, 7 samples)
Pipe-based Context Switching 135150.2 lps (10.0 s, 7 samples)
Process Creation 4470.0 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5857.9 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 1771.9 lpm (60.0 s, 2 samples)
System Call Overhead 687022.4 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 34585196.7 2963.6
Double-Precision Whetstone 55.0 5890.6 1071.0
Execl Throughput 43.0 2271.5 528.2
File Copy 1024 bufsize 2000 maxblocks 3960.0 311803.4 787.4
File Copy 256 bufsize 500 maxblocks 1655.0 88674.0 535.8
File Copy 4096 bufsize 8000 maxblocks 5800.0 856946.9 1477.5
Pipe Throughput 12440.0 1200476.5 965.0
Pipe-based Context Switching 4000.0 135150.2 337.9
Process Creation 126.0 4470.0 354.8
Shell Scripts (1 concurrent) 42.4 5857.9 1381.6
Shell Scripts (8 concurrent) 6.0 1771.9 2953.2
System Call Overhead 15000.0 687022.4 458.0
========
System Benchmarks Index Score 883.4
------------------------------------------------------------------------
Benchmark Run: Tue Jan 07 2025 12:10:58 - 12:39:17
4 CPUs in system; running 4 parallel copies of tests
Dhrystone 2 using register variables 107954176.8 lps (10.0 s, 7 samples)
Double-Precision Whetstone 21186.5 MWIPS (9.6 s, 7 samples)
Execl Throughput 7154.9 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 24149.4 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 12583.4 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 76633.5 KBps (30.0 s, 2 samples)
Pipe Throughput 3861072.1 lps (10.0 s, 7 samples)
Pipe-based Context Switching 514338.7 lps (10.0 s, 7 samples)
Process Creation 21121.8 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 13723.6 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 1706.3 lpm (60.1 s, 2 samples)
System Call Overhead 2308270.3 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 107954176.8 9250.6
Double-Precision Whetstone 55.0 21186.5 3852.1
Execl Throughput 43.0 7154.9 1663.9
File Copy 1024 bufsize 2000 maxblocks 3960.0 24149.4 61.0
File Copy 256 bufsize 500 maxblocks 1655.0 12583.4 76.0
File Copy 4096 bufsize 8000 maxblocks 5800.0 76633.5 132.1
Pipe Throughput 12440.0 3861072.1 3103.8
Pipe-based Context Switching 4000.0 514338.7 1285.8
Process Creation 126.0 21121.8 1676.3
Shell Scripts (1 concurrent) 42.4 13723.6 3236.7
Shell Scripts (8 concurrent) 6.0 1706.3 2843.9
System Call Overhead 15000.0 2308270.3 1538.8
========
System Benchmarks Index Score 1108.5
mac mini M4 24G SSD 512G(MVMe)
VMWare Fusion Pro 13.6.2
FreeBSD 14.2 (aarch64) Memory 4G
BYTE UNIX Benchmarks (Version 5.1.3)
System: mina2_2025: FreeBSD
OS: FreeBSD -- 14.2-RELEASE -- FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC
Machine: arm64 (GENERIC)
Language: C.UTF-8 (charmap="UTF-8")
CPU 0: Apple Unknown CPU r0p0 (midr: 610f0000) (0.0 bogomips)
arm64
CPU 1: Apple Unknown CPU r0p0 (midr: 610f0000) (0.0 bogomips)
arm64
CPU 2: Apple Unknown CPU r0p0 (midr: 610f0000) (0.0 bogomips)
arm64
CPU 3: Apple Unknown CPU r0p0 (midr: 610f0000) (0.0 bogomips)
arm64
12:39PM up 3:56, 1 user, load averages: 0.11, 0.16, 1.10;
Benchmark Run: Tue Jan 07 2025 12:39:40 - 13:07:36
4 CPUs in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 127206639.9 lps (10.0 s, 7 samples)
Double-Precision Whetstone 12312.0 MWIPS (8.9 s, 7 samples)
Execl Throughput 5609.3 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 548326.2 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 175043.5 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 1223810.8 KBps (30.0 s, 2 samples)
Pipe Throughput 4712182.1 lps (10.0 s, 7 samples)
Pipe-based Context Switching 532173.3 lps (10.0 s, 7 samples)
Process Creation 16213.6 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 20450.1 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 5957.0 lpm (60.0 s, 2 samples)
System Call Overhead 2394584.2 lps (10.1 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 127206639.9 10900.3
Double-Precision Whetstone 55.0 12312.0 2238.6
Execl Throughput 43.0 5609.3 1304.5
File Copy 1024 bufsize 2000 maxblocks 3960.0 548326.2 1384.7
File Copy 256 bufsize 500 maxblocks 1655.0 175043.5 1057.7
File Copy 4096 bufsize 8000 maxblocks 5800.0 1223810.8 2110.0
Pipe Throughput 12440.0 4712182.1 3787.9
Pipe-based Context Switching 4000.0 532173.3 1330.4
Process Creation 126.0 16213.6 1286.8
Shell Scripts (1 concurrent) 42.4 20450.1 4823.1
Shell Scripts (8 concurrent) 6.0 5957.0 9928.4
System Call Overhead 15000.0 2394584.2 1596.4
========
System Benchmarks Index Score 2458.5
------------------------------------------------------------------------
Benchmark Run: Tue Jan 07 2025 13:07:36 - 13:35:36
4 CPUs in system; running 4 parallel copies of tests
Dhrystone 2 using register variables 482258262.4 lps (10.0 s, 7 samples)
Double-Precision Whetstone 43340.0 MWIPS (9.0 s, 7 samples)
Execl Throughput 13548.3 lps (29.8 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 85818.7 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 21307.4 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 311114.5 KBps (30.0 s, 2 samples)
Pipe Throughput 16790620.7 lps (10.0 s, 7 samples)
Pipe-based Context Switching 4949744.0 lps (10.0 s, 7 samples)
Process Creation 77847.8 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 46849.8 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 6125.1 lpm (60.0 s, 2 samples)
System Call Overhead 8532850.5 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 482258262.4 41324.6
Double-Precision Whetstone 55.0 43340.0 7880.0
Execl Throughput 43.0 13548.3 3150.8
File Copy 1024 bufsize 2000 maxblocks 3960.0 85818.7 216.7
File Copy 256 bufsize 500 maxblocks 1655.0 21307.4 128.7
File Copy 4096 bufsize 8000 maxblocks 5800.0 311114.5 536.4
Pipe Throughput 12440.0 16790620.7 13497.3
Pipe-based Context Switching 4000.0 4949744.0 12374.4
Process Creation 126.0 77847.8 6178.4
Shell Scripts (1 concurrent) 42.4 46849.8 11049.5
Shell Scripts (8 concurrent) 6.0 6125.1 10208.5
System Call Overhead 15000.0 8532850.5 5688.6
========
System Benchmarks Index Score 3836.5
3倍くらい速くなった???