2021年12月30日木曜日

スパコーン 77TB の件

https://www.itmedia.co.jp/news/articles/2112/29/news040.html

TL上でもチラチラ見かけた件。原因となった挙動、bashソースコードのこの部分だねというのも出てた気がする。むかーしからなんだろうか。

実行中に書き換えたり cp したりしようなどと思ったことはなかったので、bash は実行時に適時読み込みますという記述で初めてこの挙動を知った。いやはや。

お〜確かにそうだねという↓これは sleep 中に、ささっと別ターミナルで  hoge!! 部分を fuga!! と書いた fuga.sh を cp  。Fedora 35 で。

$ cat hoge.sh; echo; bash --version ; bash -x ./hoge.sh ;echo ; cat hoge.sh
sleep 10
echo "$0: hoge!!"

GNU bash, バージョン 5.1.8(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
ライセンス GPLv3+: GNU GPL バージョン 3 またはそれ以降 <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ sleep 10
+ echo './hoge.sh: fuga!!'
./hoge.sh: fuga!!

sleep 10
echo "$0: fuga!!"

 

zsh の場合

$ cat hoge.sh; echo; zsh --version ; zsh -x ./hoge.sh ;echo ; cat hoge.sh
sleep 10
echo "$0: hoge!!"

zsh 5.8 (x86_64-redhat-linux-gnu)
+./hoge.sh:1> sleep 10
+./hoge.sh:2> echo './hoge.sh: hoge!!'
./hoge.sh: hoge!!

sleep 10
echo "$0: fuga!!" 

長いスクリプトだと違ってきそうな? zsh で -x だとスクリプト名も入る、というのをついでに知れた。

 

追記: FreeBSD 13 の "sh" で何行か echo させてみると冒頭は hoge で途中から fuga 。上のそのままにその後適当にecho

echo "01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
(中略。20まで。)

echo "20:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"

で実行中に裏で cp すれば途中から変わった。

$ head -2 hoge2.sh ; echo ; sh -x ./hoge2.sh
sleep 10
echo "$0: hoge!!"

+ sleep 10
+ echo './hoge2.sh: hoge!!'
./hoge2.sh: hoge!!
+ echo 01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

(略)

+ echo 17:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
17:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 18:hugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
18:hugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ echo 19:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
19:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ echo 20:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
20:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

↑の18: のところ。1024文字(バイト)っぽい。

(パッケージの) zsh だと変わらず、hoge 。どうなってるかはあとはコード見るのが早いな。

どことなく、昔あった BSD magazine の「デーモン君のソース探検」っぽさを感じた。「うわーん、実行中のスクリプトをコピーして置き換えたら何たらかんたら・・」で、パパが「どれどれ、では sh のソースを見てみようか」的な。いやまぁ、そもそもそんなオペレーションをするなという話ではあるけど。。学びがあるね。


さらに追記: OpenBSD 7.0 の、"ksh" ( /bin/sh が /bin/ksh )

$ ksh -x  hoge.sh
+ sleep 10
+ echo hoge.sh: hoge!!
hoge.sh: hoge!!
+ echo 01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

(略)

+ echo 09:hogeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
09:hogeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ echo 10:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
10:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

ホゲーーーが途中から ホゲーーーああああになった。512文字(バイト)。

・・・じゃ、Fedora 35 の ksh 。

$ ksh --version; ksh  -x  hoge.sh
  version         sh (AT&T Research) 93u+m/1.0.0-beta.1 2021-05-10
+ sleep 10
+ echo 'hoge.sh: hoge!!'
hoge.sh: hoge!!
+ echo 01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
 (略)

+ echo 18:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
18:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 19:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
19:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 20:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
20:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

hoge のまま。

$ rpm -qi ksh
Name        : ksh
Epoch       : 3
Version     : 1.0.0~beta.1
Release     : 1.fc35
Architecture: x86_64
Install Date: 2021年12月30日 08時41分02秒
Group       : Unspecified
Size        : 3166151
License     : EPL-1.0
Signature   : RSA/SHA256, 2021年08月03日 12時24分51秒, Key ID db4639719867c58f
Source RPM  : ksh-1.0.0~beta.1-1.fc35.src.rpm
Build Date  : 2021年08月03日 12時08分15秒
Build Host  : buildvm-x86-08.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.kornshell.com/
Bug URL     : https://bugz.fedoraproject.org/ksh
Summary     : The Original ATT Korn Shell
Description :
KSH-93 is the most recent version of the KornShell by David Korn of
AT&T Bell Laboratories.
KornShell is a shell programming language, which is upward compatible
with "sh" (the Bourne Shell)

 

では今度はFreeBSDの ksh パッケージをば・・と思ったが ksh オオスギィ!

$ pkg search ksh|grep Korn
ast-ksh-20141224_1             KornShell 93
ksh2020-2020_1                 Development branch of AT&T KornShell 93
ksh93-93.u_1,2                 AT&T KornShell 93
ksh93-devel-2020.06.30         Development branch of AT&T KornShell 93
mksh-59c                       MirBSD Korn Shell
oksh-6.9,1                     Portable OpenBSD Korn shell
pdksh-5.2.14p2_6               The Public Domain Korn Shell

まぁ oksh が OpenBSD のそれと同じ挙動でしょう、と予測し答え合わせ。

$ oksh -x hoge2.sh
+ sleep 10
+ echo hoge2.sh: hoge!!
hoge2.sh: hoge!!
+ echo 01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
(snip)

+ echo 09:hogeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
09:hogeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ echo 10:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
10:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

正解。

以下 pdksh と ksh93

$ ksh -x  hoge2.sh  
+ alias h=fc -l
+ alias j=jobs
+ alias m=less
+ alias ll=ls -laFo
+ alias l=ls -l
+ alias g=egrep -i
+ sleep 10
+ echo hoge2.sh: hoge!!
hoge2.sh: hoge!!
+ echo 01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 

(中略)ところで alias が出てくるの何・・・?

+ echo 09:hogeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
09:hogeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ echo 10:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
10:fugaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

 

$ ksh93 -x hoge2.sh  
+ sleep 10
+ echo 'hoge2.sh: hoge!!'
hoge2.sh: hoge!!
+ echo 01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
01:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
02:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
03:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

(中略)

+ echo 18:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
18:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 19:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
19:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
+ echo 20:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
20:hogeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee


$ pkg info -f oksh pdksh  ksh93
oksh-6.9,1
Name           : oksh
Version        : 6.9,1
Installed on   : Fri Dec 10 03:35:22 2021 JST
Origin         : shells/oksh
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : shells
Licenses       : PD
Maintainer     : tobik@FreeBSD.org
WWW            : https://github.com/ibara/oksh
Comment        : Portable OpenBSD Korn shell
Options        :
    CURSES         : on
    STATIC         : off
Annotations    :
    FreeBSD_version: 1300139
    repo_type      : binary
    repository     : FreeBSD
Flat size      : 324KiB
Description    :
oksh is the portable version of the OpenBSD Korn shell, a continuation
of the Public Domain Korn Shell (PDKSH).  Its command language is a
superset of the sh(1) shell language.  oksh is best known as the
default user shell and /bin/sh on OpenBSD.

WWW: https://github.com/ibara/oksh
pdksh-5.2.14p2_6
Name           : pdksh
Version        : 5.2.14p2_6
Installed on   : Fri Dec 10 03:38:58 2021 JST
Origin         : shells/pdksh
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : shells
Licenses       : BSD3CLAUSE
Maintainer     : rodrigo@FreeBSD.org
WWW            : http://www.cs.mun.ca/~michael/pdksh/
Comment        : The Public Domain Korn Shell
Options        :
    STATIC         : off
Annotations    :
    FreeBSD_version: 1300139
    repo_type      : binary
    repository     : FreeBSD
Flat size      : 320KiB
Description    :
PDKSH is the Public Domain Korn Shell. Its command language is a
superset of the sh(1) shell language.

WWW: http://www.cs.mun.ca/~michael/pdksh/
ksh93-93.u_1,2
Name           : ksh93
Version        : 93.u_1,2
Installed on   : Fri Dec 10 03:38:58 2021 JST
Origin         : shells/ksh93
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : shells
Licenses       : EPL
Maintainer     : cy@FreeBSD.org
WWW            : http://www.kornshell.com/
Comment        : AT&T KornShell 93
Options        :
    EXAMPLES       : on
    KSH            : off
    KSH93          : on
    STATIC         : off
Annotations    :
    FreeBSD_version: 1300139
    repo_type      : binary
    repository     : FreeBSD
Flat size      : 1.94MiB
Description    :
KSH-93 is the most recent version of the KornShell Language described
in "The KornShell Command and Programming Language," by Morris
Bolsky and David Korn of AT&T Bell Laboratories.  The KornShell is
a shell programming language, which is upward compatible with "sh"
(the Bourne Shell), and is intended to conform to the IEEE P1003.2/ISO
9945.2 Shell and Utilities standard.  KSH-93 provides an enhanced
programming environment in addition to the major command-entry
features of the BSD shell "csh".  With KSH-93, medium-sized programming
tasks can be performed at shell-level without a significant loss
in performance.  In addition, "sh" scripts can be run on KSH-93
without modification.

WWW: http://www.kornshell.com/

 

そういえば OmniOS は消しちゃったな・・・


2021年12月27日月曜日

レコードプレーヤーを買った

ここしばらく帰っていない実家(と言っていいのか、いまだによくわからない家) で古ーいレコードがいくつか見つかったらしく、「どうすればいい?」と・・。

当然自分のものではなく、どこぞに売ったとして二束三文でつまらないだろうと思ったのでレコードプレーヤーを買って送ることにした。実家の者みずから買って楽しんでいる、ということがないことから「本格派!」なものでなくてよかろ・・。それだけで音が出せる手軽なもので探した結果買ったのは ION Audio  Max LP

2014年末に出てたものらしい https://info.shimamura.co.jp/digital/newitem/2014/11/39583

最初は下位機種?のArchive LP にしかけたが「カバーがなくてほこりがきて嫌」といった文句が予想されたのでカバー付きのにした。デジタル化の機能が云々と書かれていて結構前のmacOS/iOS から非対応だけども、対応してても多分使わないだろうから気にしないことにした。自分が使うものならマイナスポイントにはなるかな。

日本のメーカーで Max LP 並のものがあるかなとちょっと期待していたけど、見つからず残念。 探し方が悪いかもしれない。

交換針も定期的に送らないとダメなんだろうなと思いつつも、まぁいいでしょう。この「自分のことではないけど調べて、買って、送る」をするのが良いのかと思うとやや疑問ではある。「再生する気がないなら捨てればいいし、再生するなら今もレコードプレーヤー売ってるよ、お店の人に聞くのがよろしい」で終わらすことはできた。

しかし、レコードのことさっぱりわからないので調べてみると少しややこしかった。回転数いくつとか、EP? LP?コンパクト盤?ドーナツ盤?と。そういえば針をどこから落とすのかも知らない。未知との遭遇。

レコードとは https://www.audio-technica.co.jp/cartridge/navi/whatis/index.php

円盤のものだと CD をトレイに置いて(または突起にはめて)再生ポチー、からしか知らないので 8cm か 12cm かだけの違いだったのよね。なんとなくレコードは「余裕のある人のオーディオ」という印象を受けたね。

 

M1 Mac #4

ヴイエムウェアは今もまだプレビューなので VMware Fusion Tech Preview をインストール。「プロフェッショナル バージョン e.x.p (18656771)」

 

パラレルズはすでにプレビューでなく対応済みなのよね・・

https://www.parallels.com/jp/news/press-releases/show/pd17-for-mac-launches/

何年かぶりにパラレルズに戻るのもありかもしれない。しかしそもそも arm64 な vm が手元に要るかというと、そうでもないかも。


それはさておき VMware 上で適当に Debian やら Fedora をインストール。

$ uname -mrsv
Linux 5.10.0-10-arm64 #1 SMP Debian 5.10.84-1 (2021-12-08) aarch64

$ uname -mrsv
Linux 5.15.10-200.fc35.aarch64 #1 SMP Fri Dec 17 14:30:23 UTC 2021 aarch64

インストール時のオペレーティングシステムの選択、 「その他」で FreeBSD 14 があるのはどういうことなんだろう。「使うのは当然 CURRENT ですよね」ということ?

Linux は、intel 版のときにあった RHEL や CentOS は無い。


 


2021年12月25日土曜日

「やめる」を考える

お仕事ではなく。

やはり「何をするか」も大事だけど、「何をやめるか(しないか)」もちゃんとねという。 

ああ、第3の習慣な感じ。

2021年12月14日火曜日

都合のいい解釈

Java のスローガン? のひとつ、

https://docs.oracle.com/javase/tutorial/getStarted/intro/changemylife.html

  • Write once, run anywhere: Because applications written in the Java programming language are compiled into machine-independent bytecodes, they run consistently on any Java platform.

 と書かれている内容以外のものを勝手に付け足して解釈している様を観測した。

「なるほどそういう意味だったんですね」で終わらずに悪魔の証明に展開していて、もやもやっとしてしまい嗚呼変なものをみてしまった・・・という感想と同時にそういう「やり方」もあるんだなと思った。

2021年12月13日月曜日

M1 Mac #3

sysctl の違い

sysctl -a  の項目数 -  intel MBP(2018): 1626, M1Pro MBP: 1464

diff

@@ -5,4 +4,0 @@
-debug.acpi_flags
-debug.acpi_layer
-debug.acpi_level
-debug.agpm.LogLevel
@@ -26,70 +22,3 @@
-debug.intel.GlobalUsageTotal_Busy_nSec
-debug.intel.GlobalUsageTotal_nSec
-debug.intel.IGInterruptControl
-debug.intel.dtraceEnable
-debug.intel.flipCount
-debug.intel.gpuUsageEnables
-debug.intel.gpuUsageEnablesCheck
-debug.intel.graphicsFirmwareTracePointEnable
-debug.intel.graphicsTracePointEnable
-debug.intel.kdctlVersion
-debug.intel.mSecCalcGPUBusy
-debug.intel.oaEnable
-debug.intel.perfEventEnable
-debug.intel.ringBlitUsage
-debug.intel.ringBlit_nSec
-debug.intel.ringMainUsage
-debug.intel.ringMain_nSec
-debug.intel.ringMediaUsage
-debug.intel.ringMedia_nSec
-debug.intel.ringOnSample
-debug.intel.ringTakeSample
-debug.intel.ringVEBoxUsage
-debug.intel.ringVEBox_nSec
-debug.intel.schedEnableThrottleOverride
-debug.intel.schedPriCreditsHigh
-debug.intel.schedPriCreditsLow
-debug.intel.schedPriCreditsNormal
-debug.intel.schedPriCreditsNormalHigh
-debug.intel.schedPriElevatePID
-debug.intel.schedPriPreemption
-debug.intel.schedThrottleHighPriByVal
-debug.intel.schedThrottleLowPriByVal
-debug.intel.schedThrottleNormalHighPriByVal
-debug.intel.schedThrottleNormalPriByVal
-debug.intel.swapCount
-debug.intel.telemetryAltConfig
-debug.intel.telemetryConfig
-debug.intel.telemetryMode
-debug.intel.telemetryNumFrame
-debug.intel.telemetrySampleLocations
-debug.intel.telemetrySpot1
-debug.intel.telemetryStartFrame
-debug.intel.telemetryStatPasses
-debug.intel.telemetryStopFrame
-debug.intel.telemetryTestCase
-debug.intel.telemetryUsageReportmSec
-debug.intel.telemetryVersion
-debug.intel.temp0
-debug.intel.temp1
-debug.intel.temp2
-debug.intel.temp3
-debug.intel.temp4
-debug.intelfb.FBInfo
-debug.intelfb.FakeType2Dongle
-debug.intelfb.IGInterruptControl
-debug.intelfb.enableDECounting
-debug.intelfb.enableGTHWFreqRead
-debug.intelfb.euInfo
-debug.intelfb.fLastRequestedPState
-debug.intelfb.forceDither
-debug.intelfb.forceSlicesEUx
-debug.intelfb.forceSlicesGTx
-debug.intelfb.graphicsTracePointEnable
-debug.intelfb.sliceInfo
-debug.intelfb.temp0
-debug.intelfb.temp1
-debug.intelfb.temp2
-debug.intelfb.temp3
-debug.intelfb.temp4
-debug.intelfb.testCase
+debug.iogpu.dynamic_lwm
+debug.iogpu.wired_limit
+debug.iogpu.wired_lwm_mb
@@ -97 +25,0 @@
-debug.ioppf
@@ -111,0 +40,3 @@
+debug.mcc_channel_counters
+debug.mcc_clampwaycount
+debug.mcc_debug
@@ -120,3 +50,0 @@
-hw.busfrequency
-hw.busfrequency_max
-hw.busfrequency_min
@@ -129,3 +56,0 @@
-hw.cpufrequency
-hw.cpufrequency_max
-hw.cpufrequency_min
@@ -134 +58,0 @@
-hw.cputhreadtype
@@ -135,0 +60 @@
+hw.ephemeral_storage
@@ -140 +64,0 @@
-hw.l3cachesize
@@ -146,15 +70,44 @@
-hw.optional.adx
-hw.optional.aes
-hw.optional.avx1_0
-hw.optional.avx2_0
-hw.optional.avx512bw
-hw.optional.avx512cd
-hw.optional.avx512dq
-hw.optional.avx512f
-hw.optional.avx512ifma
-hw.optional.avx512vbmi
-hw.optional.avx512vl
-hw.optional.bmi1
-hw.optional.bmi2
-hw.optional.enfstrg
-hw.optional.f16c
+hw.optional.AdvSIMD
+hw.optional.AdvSIMD_HPFPCvt
+hw.optional.arm.FEAT_AES
+hw.optional.arm.FEAT_BF16
+hw.optional.arm.FEAT_BTI
+hw.optional.arm.FEAT_CSV2
+hw.optional.arm.FEAT_CSV3
+hw.optional.arm.FEAT_DPB
+hw.optional.arm.FEAT_DPB2
+hw.optional.arm.FEAT_DotProd
+hw.optional.arm.FEAT_ECV
+hw.optional.arm.FEAT_FCMA
+hw.optional.arm.FEAT_FHM
+hw.optional.arm.FEAT_FP16
+hw.optional.arm.FEAT_FPAC
+hw.optional.arm.FEAT_FRINTTS
+hw.optional.arm.FEAT_FlagM
+hw.optional.arm.FEAT_FlagM2
+hw.optional.arm.FEAT_I8MM
+hw.optional.arm.FEAT_JSCVT
+hw.optional.arm.FEAT_LRCPC
+hw.optional.arm.FEAT_LRCPC2
+hw.optional.arm.FEAT_LSE
+hw.optional.arm.FEAT_LSE2
+hw.optional.arm.FEAT_PAuth
+hw.optional.arm.FEAT_PAuth2
+hw.optional.arm.FEAT_PMULL
+hw.optional.arm.FEAT_RDM
+hw.optional.arm.FEAT_SB
+hw.optional.arm.FEAT_SHA1
+hw.optional.arm.FEAT_SHA256
+hw.optional.arm.FEAT_SHA3
+hw.optional.arm.FEAT_SHA512
+hw.optional.arm.FEAT_SPECRES
+hw.optional.arm.FEAT_SSBS
+hw.optional.arm64
+hw.optional.armv8_1_atomics
+hw.optional.armv8_2_fhm
+hw.optional.armv8_2_sha3
+hw.optional.armv8_2_sha512
+hw.optional.armv8_3_compnum
+hw.optional.armv8_crc32
+hw.optional.armv8_gpi
+hw.optional.breakpoint
@@ -162,14 +115,6 @@
-hw.optional.fma
-hw.optional.hle
-hw.optional.mmx
-hw.optional.mpx
-hw.optional.rdrand
-hw.optional.rtm
-hw.optional.sgx
-hw.optional.sse
-hw.optional.sse2
-hw.optional.sse3
-hw.optional.sse4_1
-hw.optional.sse4_2
-hw.optional.supplementalsse3
-hw.optional.x86_64
+hw.optional.neon
+hw.optional.neon_fp16
+hw.optional.neon_hpfp
+hw.optional.ucnormal_mem
+hw.optional.watchpoint
+hw.osenvironment
@@ -180 +124,0 @@
-hw.perflevel0.cpusperl3
@@ -184 +127,0 @@
-hw.perflevel0.l3cachesize
@@ -188,0 +132,8 @@
+hw.perflevel1.cpusperl2
+hw.perflevel1.l1dcachesize
+hw.perflevel1.l1icachesize
+hw.perflevel1.l2cachesize
+hw.perflevel1.logicalcpu
+hw.perflevel1.logicalcpu_max
+hw.perflevel1.physicalcpu
+hw.perflevel1.physicalcpu_max
@@ -194,0 +146 @@
+hw.use_recovery_securityd
@@ -199,0 +152 @@
+kern.amfm_log_ctl
@@ -204 +156,0 @@
-kern.auxiliaryfilesetuuid
@@ -210 +161,0 @@
-kern.bridge.bootsessionuuid
@@ -215,0 +167,2 @@
+kern.cpu_checkin_interval
+kern.darkboot
@@ -252,5 +205,4 @@
-kern.hv.clock.generation
-kern.hv.clock.tsc_base
-kern.hv.clock.tsc_clock_last
-kern.hv.vmx_mitigations
-kern.hv.vmx_supported_mitigations
+kern.hv.ipa_size_16k
+kern.hv.ipa_size_4k
+kern.hv.max_address_spaces
+kern.hv.supported
@@ -263 +214,0 @@
-kern.interrupt_timer_coalescing_enabled
@@ -475,4 +426,12 @@
-kern.skywalk.flowswitch.ap1.ipfm.frag_count
-kern.skywalk.flowswitch.ap1.ipfm.frag_limit
-kern.skywalk.flowswitch.ap1.ipfm.queue_count
-kern.skywalk.flowswitch.ap1.ipfm.queue_limit
+kern.skywalk.flowswitch.anpi0.ipfm.frag_count
+kern.skywalk.flowswitch.anpi0.ipfm.frag_limit
+kern.skywalk.flowswitch.anpi0.ipfm.queue_count
+kern.skywalk.flowswitch.anpi0.ipfm.queue_limit
+kern.skywalk.flowswitch.anpi1.ipfm.frag_count
+kern.skywalk.flowswitch.anpi1.ipfm.frag_limit
+kern.skywalk.flowswitch.anpi1.ipfm.queue_count
+kern.skywalk.flowswitch.anpi1.ipfm.queue_limit
+kern.skywalk.flowswitch.anpi2.ipfm.frag_count
+kern.skywalk.flowswitch.anpi2.ipfm.frag_limit
+kern.skywalk.flowswitch.anpi2.ipfm.queue_count
+kern.skywalk.flowswitch.anpi2.ipfm.queue_limit
@@ -503,4 +462,8 @@
-kern.skywalk.flowswitch.en9.ipfm.frag_count
-kern.skywalk.flowswitch.en9.ipfm.frag_limit
-kern.skywalk.flowswitch.en9.ipfm.queue_count
-kern.skywalk.flowswitch.en9.ipfm.queue_limit
+kern.skywalk.flowswitch.en5.ipfm.frag_count
+kern.skywalk.flowswitch.en5.ipfm.frag_limit
+kern.skywalk.flowswitch.en5.ipfm.queue_count
+kern.skywalk.flowswitch.en5.ipfm.queue_limit
+kern.skywalk.flowswitch.en6.ipfm.frag_count
+kern.skywalk.flowswitch.en6.ipfm.frag_limit
+kern.skywalk.flowswitch.en6.ipfm.queue_count
+kern.skywalk.flowswitch.en6.ipfm.queue_limit
@@ -522,0 +486 @@
+kern.stackshot_busy_enabled
@@ -527 +490,0 @@
-kern.systemfilesetuuid
@@ -554 +516,0 @@
-kern.timer_coalesce_idle_entry_hard_deadline_max
@@ -602,4 +564 @@
-kern.zleak.active
-kern.zleak.global_threshold
-kern.zleak.max_zonemap_size
-kern.zleak.zone_threshold
+kpc.pc_capture_supported
@@ -615,10 +573,0 @@
-machdep.cpu.address_bits.physical
-machdep.cpu.address_bits.virtual
-machdep.cpu.arch_perf.events
-machdep.cpu.arch_perf.events_number
-machdep.cpu.arch_perf.fixed_number
-machdep.cpu.arch_perf.fixed_width
-machdep.cpu.arch_perf.number
-machdep.cpu.arch_perf.version
-machdep.cpu.arch_perf.width
-machdep.cpu.brand
@@ -626,3 +574,0 @@
-machdep.cpu.cache.L2_associativity
-machdep.cpu.cache.linesize
-machdep.cpu.cache.size
@@ -631,10 +576,0 @@
-machdep.cpu.extfamily
-machdep.cpu.extfeature_bits
-machdep.cpu.extfeatures
-machdep.cpu.extmodel
-machdep.cpu.family
-machdep.cpu.feature_bits
-machdep.cpu.features
-machdep.cpu.leaf7_feature_bits
-machdep.cpu.leaf7_feature_bits_edx
-machdep.cpu.leaf7_features
@@ -642,21 +577,0 @@
-machdep.cpu.max_basic
-machdep.cpu.max_ext
-machdep.cpu.microcode_version
-machdep.cpu.model
-machdep.cpu.mwait.extensions
-machdep.cpu.mwait.linesize_max
-machdep.cpu.mwait.linesize_min
-machdep.cpu.mwait.sub_Cstates
-machdep.cpu.processor_flag
-machdep.cpu.signature
-machdep.cpu.stepping
-machdep.cpu.thermal.ACNT_MCNT
-machdep.cpu.thermal.core_power_limits
-machdep.cpu.thermal.dynamic_acceleration
-machdep.cpu.thermal.energy_policy
-machdep.cpu.thermal.fine_grain_clock_mod
-machdep.cpu.thermal.hardware_feedback
-machdep.cpu.thermal.invariant_APIC_timer
-machdep.cpu.thermal.package_thermal_intr
-machdep.cpu.thermal.sensor
-machdep.cpu.thermal.thresholds
@@ -664,42 +579,11 @@
-machdep.cpu.tlb.data.small
-machdep.cpu.tlb.data.small_level1
-machdep.cpu.tlb.inst.large
-machdep.cpu.tsc_ccc.denominator
-machdep.cpu.tsc_ccc.numerator
-machdep.cpu.vendor
-machdep.cpu.xsave.extended_state
-machdep.cpu.xsave.extended_state1
-machdep.eager_timer_evaluation_max
-machdep.eager_timer_evaluations
-machdep.memmap.ACPINVS
-machdep.memmap.ACPIReclaim
-machdep.memmap.Conventional
-machdep.memmap.Other
-machdep.memmap.PalCode
-machdep.memmap.Reserved
-machdep.memmap.RuntimeServices
-machdep.memmap.Unusable
-machdep.misc.fast_uexc_support
-machdep.misc.interrupt_latency_max
-machdep.misc.nmis
-machdep.misc.panic_restart_timeout
-machdep.misc.timer_queue_trace
-machdep.pmap.hashcnts
-machdep.pmap.hashmax
-machdep.pmap.hashwalks
-machdep.pmap.kern_pv_reserve
-machdep.pmap.kernel_text_ps
-machdep.tsc.at_boot
-machdep.tsc.deep_idle_rebase
-machdep.tsc.frequency
-machdep.tsc.nanotime.generation
-machdep.tsc.nanotime.ns_base
-machdep.tsc.nanotime.scale
-machdep.tsc.nanotime.shift
-machdep.tsc.nanotime.tsc_base
-machdep.tsc.rebase_abs_time
-machdep.uncore_pcie_mmio_base
-machdep.uncore_sample_ctl
-machdep.uncore_sample_interval_ms
-machdep.uncore_sample_mask
-machdep.uncore_sample_state
+machdep.deferred_ipi_timeout
+machdep.lck_mtx_adaptive_spin_mode
+machdep.phy_read_delay_panic
+machdep.phy_writedelay_panic
+machdep.report_phy_read_delay
+machdep.report_phy_read_osbt
+machdep.report_phy_write_delay
+machdep.report_phy_write_osbt
+machdep.time_since_reset
+machdep.trace_phy_read_delay
+machdep.trace_phy_write_delay
@@ -707,52 +591,3 @@
-machdep.vectors.IPI
-machdep.vectors.timer
-machdep.x2apic_enabled
-machdep.x86_fp_simd_isr_uses
-machdep.xcpm.bootplim
-machdep.xcpm.bootpst
-machdep.xcpm.cpu_thermal_level
-machdep.xcpm.deep_idle_count
-machdep.xcpm.deep_idle_last_stats
-machdep.xcpm.deep_idle_log
-machdep.xcpm.deep_idle_total_stats
-machdep.xcpm.epp_override
-machdep.xcpm.forced_idle_period
-machdep.xcpm.forced_idle_ratio
-machdep.xcpm.gpu_thermal_level
-machdep.xcpm.hard_plimit_max_100mhz_ratio
-machdep.xcpm.hard_plimit_min_100mhz_ratio
-machdep.xcpm.io_control_disengages
-machdep.xcpm.io_control_engages
-machdep.xcpm.io_cst_control_enabled
-machdep.xcpm.io_epp_boost_enabled
-machdep.xcpm.io_filtered_reads
-machdep.xcpm.io_thermal_level
-machdep.xcpm.lpm_enabled
-machdep.xcpm.lpm_plimit_max_100mhz_ratio
-machdep.xcpm.maxbusdelay
-machdep.xcpm.maxintdelay
-machdep.xcpm.mbd_applications
-machdep.xcpm.mbd_mode
-machdep.xcpm.mbd_relaxations
-machdep.xcpm.mid_applications
-machdep.xcpm.mid_cst_control_limit
-machdep.xcpm.mid_mode
-machdep.xcpm.mid_mode_active
-machdep.xcpm.mid_relaxations
-machdep.xcpm.mode
-machdep.xcpm.pcps_mode
-machdep.xcpm.pcps_rt_override_mode
-machdep.xcpm.pcps_rt_override_ns
-machdep.xcpm.perf_hints
-machdep.xcpm.power_source
-machdep.xcpm.qos_txfr
-machdep.xcpm.ratio_change_ratelimit_ns
-machdep.xcpm.ratio_changes_total
-machdep.xcpm.ring_boost_enabled
-machdep.xcpm.soft_plimit_max_100mhz_ratio
-machdep.xcpm.soft_plimit_min_100mhz_ratio
-machdep.xcpm.tuib_enabled
-machdep.xcpm.tuib_ns
-machdep.xcpm.tuib_plimit_max_100mhz_ratio
-machdep.xcpm.tuib_plimit_min_100mhz_ratio
-machdep.xcpm.vectors_loaded_count
+machdep.virtual_address_size
+machdep.wake_abstime
+machdep.wake_conttime
@@ -1249,0 +1085,2 @@
+net.ppp.l2tp.nb_threads
+net.ppp.l2tp.thread_outq_size
@@ -1464,0 +1302,2 @@
+vm.cs_defer_to_pmap_cs
+vm.cs_defer_to_pmap_cs_not
@@ -1570 +1408,0 @@
-vm.vm_clump_promote_threshold

2021年12月12日日曜日

某脆弱性の話

CDN各社のアナウンスのようなもの。(各社と言っても数社しか知らない・・)

Akamai

https://www.akamai.com/blog/news/CVE-2021-44228-Zero-Day-Vulnerability

https://www.akamai.com/blog/news/CVE-2021-44228-Patching-is-Recommended 

https://twitter.com/Akamai/status/1469450716234330115

 

Cloudflare

https://blog.cloudflare.com/how-cloudflare-security-responded-to-log4j2-vulnerability/

https://blog.cloudflare.com/secure-how-your-servers-connect-to-the-internet-today/

https://blog.cloudflare.com/actual-cve-2021-44228-payloads-captured-in-the-wild/

https://blog.cloudflare.com/inside-the-log4j2-vulnerability-cve-2021-44228/

https://twitter.com/Cloudflare/status/1469451993630580738

https://twitter.com/Cloudflare/status/1469418483364601859  

https://twitter.com/Cloudflare/status/1469413867700822018

https://twitter.com/Cloudflare/status/1469376339199283205 


Fastly

https://www.fastly.com/blog/digging-deeper-into-log4shell-0day-rce-exploit-found-in-log4j

https://twitter.com/fastly/status/1469439041942786051

 

CDNetworks

それらしいツイートなし、ブログ記事なし https://www.cdnetworks.com/blog/

Limelight Networks

それらしいツイートなし、ブログ記事なし https://www.limelight.com/resources/blog/

 

メガクラウドのもの。これらは G で検索。

AWS

aws log4j で サーチすると↓ヒット。site:aws.amazon.com log4j がよろしい。

Apache Log4j2 Security Bulletin (CVE-2021-44228) - Amazon ...


Azure

Azure log4j でサーチしてもそれらしいものなし

site:azure.microsoft.com  log4j でもなさそう


Google Cloud(グーグルさんのは Google Cloud と呼ぶのが正しいのか、GCP なのかよくわかってない。。)

google log4j で↓が

Cloud Armor WAF rule to help address Apache Log4j ...

site:cloud.google.com log4j にしたらもうひとつ見つかった

Apache Log4j 2 Vulnerability Security Advisory | Google Cloud


2021年12月8日水曜日

マイスィーコーの話

例のあれ

https://www.theregister.com/2021/12/06/mysql_a_pretty_poor_database/ 

updated at ..... に書かれてるMariaDBの中の人の、

"In 2016, at MariaDB, we completely abandoned MySQL code, and brought in new storage engines, dialects, monitors, even ML-based workload analysis."

ってそうだったのね〜。当時結構な話題になってそうだけど覚えがないな。気が向いたらcompletely abandoned っぷりを確認してみよう。

2021年12月6日月曜日

M1 Mac #2

・クラッシュするらしいので試してみる

https://japanese.engadget.com/m1-pro-max-hdr-youtube-kernel-crash-041033610.html

追記1: まだ(?)クラッシュしない・・

HDR らしい動画を鑑賞。例 https://www.youtube.com/watch?v=xXiSN8Tftjg

その後 The HDR Channel というのが見つかったのでそこを見て、 https://www.youtube.com/c/TheHDRChannel/videos
再生リストで 96 あるのをひたすら流し続け・・・
コメントをスクロールしても問題なし、全画面オンオフを切り替えても問題なし。Safari でのみ試したので Chrome でもみてみるか
 
追記2: Chrome でも問題なし。4K HDR な外部ディスプレイでもつけてそっちで再生してみるといいかも?残念ながら無い。

・パフォーマンス

ブラウザのビルドというヘビーなものでなく、簡単なスクリプトでもまぁ結構な違い。(そもそも3年前のモデルと比べてる時点で、ねぇ・・というのはある)

https://qiita.com/tossh/items/659e5934e52b38183200 のようなものを python で、 numba あり/なし。M1 は今のところ unofficial support だけど業務で使ってるわけでもなし、気にしない。

numbaなし: 2018 で 1m30s , 2021 で 58s

numbaあり: 2018 で 0.58s, 2021 で 0.29s

M1 に慣れてしまうと、お仕事用のの貧弱さに辟易、苛々してしまうだろうというのが一番の問題か・・・。お仕事用に Pro/Max じゃない M1 なのを買って BYOD してもいいかもしれないな

2021年12月5日日曜日

M1 Mac

10月末に MBP を購入していた。やっときた。

再びブラウザをビルドしてみると、Firefox だと18分くらい。ビルドしかさせてなかったらもうちょっと速いかもしれない。


    17:47.04 Your build was successful!
    To take your build for a test drive, run: |mach run|
    For more information on what to do now, see https://firefox-source-docs.mozilla.org/setup/contributing_code.html

mach resource-usage でみると以下の通り。


Wall Time (s)    1065.13
Start Date    2021-12-05T09:33:09.127Z
End Date    2021-12-05T09:50:54.260Z
CPU %    95.27
Write Bytes    16579727360
Read Bytes    5277798400
Write Time    15374
Read Time    232337

ファンは唸りをあげず(iStat Menus でみると回ってはいる)、手元は思ったより熱くならない。今の時期はむしろ熱くなって欲しかったり。なお blackmagic Disk Speed Test すると、これまで使っていたものの倍程度は出る。

 

WebKit は20数分。これもビルドしかさせてなかったらもうちょっと(以下略)

====================================================================
 WebKit is now built (23m:07s).
 To run Safari with this newly-built code, use the
 "Tools/Scripts/run-safari" script.
====================================================================

 

Chromium はまだ。fetch chromium でコケてしまった。