{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/category/linux/raspberry-pi-os/buster-raspberry-pi-os/feed/json/ -- and add it your reader.", "home_page_url": "https://matoken.org/blog/category/linux/raspberry-pi-os/buster-raspberry-pi-os/", "feed_url": "https://matoken.org/blog/category/linux/raspberry-pi-os/buster-raspberry-pi-os/feed/json/", "language": "ja", "title": "Buster – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "http://matoken.org/blog/?p=3430", "url": "https://matoken.org/blog/2021/11/12/raspberry-pi-os-buster-to-bullseye-dist-upgrade/", "title": "Raspberry Pi OS \u3092 buster \u304b\u3089 bullseye \u306b dist-upgrade", "content_html": "
\n
\n
\n
\n

Raspberry Pi OS bullseye \u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u3044\u305f\u306e\u3067\u624b\u5143\u306eRaspberry Pi 3 model B \u306eOS \u3092buster \u304b\u3089bullseye \u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n

\n\n
\n

\u4eca\u56de\u306e\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059\uff0e

\n
\n
\n
\n
BOARD
\n
Raspberry Pi 3 model B
\n
OS
\n
Raspberry Pi OS buster armhf
\n
OS\u5c0e\u5165\u30b9\u30c8\u30ec\u30fc\u30b8
\n
microSD 32GB
\n
\u4e3b\u306a\u30b5\u30fc\u30d3\u30b9
\n
OpenSSH, samba
\n
\u64cd\u4f5c
\n
ssh\u7d4c\u7531
\n
\n
\n
\n
\n
\n

\u30d0\u30c3\u30af\u30a2\u30c3\u30d7

\n
\n
\n

/etc \u306f etckeeper(git) \u3067\u7ba1\u7406\u3057\u3066\u3044\u308b\u306e\u3067\u30ea\u30e2\u30fc\u30c8\u306bpush \u3057\u3066\u304a\u304d\u307e\u3059\uff0e/home \u306f\u624b\u52d5\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\uff0e
\n\u305d\u306e\u4ed6\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\uff0e

\n
\n
\n

\u3082\u3057\u304f\u306f\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u307e\u308b\u3054\u3068\u30a4\u30e1\u30fc\u30b8\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\uff0e(SD Card Copier/dd\u7b49)

\n
\n
\n
\n
\n

buster \u3092\u6700\u65b0\u306b\u3059\u308b

\n
\n
\n

Raspberry Pi OS buster \u3092\u6700\u65b0\u306e\u72b6\u614b\u3057\u307e\u3059\uff0e

\n
\n
\n
\n
$ sudo mount -o remount,rw /boot (1)\n$ sudo apt update (2)\n$ sudo apt upgrade (3)\n$ sudo reboot (4)
\n
\n
\n
\n
    \n
  1. \u8aad\u307f\u53d6\u308a\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u306b
  2. \n
  3. \u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u306e\u66f4\u65b0
  4. \n
  5. \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6700\u65b0\u306b
  6. \n
  7. \u5fc5\u8981\u306b\u5fdc\u3058\u3066\u518d\u8d77\u52d5
  8. \n
\n
\n
\n
\n
\n

\u64cd\u4f5c\u30ed\u30b0\u3092\u53d6\u5f97\u3059\u308b

\n
\n
\n

script \u30b3\u30de\u30f3\u30c9\u3067\u64cd\u4f5c\u30ed\u30b0\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3059\uff0e\u4f55\u304b\u5408\u3063\u305f\u6642\u306b\u53c2\u7167\u3057\u307e\u3059\uff0e(\u63a5\u7d9a\u5143\u306e\u7aef\u672b\u3067\u3082\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3068\u4f8b\u3048\u3070disk full\u306a\u3069\u306e\u3068\u304d\u306b\u3082\u4fdd\u5b58\u3055\u308c\u308b\u306e\u3067\u5b89\u5fc3)

\n
\n
\n
\n
$ script -a ~/buster2bullseye_$(date +%F-%T).log
\n
\n
\n
\n
\n
\n

\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u72b6\u614b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b

\n
\n
\n
\n
$ dpkg --audit (1)\n$ dpkg --get-selections | grep 'hold\n
\n
\n
\n
\n
    \n
  1. \u30a8\u30e9\u30fc\u306e\u3042\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u306a\u3044\u304b\u78ba\u8a8d
  2. \n
  3. \u30db\u30fc\u30eb\u30c9\u72b6\u614b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u306a\u3044\u304b\u78ba\u8a8d
  4. \n
\n
\n
\n
\n
\n

APT source-list \u30d5\u30a1\u30a4\u30eb\u306e\u6e96\u5099

\n
\n
\n

/etc/apt/sources.list \u3092\u66f8\u304d\u63db\u3048\u307e\u3059\uff0ebuster \u3092 bullseye \u306b\u5909\u66f4\uff0e\u7de8\u96c6\u6642\u306b\u306f apt edit-sources \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u3068\u6587\u6cd5\u30c1\u30a7\u30c3\u30af\u3092\u3057\u3066\u304f\u308c\u308b\uff0e

\n
\n
\n
\n
$ sudo apt edit-sources\n$ cat /etc/apt/sources.list\ndeb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi\ndeb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
\n
\n
\n
\n

/etc/apt/sources.list.d/ \u4ee5\u4e0b\u3082\u78ba\u8a8d\u3057\u3066\uff0cRaspberry Pi OS \u4ee5\u5916\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306f\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\uff0e(apt edit-sources ${FILENAME} \u3067\u7de8\u96c6\u53ef\u80fd)

\n
\n
\n
\n
\n

\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u3092\u66f4\u65b0\u3059\u308b

\n
\n
\n
\n
$ sudo apt update
\n
\n
\n
\n
\n
\n

\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u306b\u5fc5\u8981\u306a\u5bb9\u91cf\u304c\u3042\u308b\u304b\u78ba\u8a8d\u3059\u308b

\n
\n
\n
\n
$ sudo apt -o APT::Get::Trivial-Only=true full-upgrade
\n
\n
\n
\n
\n
\n

\u8aad\u307f\u8fbc\u307f\u5c02\u7528\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u306b\u3059\u308b

\n
\n
\n
\n
$ sudo mount -o remount,rw /boot
\n
\n
\n
\n
\n
\n

OpenSSH Server \u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b

\n
\n
\n

\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u4e2d\u306b\u65b0\u898f\u306e SSH \u63a5\u7d9a\u304c\u51fa\u6765\u306a\u3044 \u3088\u3046\u306a\u306e\u3067\u524d\u3082\u3063\u3066\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u304a\u304f\uff0e(\u30c8\u30e9\u30d6\u30eb\u304c\u8d77\u304d\u306a\u3051\u308c\u3070\u65e2\u5b58\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3060\u3051\u3067\u554f\u984c\u306a\u3044\u306f\u305a\u3060\u304c\u5ff5\u306e\u70ba)

\n
\n
\n
\n
$ sudo apt install openssh-server
\n
\n
\n
\n

\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u5f8cssh \u63a5\u7d9a\u304c\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\uff0e

\n
\n
\n
\n
\n

\u30b7\u30b9\u30c6\u30e0\u306e\u6700\u5c0f\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9

\n
\n
\n
\n
$ sudo apt upgrade --without-new-pkgs
\n
\n
\n
\n
\n
\n

\u30b7\u30b9\u30c6\u30e0\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9

\n
\n
\n
\n
$ sudo apt full-upgrade
\n
\n
\n
\n

\u624b\u5143\u306e\u74b0\u5883\u3067\u306f full-upgrade \u6642\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u4f9d\u5b58\u95a2\u4fc2\u306e\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo apt full-upgrade\nReading package lists... Done\nBuilding dependency tree\nReading state information... Done\nCalculating upgrade... Error!\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6+rpi1 is to be installed\nE: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
\n
\n
\n
\n

gcc-8-base \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165\u3057\u3066\u518d\u5ea6 dist-upgrade \u3092\u8a66\u307f\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo apt install gcc-8-base libc6-dev\n$ sudo apt full-upgrade
\n
\n
\n
\n
\n
\n

KMS video driver \u306e\u8a2d\u5b9a

\n
\n
\n

/boot/config.txt \u3092\u7de8\u96c6\u3057\u307e\u3059\uff0e\u30d5\u30a1\u30a4\u30eb\u5185\u306e dtoverlay=vc4-fkms-v3d \u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\uff0c[all] \u30bb\u30af\u30b7\u30e7\u30f3\u5185\u306b dtoverlay=vc4-kms-v3d \u3092\u8a18\u8ff0\u3057\u307e\u3059\uff0e

\n
\n
\n
\n
[all]\n#dtoverlay=vc4-fkms-v3d (1)\ndtoverlay=vc4-kms-v3d (2)
\n
\n
\n
\n
    \n
  1. \u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8
  2. \n
  3. \u8ffd\u8a18
  4. \n
\n
\n
\n
\n
\n

\u518d\u8d77\u52d5\u3057\u305f\u3089\u5927\u4f53\u7d42\u308f\u308a\uff0e

\n
\n
\n
\n\"RaspberryPiOS
\n
\n
\n

\u5f8c\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eAPT source-list \u30d5\u30a1\u30a4\u30eb\u3092\u4fee\u6b63\u3057\u305f\u308a\uff0c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u3092\u3057\u305f\u308a\uff0cbullseye\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u304f\u306a\u3063\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u78ba\u8a8d\u3057\u305f\u308a\uff0c\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u6642\u306b\u524a\u9664\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u78ba\u8a8d\u3057\u305f\u308a\u2026\u2026\uff0e

\n
\n
\n

\u4e00\u901a\u308a\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u305f\u3089\u3053\u3053\u3067\u3082\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3057\u3066\u304a\u304f\uff0e

\n
\n
\n
\n
\n

\u53c2\u8003URL

\n
\n
\n

\u4e3b\u306b\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\uff0e

\n
\n\n
\n
\n
\n", "content_text": "Raspberry Pi OS bullseye \u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u3044\u305f\u306e\u3067\u624b\u5143\u306eRaspberry Pi 3 model B \u306eOS \u3092buster \u304b\u3089bullseye \u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\n\nBullseye – the new version of Raspberry Pi OS – Raspberry Pi\n\n\n\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8\n\n\n\u4eca\u56de\u306e\u90e8\u5206\u629c\u304d\u51fa\u3057\n\n\n\n\n\n\n\n\n\n\u4eca\u56de\u306e\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059\uff0e\n\n\n\nBOARD\nRaspberry Pi 3 model B\nOS\nRaspberry Pi OS buster armhf\nOS\u5c0e\u5165\u30b9\u30c8\u30ec\u30fc\u30b8\nmicroSD 32GB\n\u4e3b\u306a\u30b5\u30fc\u30d3\u30b9\nOpenSSH, samba\n\u64cd\u4f5c\nssh\u7d4c\u7531\n\n\n\n\n\n\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\n\n\n/etc \u306f etckeeper(git) \u3067\u7ba1\u7406\u3057\u3066\u3044\u308b\u306e\u3067\u30ea\u30e2\u30fc\u30c8\u306bpush \u3057\u3066\u304a\u304d\u307e\u3059\uff0e/home \u306f\u624b\u52d5\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\uff0e\n\u305d\u306e\u4ed6\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\uff0e\n\n\n\u3082\u3057\u304f\u306f\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u307e\u308b\u3054\u3068\u30a4\u30e1\u30fc\u30b8\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\uff0e(SD Card Copier/dd\u7b49)\n\n\n\n\nbuster \u3092\u6700\u65b0\u306b\u3059\u308b\n\n\nRaspberry Pi OS buster \u3092\u6700\u65b0\u306e\u72b6\u614b\u3057\u307e\u3059\uff0e\n\n\n\n$ sudo mount -o remount,rw /boot (1)\n$ sudo apt update (2)\n$ sudo apt upgrade (3)\n$ sudo reboot (4)\n\n\n\n\n\u8aad\u307f\u53d6\u308a\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u306b\n\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u306e\u66f4\u65b0\n\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6700\u65b0\u306b\n\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u518d\u8d77\u52d5\n\n\n\n\n\n\u64cd\u4f5c\u30ed\u30b0\u3092\u53d6\u5f97\u3059\u308b\n\n\nscript \u30b3\u30de\u30f3\u30c9\u3067\u64cd\u4f5c\u30ed\u30b0\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3059\uff0e\u4f55\u304b\u5408\u3063\u305f\u6642\u306b\u53c2\u7167\u3057\u307e\u3059\uff0e(\u63a5\u7d9a\u5143\u306e\u7aef\u672b\u3067\u3082\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3068\u4f8b\u3048\u3070disk full\u306a\u3069\u306e\u3068\u304d\u306b\u3082\u4fdd\u5b58\u3055\u308c\u308b\u306e\u3067\u5b89\u5fc3)\n\n\n\n$ script -a ~/buster2bullseye_$(date +%F-%T).log\n\n\n\n\n\n\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u72b6\u614b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\n\n\n\n$ dpkg --audit (1)\n$ dpkg --get-selections | grep 'hold\n\n\n\n\n\n\u30a8\u30e9\u30fc\u306e\u3042\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u306a\u3044\u304b\u78ba\u8a8d\n\u30db\u30fc\u30eb\u30c9\u72b6\u614b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u306a\u3044\u304b\u78ba\u8a8d\n\n\n\n\n\nAPT source-list \u30d5\u30a1\u30a4\u30eb\u306e\u6e96\u5099\n\n\n/etc/apt/sources.list \u3092\u66f8\u304d\u63db\u3048\u307e\u3059\uff0ebuster \u3092 bullseye \u306b\u5909\u66f4\uff0e\u7de8\u96c6\u6642\u306b\u306f apt edit-sources \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u3068\u6587\u6cd5\u30c1\u30a7\u30c3\u30af\u3092\u3057\u3066\u304f\u308c\u308b\uff0e\n\n\n\n$ sudo apt edit-sources\n$ cat /etc/apt/sources.list\ndeb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi\ndeb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi\n\n\n\n/etc/apt/sources.list.d/ \u4ee5\u4e0b\u3082\u78ba\u8a8d\u3057\u3066\uff0cRaspberry Pi OS \u4ee5\u5916\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306f\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3059\u308b\uff0e(apt edit-sources ${FILENAME} \u3067\u7de8\u96c6\u53ef\u80fd)\n\n\n\n\n\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u3092\u66f4\u65b0\u3059\u308b\n\n\n\n$ sudo apt update\n\n\n\n\n\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u306b\u5fc5\u8981\u306a\u5bb9\u91cf\u304c\u3042\u308b\u304b\u78ba\u8a8d\u3059\u308b\n\n\n\n$ sudo apt -o APT::Get::Trivial-Only=true full-upgrade\n\n\n\n\n\n\u8aad\u307f\u8fbc\u307f\u5c02\u7528\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u306b\u3059\u308b\n\n\n\n$ sudo mount -o remount,rw /boot\n\n\n\n\n\nOpenSSH Server \u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\n\n\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u4e2d\u306b\u65b0\u898f\u306e SSH \u63a5\u7d9a\u304c\u51fa\u6765\u306a\u3044 \u3088\u3046\u306a\u306e\u3067\u524d\u3082\u3063\u3066\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u304a\u304f\uff0e(\u30c8\u30e9\u30d6\u30eb\u304c\u8d77\u304d\u306a\u3051\u308c\u3070\u65e2\u5b58\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3060\u3051\u3067\u554f\u984c\u306a\u3044\u306f\u305a\u3060\u304c\u5ff5\u306e\u70ba)\n\n\n\n$ sudo apt install openssh-server\n\n\n\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u5f8cssh \u63a5\u7d9a\u304c\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\uff0e\n\n\n\n\n\u30b7\u30b9\u30c6\u30e0\u306e\u6700\u5c0f\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\n\n\n\n$ sudo apt upgrade --without-new-pkgs\n\n\n\n\n\n\u30b7\u30b9\u30c6\u30e0\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\n\n\n\n$ sudo apt full-upgrade\n\n\n\n\u624b\u5143\u306e\u74b0\u5883\u3067\u306f full-upgrade \u6642\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u4f9d\u5b58\u95a2\u4fc2\u306e\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\uff0e\n\n\n\n$ sudo apt full-upgrade\nReading package lists... Done\nBuilding dependency tree\nReading state information... Done\nCalculating upgrade... Error!\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6+rpi1 is to be installed\nE: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.\n\n\n\ngcc-8-base \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165\u3057\u3066\u518d\u5ea6 dist-upgrade \u3092\u8a66\u307f\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3057\u307e\u3057\u305f\uff0e\n\n\n\n$ sudo apt install gcc-8-base libc6-dev\n$ sudo apt full-upgrade\n\n\n\n\n\nKMS video driver \u306e\u8a2d\u5b9a\n\n\n/boot/config.txt \u3092\u7de8\u96c6\u3057\u307e\u3059\uff0e\u30d5\u30a1\u30a4\u30eb\u5185\u306e dtoverlay=vc4-fkms-v3d \u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\uff0c[all] \u30bb\u30af\u30b7\u30e7\u30f3\u5185\u306b dtoverlay=vc4-kms-v3d \u3092\u8a18\u8ff0\u3057\u307e\u3059\uff0e\n\n\n\n[all]\n#dtoverlay=vc4-fkms-v3d (1)\ndtoverlay=vc4-kms-v3d (2)\n\n\n\n\n\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\n\u8ffd\u8a18\n\n\n\n\n\n\u518d\u8d77\u52d5\u3057\u305f\u3089\u5927\u4f53\u7d42\u308f\u308a\uff0e\n\n\n\n\n\n\n\u5f8c\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eAPT source-list \u30d5\u30a1\u30a4\u30eb\u3092\u4fee\u6b63\u3057\u305f\u308a\uff0c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u3092\u3057\u305f\u308a\uff0cbullseye\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u304f\u306a\u3063\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u78ba\u8a8d\u3057\u305f\u308a\uff0c\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u6642\u306b\u524a\u9664\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u78ba\u8a8d\u3057\u305f\u308a\u2026\u2026\uff0e\n\n\n\u4e00\u901a\u308a\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u305f\u3089\u3053\u3053\u3067\u3082\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3057\u3066\u304a\u304f\uff0e\n\n\n\n\n\u53c2\u8003URL\n\n\n\u4e3b\u306b\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\uff0e\n\n\n\n\u7b2c4\u7ae0 Debian 10 (buster) \u304b\u3089\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\nSTICKY – How to upgrade a Buster image to Bullseye – Raspberry Pi Forums", "date_published": "2021-11-12T08:18:14+09:00", "date_modified": "2022-03-03T18:13:47+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "dtoverlay", "Raspberry Pi 3 B", "Raspberry Pi OS", "RaspberryPi", "bullseye", "Buster", "Linux" ] }, { "id": "http://matoken.org/blog/?p=3259", "url": "https://matoken.org/blog/2021/06/10/swatch-awk/", "title": "Debian/Ubuntu\u3067awk\u3092\u5207\u308a\u66ff\u3048\u308b", "content_html": "
\n

Debian\u7b49\u3067\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306eawk\u306f mawk \u304c\u5c0e\u5165\u3055\u308c\u307e\u3059\uff0e
\nDebian\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u306f\u4ed6\u306bGNU awk(\u30d1\u30c3\u30b1\u30fc\u30b8\u540d gawk ), The One True Awk(\u30d1\u30c3\u30b1\u30fc\u30b8\u540d original-awk )\u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0e*BSD\u306a\u3069\u3067\u3088\u304f\u898b\u308b nawk \u3082\u3042\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u304c\uff0c\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3060\u3051\u306e\u3088\u3046\u3067\u3059\uff0e
\n(\u4ed6\u306b\u3082\u3042\u308b\u304b\u3082\u3057\u308c\u306a\u3044?)

\n
\n
\n

mawk \u306f\u521d\u671f\u72b6\u614b\u3067\u5165\u3063\u3066\u3044\u3066\u8efd\u91cf\uff0eGNU awk \u306fmawk\u306b\u6bd4\u3079\u3066\u591a\u6a5f\u80fd\u3067\u65e2\u5b9a\u5024\u3067\u306f\u5c0e\u5165\u3055\u308c\u307e\u305b\u3093\u304c\uff0c byobu \u306a\u3069\u304c\u4f9d\u5b58\u3092\u6c42\u3081\u308b\u306e\u3067\u5165\u3063\u3066\u3044\u308b\u4eba\u3082\u591a\u3044\u3068\u601d\u3044\u307e\u3059\uff0e

\n
\n
\n

\u8907\u6570\u306eawk\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u308b\u3068\u304d\u306b awk \u3068\u5b9f\u884c\u3057\u305f\u3068\u304d\u306f update-alternatives \u3067\u7ba1\u7406\u3055\u308c\u305f\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u5148\u306e\u3044\u305a\u308c\u304b\u306eawk\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\uff0e\u3053\u308c\u3092\u5207\u308a\u66ff\u3048\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n

\n
\n
\n\n
\n
\n

\u5207\u308a\u66ff\u3048\u524d\u306e\u72b6\u614b\u3067\u3059\uff0e awk , nawk \u304c gawk(GNU awk) \u306b\u5411\u3044\u3066\u3044\u307e\u3059\uff0e

\n
\n
\n
\n
$ ls -l /usr/bin/*awk\nlrwxrwxrwx 1 root root     21 May 16 00:33 /usr/bin/awk -> /etc/alternatives/awk\n-rwxr-xr-x 1 root root 694624 Feb 10 17:42 /usr/bin/gawk\n-rwxr-xr-x 1 root root 158296 Feb 17  2020 /usr/bin/mawk\nlrwxrwxrwx 1 root root     22 May 16 00:33 /usr/bin/nawk -> /etc/alternatives/nawk\n-rwxr-xr-x 1 root root 135848 Dec 22 06:24 /usr/bin/original-awk\n$ ls -l /etc/alternatives/*awk\nlrwxrwxrwx 1 root root 13 May 16 04:27 /etc/alternatives/awk -> /usr/bin/gawk\nlrwxrwxrwx 1 root root 13 May 16 04:27 /etc/alternatives/nawk -> /usr/bin/gawk
\n
\n
\n
\n

awk \u30b3\u30de\u30f3\u30c9\u3092\u5207\u308a\u66ff\u3048\u3066\u307f\u307e\u3059\uff0e\u3053\u3053\u3067\u306f gawk \u304b\u3089 mawk \u306b\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo update-alternatives --display awk (1)\nawk - auto mode\n  link best version is /usr/bin/gawk\n  link currently points to /usr/bin/gawk\n  link awk is /usr/bin/awk\n  slave awk.1.gz is /usr/share/man/man1/awk.1.gz\n  slave nawk is /usr/bin/nawk\n  slave nawk.1.gz is /usr/share/man/man1/nawk.1.gz\n/usr/bin/gawk - priority 10\n  slave awk.1.gz: /usr/share/man/man1/gawk.1.gz\n  slave nawk: /usr/bin/gawk\n  slave nawk.1.gz: /usr/share/man/man1/gawk.1.gz\n/usr/bin/mawk - priority 5\n  slave awk.1.gz: /usr/share/man/man1/mawk.1.gz\n  slave nawk: /usr/bin/mawk\n  slave nawk.1.gz: /usr/share/man/man1/mawk.1.gz\n/usr/bin/original-awk - priority 0\n  slave awk.1.gz: /usr/share/man/man1/original-awk.1.gz\n$ sudo update-alternatives --config awk (2)\nThere are 3 choices for the alternative awk (providing /usr/bin/awk).\n\n  Selection    Path                   Priority   Status\n------------------------------------------------------------\n* 0            /usr/bin/gawk           10        auto mode\n  1            /usr/bin/gawk           10        manual mode\n  2            /usr/bin/mawk           5         manual mode\n  3            /usr/bin/original-awk   0         manual mode\n\nPress <enter> to keep the current choice[*], or type selection number: 2\nupdate-alternatives: using /usr/bin/mawk to provide /usr/bin/awk (awk) in manual mode\n$ sudo update-alternatives --set awk /usr/bin/mawk (3)\nupdate-alternatives: using /usr/bin/mawk to provide /usr/bin/awk (awk) in manual mode\n$ ls -l /etc/alternatives/*awk (4)\nlrwxrwxrwx 1 root root 13 Jun  7 08:27 /etc/alternatives/awk -> /usr/bin/mawk\nlrwxrwxrwx 1 root root 13 Jun  7 08:27 /etc/alternatives/nawk -> /usr/bin/mawk
\n
\n
\n
\n
    \n
  1. \u73fe\u5728\u306e awk \u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\uff0e gawk \u306b\u5411\u3044\u3066\u3044\u308b
  2. \n
  3. \u5bfe\u8a71\u30e2\u30fc\u30c9\u3067 update-alternatives \u30b3\u30de\u30f3\u30c9\u3092\u8d77\u52d5\u3057\u3066 2 \u306e mawk \u306b\u8a2d\u5b9a
  4. \n
  5. \u30b3\u30de\u30f3\u30c9\u30e2\u30fc\u30c9\u306e\u5834\u5408
  6. \n
  7. awk , nawk \u304c mawk \u306b\u5411\u3044\u305f\u306e\u3092\u78ba\u8a8d\uff0e
  8. \n
\n
\n
\n

\u5207\u308a\u66ff\u3048\u3067\u304d\u307e\u3057\u305f\uff0e\u3000:)

\n
\n
\n

\u3061\u306a\u307f\u306b update-alternatives \u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306e\u4e00\u89a7\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8868\u793a\u3067\u304d\u307e\u3059\uff0e

\n
\n
\n
\n
$ update-alternatives --get-selections
\n
\n
\n
\n
\u74b0\u58831(Debian sid amd64)
\n
\n
$ dpkg-query -W mawk gawk original-awk dpkg\ndpkg    1.20.9\ngawk    1:5.1.0-1\nmawk    1.3.4.20200120-2\noriginal-awk    2018-08-27-1\n$ lsb_release -dr\nDescription:    Debian GNU/Linux 11 (bullseye) (1)\nRelease:        11\n$ arch\nx86_64
\n
\n
\n
\n
    \n
  1. \u5b9f\u969b\u306fsid
  2. \n
\n
\n
\n
\u74b0\u58832(Ubuntu 21.04 amd64)
\n
\n
$ dpkg-query -W mawk gawk dpkg\ndpkg\t1.20.9ubuntu1\ngawk\t1:5.1.0-1build1\nmawk\t1.3.4.20200120-2\n$ lsb_release -dr\nDescription:\tUbuntu 21.04\nRelease:\t21.04\n$ arch\nx86_64
\n
\n
\n
\n
\u74b0\u58833(Raspberry Pi OS buster armhf)
\n
\n
$ dpkg-query -W mawk gawk dpkg\ndpkg    1.19.7\ngawk    1:4.2.1+dfsg-1\nmawk    1.3.3-17\n$ lsb_release -dr\nDescription:    Raspbian GNU/Linux 10 (buster)\nRelease:        10\n$ arch\narmv7l
\n
\n
\n

\n", "content_text": "Debian\u7b49\u3067\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306eawk\u306f mawk \u304c\u5c0e\u5165\u3055\u308c\u307e\u3059\uff0e\nDebian\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u306f\u4ed6\u306bGNU awk(\u30d1\u30c3\u30b1\u30fc\u30b8\u540d gawk ), The One True Awk(\u30d1\u30c3\u30b1\u30fc\u30b8\u540d original-awk )\u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0e*BSD\u306a\u3069\u3067\u3088\u304f\u898b\u308b nawk \u3082\u3042\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u304c\uff0c\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3060\u3051\u306e\u3088\u3046\u3067\u3059\uff0e\n(\u4ed6\u306b\u3082\u3042\u308b\u304b\u3082\u3057\u308c\u306a\u3044?)\n\n\nmawk \u306f\u521d\u671f\u72b6\u614b\u3067\u5165\u3063\u3066\u3044\u3066\u8efd\u91cf\uff0eGNU awk \u306fmawk\u306b\u6bd4\u3079\u3066\u591a\u6a5f\u80fd\u3067\u65e2\u5b9a\u5024\u3067\u306f\u5c0e\u5165\u3055\u308c\u307e\u305b\u3093\u304c\uff0c byobu \u306a\u3069\u304c\u4f9d\u5b58\u3092\u6c42\u3081\u308b\u306e\u3067\u5165\u3063\u3066\u3044\u308b\u4eba\u3082\u591a\u3044\u3068\u601d\u3044\u307e\u3059\uff0e\n\n\n\u8907\u6570\u306eawk\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u308b\u3068\u304d\u306b awk \u3068\u5b9f\u884c\u3057\u305f\u3068\u304d\u306f update-alternatives \u3067\u7ba1\u7406\u3055\u308c\u305f\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u5148\u306e\u3044\u305a\u308c\u304b\u306eawk\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\uff0e\u3053\u308c\u3092\u5207\u308a\u66ff\u3048\u3066\u307f\u307e\u3059\uff0e\n\n\n\n\n\n\nGawk – GNU Project – Free Software Foundation (FSF)\nmawk \u2013 pattern scanning and text processing language\nGitHub – onetrueawk/awk: One true awk\n\n\n\n\u5207\u308a\u66ff\u3048\u524d\u306e\u72b6\u614b\u3067\u3059\uff0e awk , nawk \u304c gawk(GNU awk) \u306b\u5411\u3044\u3066\u3044\u307e\u3059\uff0e\n\n\n\n$ ls -l /usr/bin/*awk\nlrwxrwxrwx 1 root root 21 May 16 00:33 /usr/bin/awk -> /etc/alternatives/awk\n-rwxr-xr-x 1 root root 694624 Feb 10 17:42 /usr/bin/gawk\n-rwxr-xr-x 1 root root 158296 Feb 17 2020 /usr/bin/mawk\nlrwxrwxrwx 1 root root 22 May 16 00:33 /usr/bin/nawk -> /etc/alternatives/nawk\n-rwxr-xr-x 1 root root 135848 Dec 22 06:24 /usr/bin/original-awk\n$ ls -l /etc/alternatives/*awk\nlrwxrwxrwx 1 root root 13 May 16 04:27 /etc/alternatives/awk -> /usr/bin/gawk\nlrwxrwxrwx 1 root root 13 May 16 04:27 /etc/alternatives/nawk -> /usr/bin/gawk\n\n\n\nawk \u30b3\u30de\u30f3\u30c9\u3092\u5207\u308a\u66ff\u3048\u3066\u307f\u307e\u3059\uff0e\u3053\u3053\u3067\u306f gawk \u304b\u3089 mawk \u306b\u3057\u307e\u3057\u305f\uff0e\n\n\n\n$ sudo update-alternatives --display awk (1)\nawk - auto mode\n link best version is /usr/bin/gawk\n link currently points to /usr/bin/gawk\n link awk is /usr/bin/awk\n slave awk.1.gz is /usr/share/man/man1/awk.1.gz\n slave nawk is /usr/bin/nawk\n slave nawk.1.gz is /usr/share/man/man1/nawk.1.gz\n/usr/bin/gawk - priority 10\n slave awk.1.gz: /usr/share/man/man1/gawk.1.gz\n slave nawk: /usr/bin/gawk\n slave nawk.1.gz: /usr/share/man/man1/gawk.1.gz\n/usr/bin/mawk - priority 5\n slave awk.1.gz: /usr/share/man/man1/mawk.1.gz\n slave nawk: /usr/bin/mawk\n slave nawk.1.gz: /usr/share/man/man1/mawk.1.gz\n/usr/bin/original-awk - priority 0\n slave awk.1.gz: /usr/share/man/man1/original-awk.1.gz\n$ sudo update-alternatives --config awk (2)\nThere are 3 choices for the alternative awk (providing /usr/bin/awk).\n\n Selection Path Priority Status\n------------------------------------------------------------\n* 0 /usr/bin/gawk 10 auto mode\n 1 /usr/bin/gawk 10 manual mode\n 2 /usr/bin/mawk 5 manual mode\n 3 /usr/bin/original-awk 0 manual mode\n\nPress <enter> to keep the current choice[*], or type selection number: 2\nupdate-alternatives: using /usr/bin/mawk to provide /usr/bin/awk (awk) in manual mode\n$ sudo update-alternatives --set awk /usr/bin/mawk (3)\nupdate-alternatives: using /usr/bin/mawk to provide /usr/bin/awk (awk) in manual mode\n$ ls -l /etc/alternatives/*awk (4)\nlrwxrwxrwx 1 root root 13 Jun 7 08:27 /etc/alternatives/awk -> /usr/bin/mawk\nlrwxrwxrwx 1 root root 13 Jun 7 08:27 /etc/alternatives/nawk -> /usr/bin/mawk\n\n\n\n\n\u73fe\u5728\u306e awk \u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\uff0e gawk \u306b\u5411\u3044\u3066\u3044\u308b\n\u5bfe\u8a71\u30e2\u30fc\u30c9\u3067 update-alternatives \u30b3\u30de\u30f3\u30c9\u3092\u8d77\u52d5\u3057\u3066 2 \u306e mawk \u306b\u8a2d\u5b9a\n\u30b3\u30de\u30f3\u30c9\u30e2\u30fc\u30c9\u306e\u5834\u5408\nawk , nawk \u304c mawk \u306b\u5411\u3044\u305f\u306e\u3092\u78ba\u8a8d\uff0e\n\n\n\n\u5207\u308a\u66ff\u3048\u3067\u304d\u307e\u3057\u305f\uff0e\u3000:)\n\n\n\u3061\u306a\u307f\u306b update-alternatives \u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306e\u4e00\u89a7\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8868\u793a\u3067\u304d\u307e\u3059\uff0e\n\n\n\n$ update-alternatives --get-selections\n\n\n\n\u74b0\u58831(Debian sid amd64)\n\n$ dpkg-query -W mawk gawk original-awk dpkg\ndpkg 1.20.9\ngawk 1:5.1.0-1\nmawk 1.3.4.20200120-2\noriginal-awk 2018-08-27-1\n$ lsb_release -dr\nDescription: Debian GNU/Linux 11 (bullseye) (1)\nRelease: 11\n$ arch\nx86_64\n\n\n\n\n\u5b9f\u969b\u306fsid\n\n\n\n\u74b0\u58832(Ubuntu 21.04 amd64)\n\n$ dpkg-query -W mawk gawk dpkg\ndpkg\t1.20.9ubuntu1\ngawk\t1:5.1.0-1build1\nmawk\t1.3.4.20200120-2\n$ lsb_release -dr\nDescription:\tUbuntu 21.04\nRelease:\t21.04\n$ arch\nx86_64\n\n\n\n\u74b0\u58833(Raspberry Pi OS buster armhf)\n\n$ dpkg-query -W mawk gawk dpkg\ndpkg 1.19.7\ngawk 1:4.2.1+dfsg-1\nmawk 1.3.3-17\n$ lsb_release -dr\nDescription: Raspbian GNU/Linux 10 (buster)\nRelease: 10\n$ arch\narmv7l", "date_published": "2021-06-10T07:18:56+09:00", "date_modified": "2021-06-10T07:29:13+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "awk", "gawk", "mawk", "Buster", "Debian", "Hirsute Hippo(21.04)", "Linux", "Raspberry Pi OS", "sid", "Ubuntu" ] }, { "id": "http://matoken.org/blog/?p=3199", "url": "https://matoken.org/blog/2021/04/07/cpufetch/", "title": "cpu\u60c5\u5831\u3092\u8868\u793a\u3059\u308bcpufetch", "content_html": "
\n

cpufetch\u3068\u3044\u3046screenfetch\u30a4\u30f3\u30b9\u30d1\u30a4\u30a2\u306a\u611f\u3058\u306ecpu\u60c5\u5831\u8868\u793a\u30c4\u30fc\u30eb\u3092\u898b\u304b\u3051\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n\n
\n
\n
\n
$ git clone https://github.com/Dr-Noob/cpufetch\n$ cd cpufetch\n$ make\n$ ./cpufetch -s retro\n\n                               ################\n                       #######                #######\n                  ####                              ####\n              ###                                     ####    Name:              Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz\n         ###                                             ###  Microarchitecture: Ivy Bridge\n         ###                                             ###  Technology:        22nm\n      #                    ###                ###        ###  Max Frequency:     3.300 GHz\n    ##   ###   #########   ######   ######    ###        ###  Cores:             2 cores (4 threads)\n   ##    ###   ###    ###  ###    ####  ####  ###        ###  AVX:               AVX\n  ##     ###   ###    ###  ###    ###    ###  ###       ###   FMA:               No\n ##      ###   ###    ###  ###    ##########  ###     ####    L1i Size:          32KB (64KB Total)\n ##      ###   ###    ###  ###    ###         ###   #####     L1d Size:          32KB (64KB Total)\n ##       ##   ###    ###   #####  #########   ##  ###        L2 Size:           256KB (512KB Total)\n ###                                                          L3 Size:           3MB\n  ###                                                         Peak Performance:  52.80 GFLOP/s\n  ####                                        ####\n    #####                               ##########\n      ##########               ################\n          ###############################
\n
\n
\n
\n

\u6a19\u6e96\u306e\u30b9\u30bf\u30a4\u30eb\u3067\u30c6\u30ad\u30b9\u30c8\u3067\u8cbc\u308a\u4ed8\u3051\u308b\u3068\u771f\u3063\u767d\u306b\u306a\u308b\u306e\u3067 retro \u3067\u3059\uff0e\u901a\u5e38\u306e\u5b9f\u884c\u7d50\u679c\u306f\u4ee5\u4e0b\u306b\uff0e

\n

\n

Linux\u4ee5\u5916\u3067\u3082Windows/macOS/Android(termux)\u3067\u3082\u52d5\u4f5c\u3059\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n
\n\"cpufetch
\n
\n
\n
\n\"cpufetch
\n
\n
\n
\n\"cpufetch
\n
\n
\n
\n\"cpufetch
\n
\n
\n

neofetch/screenfetch\u7b49\u306f\u30b7\u30b9\u30c6\u30e0\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\u304ccpufetch\u306fcpu\u60c5\u5831\u306b\u7279\u5316\u3057\u3066\u3044\u307e\u3059\uff0e\u672a\u3060\u30b5\u30dd\u30fc\u30c8cpu\u306f\u591a\u304f\u306a\u3044\u3088\u3046\u3067\u3059\uff0e
\n/proc/cpuinfo, lscpu, lshw -class cpu \u3068\u304b\u306e\u307b\u3046\u304c\u5b9f\u7528\u7684\u3060\u3068\u601d\u3044\u307e\u3059\u304c\uff0c\u697d\u3057\u3044\u306e\u3067\uff0e

\n
\n
\n
\u74b0\u58831
\n
\n
$ dpkg-query -W gcc make git\ngcc     4:10.2.1-1\ngit     1:2.31.0-1\nmake    4.3-4\n$ lsb_release -dr\nDescription:    Debian GNU/Linux bullseye/sid\nRelease:        unstable\n$ arch\nx86_64
\n
\n
\n
\n
\u74b0\u58832
\n
\n
$ pkg list-installed 2>&1 | grep -E 'clang|git|make'\nclang/stable,now 11.1.0 aarch64 [installed]\ngit/stable,now 2.31.1 aarch64 [installed]\nmake/stable,now 4.3-1 aarch64 [installed]\n$ termux-info\nPackages CPU architecture:\naarch64\nSubscribed repositories:\n# sources.list\ndeb https://termux.org/packages/ stable main\n# game-repo (sources.list.d/game.list)\ndeb https://grimler.se/game-packages-24 games stable\n# science-repo (sources.list.d/science.list)\ndeb https://grimler.se/science-packages-24 science stable\nUpdatable packages:\napt/stable 2.2.2 aarch64 [upgradable from: 2.1.18]\ndialog/stable 1.3-20210324-0 aarch64 [upgradable from: 1.3-20210117-0]\nnano/stable 5.6.1 aarch64 [upgradable from: 5.5]\ntermux-exec/stable 1:0.9 aarch64 [upgradable from: 1:0.8]\ntermux-tools/stable 0.115 all [upgradable from: 0.111]\nAndroid version:\n9\nKernel build information:\nLinux localhost 4.9.112-perf #1 SMP PREEMPT Thu Feb 25 22:16:13 CST 2021 aarch64 Android\nDevice manufacturer:\nTINNO\nDevice model:\nC330
\n
\n
\n", "content_text": "cpufetch\u3068\u3044\u3046screenfetch\u30a4\u30f3\u30b9\u30d1\u30a4\u30a2\u306a\u611f\u3058\u306ecpu\u60c5\u5831\u8868\u793a\u30c4\u30fc\u30eb\u3092\u898b\u304b\u3051\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\nDr-Noob/cpufetch: Simplistic yet fancy CPU architecture fetching tool\n\n\ncpufetch – yet another neofetch alternative : commandline\n\n\n\n\n\n\n\n$ git clone https://github.com/Dr-Noob/cpufetch\n$ cd cpufetch\n$ make\n$ ./cpufetch -s retro\n\n ################\n ####### #######\n #### ####\n ### #### Name: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz\n ### ### Microarchitecture: Ivy Bridge\n ### ### Technology: 22nm\n # ### ### ### Max Frequency: 3.300 GHz\n ## ### ######### ###### ###### ### ### Cores: 2 cores (4 threads)\n ## ### ### ### ### #### #### ### ### AVX: AVX\n ## ### ### ### ### ### ### ### ### FMA: No\n ## ### ### ### ### ########## ### #### L1i Size: 32KB (64KB Total)\n ## ### ### ### ### ### ### ##### L1d Size: 32KB (64KB Total)\n ## ## ### ### ##### ######### ## ### L2 Size: 256KB (512KB Total)\n ### L3 Size: 3MB\n ### Peak Performance: 52.80 GFLOP/s\n #### ####\n ##### ##########\n ########## ################\n ###############################\n\n\n\n\u6a19\u6e96\u306e\u30b9\u30bf\u30a4\u30eb\u3067\u30c6\u30ad\u30b9\u30c8\u3067\u8cbc\u308a\u4ed8\u3051\u308b\u3068\u771f\u3063\u767d\u306b\u306a\u308b\u306e\u3067 retro \u3067\u3059\uff0e\u901a\u5e38\u306e\u5b9f\u884c\u7d50\u679c\u306f\u4ee5\u4e0b\u306b\uff0e\n\nLinux\u4ee5\u5916\u3067\u3082Windows/macOS/Android(termux)\u3067\u3082\u52d5\u4f5c\u3059\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nneofetch/screenfetch\u7b49\u306f\u30b7\u30b9\u30c6\u30e0\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\u304ccpufetch\u306fcpu\u60c5\u5831\u306b\u7279\u5316\u3057\u3066\u3044\u307e\u3059\uff0e\u672a\u3060\u30b5\u30dd\u30fc\u30c8cpu\u306f\u591a\u304f\u306a\u3044\u3088\u3046\u3067\u3059\uff0e\n/proc/cpuinfo, lscpu, lshw -class cpu \u3068\u304b\u306e\u307b\u3046\u304c\u5b9f\u7528\u7684\u3060\u3068\u601d\u3044\u307e\u3059\u304c\uff0c\u697d\u3057\u3044\u306e\u3067\uff0e\n\n\n\u74b0\u58831\n\n$ dpkg-query -W gcc make git\ngcc 4:10.2.1-1\ngit 1:2.31.0-1\nmake 4.3-4\n$ lsb_release -dr\nDescription: Debian GNU/Linux bullseye/sid\nRelease: unstable\n$ arch\nx86_64\n\n\n\n\u74b0\u58832\n\n$ pkg list-installed 2>&1 | grep -E 'clang|git|make'\nclang/stable,now 11.1.0 aarch64 [installed]\ngit/stable,now 2.31.1 aarch64 [installed]\nmake/stable,now 4.3-1 aarch64 [installed]\n$ termux-info\nPackages CPU architecture:\naarch64\nSubscribed repositories:\n# sources.list\ndeb https://termux.org/packages/ stable main\n# game-repo (sources.list.d/game.list)\ndeb https://grimler.se/game-packages-24 games stable\n# science-repo (sources.list.d/science.list)\ndeb https://grimler.se/science-packages-24 science stable\nUpdatable packages:\napt/stable 2.2.2 aarch64 [upgradable from: 2.1.18]\ndialog/stable 1.3-20210324-0 aarch64 [upgradable from: 1.3-20210117-0]\nnano/stable 5.6.1 aarch64 [upgradable from: 5.5]\ntermux-exec/stable 1:0.9 aarch64 [upgradable from: 1:0.8]\ntermux-tools/stable 0.115 all [upgradable from: 0.111]\nAndroid version:\n9\nKernel build information:\nLinux localhost 4.9.112-perf #1 SMP PREEMPT Thu Feb 25 22:16:13 CST 2021 aarch64 Android\nDevice manufacturer:\nTINNO\nDevice model:\nC330", "date_published": "2021-04-07T21:25:17+09:00", "date_modified": "2021-04-07T21:25:19+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "cpu", "cpufetch", "Buster", "Debian", "Focal Fossa(20.04)", "Linux", "Raspberry Pi OS", "sid", "Ubuntu" ] }, { "id": "http://matoken.org/blog/?p=3152", "url": "https://matoken.org/blog/2021/03/28/pick-which-allows-fuzzy-search-from-standard-command-line-input/", "title": "\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u6a19\u6e96\u5165\u529b\u304b\u3089\u3042\u3044\u307e\u3044\u691c\u7d22\u304c\u51fa\u6765\u308b\u300cpick\u300d", "content_html": "
\n

\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u6a19\u6e96\u5165\u529b\u3092\u3042\u3044\u307e\u3044\u691c\u7d22\u3057\u3066\u305d\u306e\u7d50\u679c\u3092\u4e3b\u6cbb\u529b\u51fa\u6765\u308bpick\u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3092\u77e5\u3063\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n\n
\n
\n

\u305f\u304f\u3055\u3093\u306e\u74b0\u5883\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\uff0e\u4eca\u56de\u306fDebian sid amd64\u3068Raspberry Pi OS buster armhf\u3067 pick \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo apt install pick (1)\n$ ls ~/Downloads/*.pdf | wc -l (2)\n181\n$ ls ~/Downloads/*.pdf | pick | xargs -I{} xpdf \"{}\" (3)\nrpi (4)\n/home/matoken/Downloads/rpi_DATA_CM_3p0.pdf\n/home/matoken/Downloads/rpi_MECH_3b_1p2.pdf\n/home/matoken/Downloads/RPi-Camera-User-Manual.pdf\n/home/matoken/Downloads/rpi_SCH_3b_1p2_reduced.pdf\n/home/matoken/Downloads/rpi_SCH_4b_4p0_reduced.pdf\n/home/matoken/Downloads/rpi_SCH_ZeroW_1p1_reduced.pdf\n/home/matoken/Downloads/RPi_Pi Pico_Digital Edition.pdf
\n
\n
\n
\n
    \n
  1. pick \u30d1\u30c3\u30b1\u30fc\u30b8\u5c0e\u5165
  2. \n
  3. pdf\u30d5\u30a1\u30a4\u30eb\u304c\u305f\u304f\u3055\u3093\u3042\u308b
  4. \n
  5. ls\u306e\u7d50\u679c\u3092pick\u3092\u631f\u3093\u3067xpdf\u306b\u6e21\u3059
  6. \n
  7. \u300crpi\u300d\u3068\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u3067\u7d5e\u308a\u8fbc\u307e\u308c\u308b
  8. \n
\n
\n
\n

\"pick

\n
\n
\n

\u4e0a\u4e0b\u30ab\u30fc\u30bd\u30eb\u5165\u529b\u3067\u7d50\u679c\u3092\u9078\u629e\uff0cEnter\u3067\u78ba\u5b9a\uff0e\u78ba\u5b9a\u3055\u308c\u305f\u884c\u306fSTDOUT\u306b\u51fa\u529b\u3055\u308c\uff0c\u4eca\u56de\u306e\u4f8b\u3067\u306f xpdf \u3067\u958b\u304b\u308c\u308b\uff0e

\n
\n
\n

\u30b3\u30de\u30f3\u30c9\u7d50\u679c\u304c\u591a\u304f\u3066 grep \u3092\u7e4b\u3044\u3067\u3044\u304f\u307f\u305f\u3044\u306a\u3068\u304d\u306b pick \u3092\u4f7f\u3046\u3068\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306b\u7d5e\u308a\u8fbc\u307e\u308c\u305f\u308a\u3057\u3066\u308f\u304b\u308a\u3084\u3059\u3044\u3067\u3059\uff0e

\n
\n
\n

\u4f3c\u305f\u3082\u306e\u306b sysbox \u306e choose-stdin \u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0e

\n
\n
\n
\u74b0\u58831
\n
\n
$ dpkg-query -W pick\npick    2.0.2-1.1\n$ lsb_release -dr\nDescription:    Debian GNU/Linux bullseye/sid\nRelease:        unstable\n$ uname -m\nx86_64
\n
\n
\n
\n
\u74b0\u58832
\n
\n
$ dpkg-query -W pick\npick    2.0.2-1\n$ lsb_release -dr\nDescription:    Raspbian GNU/Linux 10 (buster)\nRelease:        10\n$ uname -m\narmv7l\n$ cat /proc/device-tree/model ;echo\nRaspberry Pi 3 Model B Rev 1.2
\n
\n
\n", "content_text": "\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u6a19\u6e96\u5165\u529b\u3092\u3042\u3044\u307e\u3044\u691c\u7d22\u3057\u3066\u305d\u306e\u7d50\u679c\u3092\u4e3b\u6cbb\u529b\u51fa\u6765\u308bpick\u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3092\u77e5\u3063\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\nmptre/pick: A fuzzy search tool for the command-line\n\n\n\n\u305f\u304f\u3055\u3093\u306e\u74b0\u5883\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\uff0e\u4eca\u56de\u306fDebian sid amd64\u3068Raspberry Pi OS buster armhf\u3067 pick \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165\u3057\u307e\u3057\u305f\uff0e\n\n\n\n$ sudo apt install pick (1)\n$ ls ~/Downloads/*.pdf | wc -l (2)\n181\n$ ls ~/Downloads/*.pdf | pick | xargs -I{} xpdf \"{}\" (3)\nrpi (4)\n/home/matoken/Downloads/rpi_DATA_CM_3p0.pdf\n/home/matoken/Downloads/rpi_MECH_3b_1p2.pdf\n/home/matoken/Downloads/RPi-Camera-User-Manual.pdf\n/home/matoken/Downloads/rpi_SCH_3b_1p2_reduced.pdf\n/home/matoken/Downloads/rpi_SCH_4b_4p0_reduced.pdf\n/home/matoken/Downloads/rpi_SCH_ZeroW_1p1_reduced.pdf\n/home/matoken/Downloads/RPi_Pi Pico_Digital Edition.pdf\n\n\n\n\npick \u30d1\u30c3\u30b1\u30fc\u30b8\u5c0e\u5165\npdf\u30d5\u30a1\u30a4\u30eb\u304c\u305f\u304f\u3055\u3093\u3042\u308b\nls\u306e\u7d50\u679c\u3092pick\u3092\u631f\u3093\u3067xpdf\u306b\u6e21\u3059\n\u300crpi\u300d\u3068\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u3067\u7d5e\u308a\u8fbc\u307e\u308c\u308b\n\n\n\n\n\n\n\u4e0a\u4e0b\u30ab\u30fc\u30bd\u30eb\u5165\u529b\u3067\u7d50\u679c\u3092\u9078\u629e\uff0cEnter\u3067\u78ba\u5b9a\uff0e\u78ba\u5b9a\u3055\u308c\u305f\u884c\u306fSTDOUT\u306b\u51fa\u529b\u3055\u308c\uff0c\u4eca\u56de\u306e\u4f8b\u3067\u306f xpdf \u3067\u958b\u304b\u308c\u308b\uff0e\n\n\n\u30b3\u30de\u30f3\u30c9\u7d50\u679c\u304c\u591a\u304f\u3066 grep \u3092\u7e4b\u3044\u3067\u3044\u304f\u307f\u305f\u3044\u306a\u3068\u304d\u306b pick \u3092\u4f7f\u3046\u3068\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306b\u7d5e\u308a\u8fbc\u307e\u308c\u305f\u308a\u3057\u3066\u308f\u304b\u308a\u3084\u3059\u3044\u3067\u3059\uff0e\n\n\n\u4f3c\u305f\u3082\u306e\u306b sysbox \u306e choose-stdin \u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0e\n\n\n\u74b0\u58831\n\n$ dpkg-query -W pick\npick 2.0.2-1.1\n$ lsb_release -dr\nDescription: Debian GNU/Linux bullseye/sid\nRelease: unstable\n$ uname -m\nx86_64\n\n\n\n\u74b0\u58832\n\n$ dpkg-query -W pick\npick 2.0.2-1\n$ lsb_release -dr\nDescription: Raspbian GNU/Linux 10 (buster)\nRelease: 10\n$ uname -m\narmv7l\n$ cat /proc/device-tree/model ;echo\nRaspberry Pi 3 Model B Rev 1.2", "date_published": "2021-03-28T22:31:23+09:00", "date_modified": "2021-03-28T22:31:25+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "command line", "pick", "Buster", "Debian", "Linux", "Raspberry Pi OS", "sid" ] }, { "id": "http://matoken.org/blog/?p=3049", "url": "https://matoken.org/blog/2021/03/05/bonsai-is-fun/", "title": "\u76c6\u683d\u697d\u3057\u3044", "content_html": "
\n

\"cbonsai\"/

\n
\n
\n

\u76c6\u683d\u304c\u8868\u793a\u3067\u304d\u308b\u30a2\u30d7\u30ea\u3067\u3059\uff0e

\n
\n
\n\n
\n
\n

source\u3068x86_64\u7528\u306e.deb\u304c\u3042\u308a\u307e\u3059\uff0earmhf\u74b0\u5883\u3067source\u304b\u3089build\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo apt install libncurses-dev build-essential\n$ git clone https://gitlab.com/jallbrit/cbonsai\n$ cd cbonsai\n$ make\n$ install ./cbonsai ~/bin/
\n
\n
\n
\n

\u3044\u304f\u3064\u304b\u306e\u5b9f\u884c\u4f8b\u3067\u3059\uff0e

\n
\n
\n
\n
$ cbonsai (1)\n$ cbonsai -p (2)\n$ cbonsai -l (3)\n$ cbonsai -l -t 0.01 (4)\n$ cbonsai -c '<>' (5)\n$ cbonsai -m \"hello BONSAI\" (6)\n$ cbonsai -i -w1 (7)
\n
\n
\n
\n
    \n
  1. \u76c6\u683d\u3092\u8868\u793a(\u306a\u306b\u304b\u30ad\u30fc\u5165\u529b\u3067\u7d42\u4e86)
  2. \n
  3. \u76c6\u683d\u3092\u30d7\u30ea\u30f3\u30c8\u3057\u3066\u7d42\u4e86
  4. \n
  5. \u30e9\u30a4\u30d6\u30e2\u30fc\u30c9
  6. \n
  7. \u30e9\u30a4\u30d6\u30e2\u30fc\u30c9\u3067\u901f\u5ea6\u30921/3\u306b(\u65e2\u5b9a\u50240.03\u3067\u5358\u4f4d\u306f\u79d2)
  8. \n
  9. \u8449\u3063\u3071\u3092\u5909\u66f4
  10. \n
  11. \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a(\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57\u306f\u4e0d\u53ef)
  12. \n
  13. \u7121\u9650\u306b\u8868\u793a\uff0c\u9593\u9694\u30921\u79d2\u9593\u9694\u306b(\u65e2\u5b9a\u5024\u306f4.00\u79d2)
  14. \n
\n
\n
\n

\u697d\u3057\u3044\u3067\u3059\"\ud83c\udf33\"

\n
\n
\n

\u30ed\u30b0\u30a4\u30f3\u6642\u306b\u76c6\u683d\u3068fortune\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u305f\u3044\u3068\u304d\u306f\u3053\u3093\u306a\u611f\u3058\u3067\uff0e

\n
\n
\n
\n
$ echo 'cbonsai -p -m \"`fortune`\"' >> ~/.profile
\n
\n
\n

\n
\n
\n
\u74b0\u5883
\n
\n
$ git log -1\ncommit 15e19580ddc58741291386000076928b2e591ef2 (HEAD -> master, origin/master, origin/HEAD)\nAuthor: John A <jallbritten6@gmail.com>\nDate:   Thu Mar 4 10:37:32 2021 -0500\n\n    Update install instructions and add bashrc notice\n\n$ dpkg-query -W libncurses-dev build-essential\nbuild-essential 12.6\nlibncurses-dev:armhf    6.1+20181013-2+deb10u2\n$ lsb_release -dr\nDescription:    Raspbian GNU/Linux 10 (buster)\nRelease:        10\n$ arch\narmv7l\n$ cat /proc/device-tree/model && echo\nRaspberry Pi 3 Model B Rev 1.2
\n
\n
\n", "content_text": "\u76c6\u683d\u304c\u8868\u793a\u3067\u304d\u308b\u30a2\u30d7\u30ea\u3067\u3059\uff0e\n\n\n\nJohn Allbritten / cbonsai \u00b7 GitLab\n\n\nJohn Allbritten / bonsai.sh \u00b7 GitLab (\u4ee5\u524d\u958b\u767a\u3055\u308c\u3066\u3044\u305fshell\u7248)\n\n\n\n\n\n\nsource\u3068x86_64\u7528\u306e.deb\u304c\u3042\u308a\u307e\u3059\uff0earmhf\u74b0\u5883\u3067source\u304b\u3089build\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\n$ sudo apt install libncurses-dev build-essential\n$ git clone https://gitlab.com/jallbrit/cbonsai\n$ cd cbonsai\n$ make\n$ install ./cbonsai ~/bin/\n\n\n\n\u3044\u304f\u3064\u304b\u306e\u5b9f\u884c\u4f8b\u3067\u3059\uff0e\n\n\n\n$ cbonsai (1)\n$ cbonsai -p (2)\n$ cbonsai -l (3)\n$ cbonsai -l -t 0.01 (4)\n$ cbonsai -c '<>' (5)\n$ cbonsai -m \"hello BONSAI\" (6)\n$ cbonsai -i -w1 (7)\n\n\n\n\n\u76c6\u683d\u3092\u8868\u793a(\u306a\u306b\u304b\u30ad\u30fc\u5165\u529b\u3067\u7d42\u4e86)\n\u76c6\u683d\u3092\u30d7\u30ea\u30f3\u30c8\u3057\u3066\u7d42\u4e86\n\u30e9\u30a4\u30d6\u30e2\u30fc\u30c9\n\u30e9\u30a4\u30d6\u30e2\u30fc\u30c9\u3067\u901f\u5ea6\u30921/3\u306b(\u65e2\u5b9a\u50240.03\u3067\u5358\u4f4d\u306f\u79d2)\n\u8449\u3063\u3071\u3092\u5909\u66f4\n\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a(\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57\u306f\u4e0d\u53ef)\n\u7121\u9650\u306b\u8868\u793a\uff0c\u9593\u9694\u30921\u79d2\u9593\u9694\u306b(\u65e2\u5b9a\u5024\u306f4.00\u79d2)\n\n\n\n\u697d\u3057\u3044\u3067\u3059\n\n\n\u30ed\u30b0\u30a4\u30f3\u6642\u306b\u76c6\u683d\u3068fortune\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u305f\u3044\u3068\u304d\u306f\u3053\u3093\u306a\u611f\u3058\u3067\uff0e\n\n\n\n$ echo 'cbonsai -p -m \"`fortune`\"' >> ~/.profile\n\n\n\n\n\n\u74b0\u5883\n\n$ git log -1\ncommit 15e19580ddc58741291386000076928b2e591ef2 (HEAD -> master, origin/master, origin/HEAD)\nAuthor: John A <jallbritten6@gmail.com>\nDate: Thu Mar 4 10:37:32 2021 -0500\n\n Update install instructions and add bashrc notice\n\n$ dpkg-query -W libncurses-dev build-essential\nbuild-essential 12.6\nlibncurses-dev:armhf 6.1+20181013-2+deb10u2\n$ lsb_release -dr\nDescription: Raspbian GNU/Linux 10 (buster)\nRelease: 10\n$ arch\narmv7l\n$ cat /proc/device-tree/model && echo\nRaspberry Pi 3 Model B Rev 1.2", "date_published": "2021-03-05T19:04:23+09:00", "date_modified": "2021-03-05T19:04:23+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "bonsai", "CLI", "game", "Buster", "Linux", "Raspberry Pi OS" ] }, { "id": "http://matoken.org/blog/?p=3032", "url": "https://matoken.org/blog/2021/03/02/try-some-sl/", "title": "\u3044\u304f\u3064\u304b\u306e\u201dsl\u201d\u30b3\u30de\u30f3\u30c9\u3092\u8a66\u3059", "content_html": "
\n

\u30ce\u30fc\u30de\u30eb?sl

\n
\n
\n

\u306a\u3093\u3068\u306a\u304f\u30b8\u30e7\u30fc\u30af\u30d7\u30ed\u30b0\u30e9\u30e0\u306esl\u3092\u5c0e\u5165\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo apt install sl
\n
\n
\n
\n

\"sl

\n
\n\n
\n

\u3057\u304b\u3057\u7269\u8db3\u308a\u307e\u305b\u3093\"\ud83e\udd14\"

\n
\n
\n
\n
\n

Izumi\u3055\u3093\u6539\u9020\u7248

\n
\n
\n

\u6614\u306fSunOS\u4e0a\u3067\u3068\u3066\u3082\u9577\u3044\u7de8\u6210\u3060\u3063\u305f\u308a\u901a\u308a\u904e\u304e\u3066\u906e\u65ad\u5668\u304c\u4e0a\u304c\u3063\u305f\u304b\u3068\u601d\u3046\u3068\u307e\u305f\u4e0b\u304c\u3063\u3066\u6298\u308a\u8fd4\u3057\u305f\u308a\u3059\u308bpatch\u3092\u5f53\u3066\u3066\u3044\u307e\u3057\u305f\uff0e\u63a2\u3057\u3066\u307f\u308b\u3068\u6050\u3089\u304f\u3053\u3061\u3089\u306e\u3082\u306e\uff0e

\n
\n
\n\n
\n
\n

\u3057\u304b\u3057patch\u304c\u30ea\u30f3\u30af\u5207\u308c\uff0eWayback Machine\u306b\u3082\u898b\u3064\u304b\u308a\u307e\u305b\u3093\uff0e

\n
\n\n
\n

\u691c\u7d22\u3059\u308b\u3068\u3053\u3061\u3089\u306e\u30da\u30fc\u30b8\u3092\u767a\u898b\uff0epatch\u9069\u7528\u6e08\u306e\u3082\u306e\u3092GitHub\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u307e\u3059\uff0e\u3053\u3061\u3089\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n\n
\n
\n
$ sudo apt build-dep sl (1)\n$ git clone https://github.com/gmkou/sl (2)\n$ cd sl\n$ make (3)\n$ install ./sl ~/bin/ (4)\n$ which sl (5)\n/home/matoken/bin/sl\n$ sl
\n
\n
\n
\n
    \n
  1. sl\u306e\u30d3\u30eb\u30c9\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165
  2. \n
  3. source\u3092clone
  4. \n
  5. make
  6. \n
  7. \u9069\u5f53\u306a\u5834\u6240\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb
  8. \n
  9. sl\u306e\u30d1\u30b9\u3092\u78ba\u8a8d
  10. \n
\n
\n
\n

\"sl

\n
\n
\n

30\u4e21\u304f\u3089\u3044\u306e\u306a\u304c\u301c\u3044sl\u3082\u51fa\u73fe\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\"\ud83d\ude3b\"\u3053\u308c\u3067ls\u306eTypo\u77ef\u6b63\u304c\u6357\u308b\u2026\u2026\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e

\n
\n
\n
\n
\n

\u30df\u30e9\u30fc\u7248sl

\n
\n
\n

\u3053\u3061\u3089\u306esl\u306f\u30df\u30e9\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3067ls\u306e\u7d50\u679c\u3092\u53cd\u8ee2\u3055\u305b\u3066\u8868\u793a\u3057\u307e\u3059\uff0e\u3053\u308c\u3082\u697d\u3057\u3044

\n
\n\n
\n
\n
$ /tmp/sl -l\n04                                                         latot\ndm.ETALPMET_EUSSI 70:60 2  raM 044  nekotam nekotam 1 --r--r-wr-\nelifekaM          70:60 2  raM 868  nekotam nekotam 1 --r--r-wr-\ndm.EMDAER         70:60 2  raM 0351 nekotam nekotam 1 --r--r-wr-\nitg               70:60 2  raM 0079 nekotam nekotam 1 x-rx-rxwr-\n6.itg             70:60 2  raM 8001 nekotam nekotam 1 --r--r-wr-\nc.itg             70:60 2  raM 2258 nekotam nekotam 1 --r--r-wr-\n$ ls -l\ntotal 40\n-rw-r--r-- 1 matoken matoken  440 Mar  2 06:07 ISSUE_TEMPLATE.md\n-rw-r--r-- 1 matoken matoken  868 Mar  2 06:07 Makefile\n-rw-r--r-- 1 matoken matoken 1530 Mar  2 06:07 README.md\n-rwxr-xr-x 1 matoken matoken 9700 Mar  2 06:07 gti\n-rw-r--r-- 1 matoken matoken 1008 Mar  2 06:07 gti.6\n-rw-r--r-- 1 matoken matoken 8522 Mar  2 06:07 gti.c
\n
\n
\n
\n
\n
\n

\u304a\u307e\u3051)gti

\n
\n
\n

\u305d\u3046\u3044\u3048\u3070sl\u30a4\u30f3\u30b9\u30d1\u30a4\u30a2\u306agit\u306b\u5bfe\u3059\u308bgti\u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0e\u3053\u308c\u306fgit\u3068\u6253\u3068\u3046\u3068\u3057\u3066gti\u3068\u5165\u529b\u3057\u3066\u3057\u307e\u3063\u305f\u3068\u304d\u8eca\u304c\u8d70\u3063\u3066\u3044\u304d\u307e\u3059\"\ud83d\ude97\"

\n
\n
\n

\u697d\u3057\u3044\u3067\u3059\u306d\uff0e

\n
\n
\n
\n
$ git clone https://github.com/rwos/gti\n$ cd gti\n$ make\n$ install ./gti ~/bin/\n$ gti
\n
\n
\n
\n

\"sl

\n
\n\n
\n
\n
\n

\u74b0\u5883

\n
\n
\n
\n
$ lsb_release -dr\nDescription:    Raspbian GNU/Linux 10 (buster)\nRelease:        10\n$ uname -a\nLinux raspberrypi 5.10.11-v7+ #1399 SMP Thu Jan 28 12:06:05 GMT 2021 armv7l GNU/Linux\n$ cat /proc/device-tree/model ;echo\nRaspberry Pi 3 Model B Rev 1.2
\n
\n
\n
\n
\n", "content_text": "\u30ce\u30fc\u30de\u30eb?sl\n\n\n\u306a\u3093\u3068\u306a\u304f\u30b8\u30e7\u30fc\u30af\u30d7\u30ed\u30b0\u30e9\u30e0\u306esl\u3092\u5c0e\u5165\u3057\u307e\u3057\u305f\uff0e\n\n\n\n$ sudo apt install sl\n\n\n\n\n\n\n\n\u8c4a\u7530\u6b63\u53f2\u3068sl\u30b3\u30de\u30f3\u30c9 (Masashi Toyoda and SL command)\n\n\nmtoyoda/sl: SL(1): Cure your bad habit of mistyping\n\n\n\n\n\n\n\u3057\u304b\u3057\u7269\u8db3\u308a\u307e\u305b\u3093\n\n\n\n\nIzumi\u3055\u3093\u6539\u9020\u7248\n\n\n\u6614\u306fSunOS\u4e0a\u3067\u3068\u3066\u3082\u9577\u3044\u7de8\u6210\u3060\u3063\u305f\u308a\u901a\u308a\u904e\u304e\u3066\u906e\u65ad\u5668\u304c\u4e0a\u304c\u3063\u305f\u304b\u3068\u601d\u3046\u3068\u307e\u305f\u4e0b\u304c\u3063\u3066\u6298\u308a\u8fd4\u3057\u305f\u308a\u3059\u308bpatch\u3092\u5f53\u3066\u3066\u3044\u307e\u3057\u305f\uff0e\u63a2\u3057\u3066\u307f\u308b\u3068\u6050\u3089\u304f\u3053\u3061\u3089\u306e\u3082\u306e\uff0e\n\n\n\nSL\n\n\n\n\u3057\u304b\u3057patch\u304c\u30ea\u30f3\u30af\u5207\u308c\uff0eWayback Machine\u306b\u3082\u898b\u3064\u304b\u308a\u307e\u305b\u3093\uff0e\n\n\n\nWayback Machine\n\n\n\n\u691c\u7d22\u3059\u308b\u3068\u3053\u3061\u3089\u306e\u30da\u30fc\u30b8\u3092\u767a\u898b\uff0epatch\u9069\u7528\u6e08\u306e\u3082\u306e\u3092GitHub\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u307e\u3059\uff0e\u3053\u3061\u3089\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\n\u30b8\u30e7\u30fc\u30af\u30d7\u30ed\u30b0\u30e9\u30e0sl\u3092\u52d5\u304b\u3057\u3066\u307f\u305f – Qiita\ngmkou/sl: SL(1): Cure your bad habit of mistyping\n\n\n\n\n$ sudo apt build-dep sl (1)\n$ git clone https://github.com/gmkou/sl (2)\n$ cd sl\n$ make (3)\n$ install ./sl ~/bin/ (4)\n$ which sl (5)\n/home/matoken/bin/sl\n$ sl\n\n\n\n\nsl\u306e\u30d3\u30eb\u30c9\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165\nsource\u3092clone\nmake\n\u9069\u5f53\u306a\u5834\u6240\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nsl\u306e\u30d1\u30b9\u3092\u78ba\u8a8d\n\n\n\n\n\n\n30\u4e21\u304f\u3089\u3044\u306e\u306a\u304c\u301c\u3044sl\u3082\u51fa\u73fe\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3053\u308c\u3067ls\u306eTypo\u77ef\u6b63\u304c\u6357\u308b\u2026\u2026\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e\n\n\n\n\n\u30df\u30e9\u30fc\u7248sl\n\n\n\u3053\u3061\u3089\u306esl\u306f\u30df\u30e9\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3067ls\u306e\u7d50\u679c\u3092\u53cd\u8ee2\u3055\u305b\u3066\u8868\u793a\u3057\u307e\u3059\uff0e\u3053\u308c\u3082\u697d\u3057\u3044\n\n\n\ngir.st – sl: a mirror version of ls\n\n\n\n\n$ /tmp/sl -l\n04 latot\ndm.ETALPMET_EUSSI 70:60 2 raM 044 nekotam nekotam 1 --r--r-wr-\nelifekaM 70:60 2 raM 868 nekotam nekotam 1 --r--r-wr-\ndm.EMDAER 70:60 2 raM 0351 nekotam nekotam 1 --r--r-wr-\nitg 70:60 2 raM 0079 nekotam nekotam 1 x-rx-rxwr-\n6.itg 70:60 2 raM 8001 nekotam nekotam 1 --r--r-wr-\nc.itg 70:60 2 raM 2258 nekotam nekotam 1 --r--r-wr-\n$ ls -l\ntotal 40\n-rw-r--r-- 1 matoken matoken 440 Mar 2 06:07 ISSUE_TEMPLATE.md\n-rw-r--r-- 1 matoken matoken 868 Mar 2 06:07 Makefile\n-rw-r--r-- 1 matoken matoken 1530 Mar 2 06:07 README.md\n-rwxr-xr-x 1 matoken matoken 9700 Mar 2 06:07 gti\n-rw-r--r-- 1 matoken matoken 1008 Mar 2 06:07 gti.6\n-rw-r--r-- 1 matoken matoken 8522 Mar 2 06:07 gti.c\n\n\n\n\n\n\u304a\u307e\u3051)gti\n\n\n\u305d\u3046\u3044\u3048\u3070sl\u30a4\u30f3\u30b9\u30d1\u30a4\u30a2\u306agit\u306b\u5bfe\u3059\u308bgti\u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0e\u3053\u308c\u306fgit\u3068\u6253\u3068\u3046\u3068\u3057\u3066gti\u3068\u5165\u529b\u3057\u3066\u3057\u307e\u3063\u305f\u3068\u304d\u8eca\u304c\u8d70\u3063\u3066\u3044\u304d\u307e\u3059\n\n\n\u697d\u3057\u3044\u3067\u3059\u306d\uff0e\n\n\n\n$ git clone https://github.com/rwos/gti\n$ cd gti\n$ make\n$ install ./gti ~/bin/\n$ gti\n\n\n\n\n\n\n\ngti | r-wos.org\n\n\n\u30d5\u30a9\u30eb\u30af\u30b9\u30ef\u30fc\u30b2\u30f3 GTI\u30b7\u30ea\u30fc\u30ba | \u30d5\u30a9\u30eb\u30af\u30b9\u30ef\u30fc\u30b2\u30f3\u516c\u5f0f\n\n\n\n\n\n\n\n\n\u74b0\u5883\n\n\n\n$ lsb_release -dr\nDescription: Raspbian GNU/Linux 10 (buster)\nRelease: 10\n$ uname -a\nLinux raspberrypi 5.10.11-v7+ #1399 SMP Thu Jan 28 12:06:05 GMT 2021 armv7l GNU/Linux\n$ cat /proc/device-tree/model ;echo\nRaspberry Pi 3 Model B Rev 1.2", "date_published": "2021-03-02T22:06:40+09:00", "date_modified": "2021-03-03T04:13:17+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "gti", "joke", "sl", "Buster", "Linux", "Raspberry Pi OS" ] }, { "id": "http://matoken.org/blog/?p=3029", "url": "https://matoken.org/blog/2021/03/02/github-clone-which-allows-you-to-download-a-specific-directory-or-less-of-a-repository-from-github-com/", "title": "GitHub.com\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b\u300cGitHub clone\u300d", "content_html": "
\n

\u5927\u304d\u306aGit\u30ea\u30dd\u30b8\u30c8\u30ea\u3092clone\u3059\u308b\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\uff0e\u6700\u65b0\u306e\u3082\u306e\u3060\u3051\u304c\u6b32\u3057\u3044\u5834\u5408\u306f --depth \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u304c\uff0c\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4e00\u90e8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3060\u3051\u304c\u6b32\u3057\u3044\u6642\u306b\u306f\u4f7f\u3048\u307e\u305b\u3093\uff0e\u305d\u3046\u3044\u3046\u3068\u304d\u306bGitHub clone\u3092\u4f7f\u3046\u3068\uff0c\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3060\u3051\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u3066\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e

\n
\n
\n\n
\n
\n

\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ pip3 install git+git://github.com/HR/github-clone#egg=ghclone (1)\n$ ghclone (2)\nUsage:\n  ghclone <url> [-t | --token=<token>]\n  ghclone (-h | --help)\n  ghclone (-v | --version)\n$ ghclone https://github.com/torvalds/linux/tree/master/tools/usb/usbip (3)\nCloning into 'usbip'...\ndone.\n$ cd usbip\n$ ls -A (4)\n.gitignore  AUTHORS  COPYING  INSTALL  Makefile.am  README  autogen.sh  cleanup.sh  configure.ac  doc  libsrc  src  vudc\n$ git status (5)\nfatal: not a git repository (or any of the parent directories): .git\n$ cd ..\n$ ghclone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/usb (6)\nInvalid GitHub URI
\n
\n
\n
\n
    \n
  1. pip\u3067\u5c0e\u5165\u3059\u308b(\u3082\u3057PATH\u304c\u901a\u3063\u3066\u306a\u3051\u308c\u3070 ~/.local/bin \u3092\u52a0\u3048\u308b)
  2. \n
  3. USAGE
  4. \n
  5. Linux Kernel\u306e\u4e00\u90e8\u3060\u3051\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
  6. \n
  7. \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5185\u5bb9\u78ba\u8a8d
  8. \n
  9. Git\u7ba1\u7406\u306f\u3055\u308c\u3066\u3044\u306a\u3044
  10. \n
  11. GitHub\u4ee5\u5916\u306eGit\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u5931\u6557\u3059\u308b
  12. \n
\n
\n
\n

GitHub.com\u306eAPI\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u3067GitHub.com\u4ee5\u5916\u3067\u306f\u4f7f\u3048\u307e\u305b\u3093\u304c\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e

\n
\n
\n

\u4f3c\u305f\u3082\u306e\u306bBitBacket\u3067\u540c\u69d8\u306e\u3053\u3068\u304c\u3067\u304d\u308b\uff0c\u300cbb-clone\u300d\u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n\n
\n
\n
\u74b0\u5883
\n
\n
$ ghclone -v\n1.2.0\n$ dpkg-query -W git python3-pip python3\ngit     1:2.20.1-2+deb10u3\npython3 3.7.3-1\npython3-pip     18.1-5+rpt1\n$ lsb_release -dr\nDescription:    Raspbian GNU/Linux 10 (buster)\nRelease:        10\n$ uname -a\nLinux raspberrypi 5.10.11-v7+ #1399 SMP Thu Jan 28 12:06:05 GMT 2021 armv7l GNU/Linux\n$ cat /proc/device-tree/model ;echo\nRaspberry Pi 3 Model B Rev 1.2
\n
\n
\n", "content_text": "\u5927\u304d\u306aGit\u30ea\u30dd\u30b8\u30c8\u30ea\u3092clone\u3059\u308b\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\uff0e\u6700\u65b0\u306e\u3082\u306e\u3060\u3051\u304c\u6b32\u3057\u3044\u5834\u5408\u306f --depth \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u304c\uff0c\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4e00\u90e8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3060\u3051\u304c\u6b32\u3057\u3044\u6642\u306b\u306f\u4f7f\u3048\u307e\u305b\u3093\uff0e\u305d\u3046\u3044\u3046\u3068\u304d\u306bGitHub clone\u3092\u4f7f\u3046\u3068\uff0c\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3060\u3051\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u3066\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e\n\n\n\nHR/github-clone: \u2800git clone repo subdirectories\n\n\n\n\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\n$ pip3 install git+git://github.com/HR/github-clone#egg=ghclone (1)\n$ ghclone (2)\nUsage:\n ghclone <url> [-t | --token=<token>]\n ghclone (-h | --help)\n ghclone (-v | --version)\n$ ghclone https://github.com/torvalds/linux/tree/master/tools/usb/usbip (3)\nCloning into 'usbip'...\ndone.\n$ cd usbip\n$ ls -A (4)\n.gitignore AUTHORS COPYING INSTALL Makefile.am README autogen.sh cleanup.sh configure.ac doc libsrc src vudc\n$ git status (5)\nfatal: not a git repository (or any of the parent directories): .git\n$ cd ..\n$ ghclone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/usb (6)\nInvalid GitHub URI\n\n\n\n\npip\u3067\u5c0e\u5165\u3059\u308b(\u3082\u3057PATH\u304c\u901a\u3063\u3066\u306a\u3051\u308c\u3070 ~/.local/bin \u3092\u52a0\u3048\u308b)\nUSAGE\nLinux Kernel\u306e\u4e00\u90e8\u3060\u3051\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5185\u5bb9\u78ba\u8a8d\nGit\u7ba1\u7406\u306f\u3055\u308c\u3066\u3044\u306a\u3044\nGitHub\u4ee5\u5916\u306eGit\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u5931\u6557\u3059\u308b\n\n\n\nGitHub.com\u306eAPI\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u3067GitHub.com\u4ee5\u5916\u3067\u306f\u4f7f\u3048\u307e\u305b\u3093\u304c\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e\n\n\n\u4f3c\u305f\u3082\u306e\u306bBitBacket\u3067\u540c\u69d8\u306e\u3053\u3068\u304c\u3067\u304d\u308b\uff0c\u300cbb-clone\u300d\u3068\u3044\u3046\u3082\u306e\u3082\u3042\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\nbb-clone\n\n\n\n\u74b0\u5883\n\n$ ghclone -v\n1.2.0\n$ dpkg-query -W git python3-pip python3\ngit 1:2.20.1-2+deb10u3\npython3 3.7.3-1\npython3-pip 18.1-5+rpt1\n$ lsb_release -dr\nDescription: Raspbian GNU/Linux 10 (buster)\nRelease: 10\n$ uname -a\nLinux raspberrypi 5.10.11-v7+ #1399 SMP Thu Jan 28 12:06:05 GMT 2021 armv7l GNU/Linux\n$ cat /proc/device-tree/model ;echo\nRaspberry Pi 3 Model B Rev 1.2", "date_published": "2021-03-02T08:40:47+09:00", "date_modified": "2021-03-02T02:41:23+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "git", "GitHub", "Buster", "Linux", "Raspberry Pi OS" ] }, { "id": "http://matoken.org/blog/?p=2897", "url": "https://matoken.org/blog/2020/12/20/try-to-record-the-sensor-log-with-nextclouds-sensorlogger/", "title": "\u30bb\u30f3\u30b5\u30fc\u306e\u30ed\u30b0\u3092Nextcloud\u306eSensorlogger\u3067\u8a18\u9332\u3057\u3066\u307f\u308b", "content_html": "
\n

\u3053\u306e\u8a18\u4e8b\u306f \u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 Advent Calendar 2020 \u306e20\u65e5\u5206\u306e\u8a18\u4e8b\u3067\u3059\uff0e
\n\u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8\u306f\u73fe\u5728\u6708\u306b\u4e00\u56de\u52c9\u5f37\u4f1a\u3092\u884c\u3044\u69d8\u3005\u306a\u8a71\u984c\u3067\u76db\u308a\u4e0a\u304c\u3063\u3066\u3044\u307e\u3059\uff0e
\n\u6b21\u306e\u52c9\u5f37\u4f1a\u306f\u3061\u3087\u3046\u3069\u4eca\u65e5(20\u65e5)\u3067\u3059\uff0e\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u8997\u3044\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e

\n
\n
\n\n
\n
\n

\u30bb\u30f3\u30b5\u30fc\u306e\u30ed\u30b0\u306a\u3069\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u306e\u306b\u8272\u3005\u306aweb\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u305f\u308a\uff0cGoogle\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u3044\u305f\u308a\u3057\u3066\u3044\u307e\u3059\uff0e
\n\u4fbf\u5229\u306a\u3093\u3060\u3051\u3069\u30ed\u30c3\u30af\u30a4\u30f3\u306b\u306a\u308b\u306e\u306f\u5acc\u3060\u306a\u3063\u3066\u601d\u3063\u305f\u308a\u3057\u307e\u3059\uff0e

\n
\n
\n

Nextcloud\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u5171\u6709\u30b5\u30fc\u30d3\u30b9+\u03b1\u306aOSS\u304c\u3042\u308a\u307e\u3059\uff0e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u6a5f\u80fd\u3092\u5897\u3084\u3059\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e\u4f8b\u3048\u3070\u30c6\u30ec\u30d3\u96fb\u8a71\u3084\uff0c\u30aa\u30f3\u30e9\u30a4\u30f3\u30aa\u30d5\u30a3\u30b9\u3068\u304b\uff0c\u30de\u30c3\u30d7\u30b5\u30fc\u30d3\u30b9\u3068\u304b\u69d8\u3005\u306a\u30a2\u30d7\u30ea\u304c\u3042\u308a\u307e\u3059\uff0e
\n\u3053\u308c\u3092\u500b\u4eba\u7684\u306b\u7acb\u3066\u3066\u4fbf\u5229\u306b\u4f7f\u3063\u3066\u3044\u307e\u3059

\n
\n
\n\n
\n
\n

\u3053\u306e\u4e2d\u306e\u30a2\u30d7\u30ea\u3092\u773a\u3081\u3066\u3044\u308b\u3068Sensorlogger\u3068\u3044\u3046\u30bb\u30f3\u30b5\u30fc\u306e\u30ed\u30b0\u3092\u4fdd\u5b58\u3067\u304d\u305d\u3046\u306a\u3082\u306e\u3092\u898b\u3064\u3051\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n\n
\n
\n

\u307e\u305aNextcloud\u3067\u3059\u304c\uff0c\u3068\u308a\u3042\u3048\u305a\u8a66\u3059\u3060\u3051\u306a\u3089snap\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u304a\u624b\u8efd\u3067\u3059\uff0eRaspberry Pi + Raspberry Pi OS\u306a\u3069\u3067\u3082OK\u3067\u3059\uff0e

\n
\n
\n

Debian sid amd64/Ubuntu 20.04 LTS/Raspberry Pi OS armhf\u3067\u306f\u4ee5\u4e0b\u306e\u624b\u9806\u3067OK\u3067\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo apt update && sudo apt upgrade   (1)\n$ sudo apt install snapd    (2)\n$ sudo snap install nextcloud   (3)
\n
\n
\n
\n
    \n
  1. \u30b7\u30b9\u30c6\u30e0\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6700\u65b0\u306b\u3059\u308b
  2. \n
  3. snap\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b snapd \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165
  4. \n
  5. snap\u3067nextcloud\u3092\u5c0e\u5165
  6. \n
\n
\n
\n

10\u5206\u4f4d\u5f85\u3064\u3068\u5c0e\u5165\u304c\u7d42\u308f\u308a\u307e\u3059\uff0e\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u306bIP\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3059\u308b\u3068\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u7ba1\u7406\u8005ID/PASSWORD\u3092\u8a2d\u5b9a\u3057\u307e\u3059\uff0e

\n
\n
\n

\u3053\u308c\u3067\u3068\u308a\u3042\u3048\u305a\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3068\u601d\u3044\u307e\u3059\uff0e

\n
\n
\n

\u3053\u306e\u5f8cSensorlogger\u3092\u5c0e\u5165\u3057\u307e\u3059\uff0e
\n\u7ba1\u7406\u8005\u6a29\u9650\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3067Nextcloud\u306e\u53f3\u4e0a\u306e\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c\u30a2\u30d7\u30ea\u300d\u3092\u958b\u304d\u307e\u3059\uff0e

\n
\n
\n

\"20201219

\n
\n
\n

\u6b21\u306b\u4e0a\u306e\u691c\u7d22\u30d0\u30fc\u306b\u300cSensorlogger\u300d\u3068\u304b\u306e\u6587\u5b57\u5217\u3067\u691c\u7d22\u3057\u3066\u300c\u6709\u52b9\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u5c0e\u5165\u3057\u307e\u3059\uff0e

\n
\n
\n

\"20201219

\n
\n
\n\n\n\n\n\n\n\n
\n
Tip
\n
\nNextcloud\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u5c0e\u5165\u3059\u308b\u3053\u3068\u3082\u51fa\u6765\u307e\u3059\uff0e
\n$ sudo -u www-data occ app:install sensorlogger #\u901a\u5e38\u5c0e\u5165\u3057\u305f\u5834\u5408
\n$ sudo /snap/bin/nextcloud.occ app:install sensorlogger #snap\u3067\u5c0e\u5165\u3057\u305f\u5834\u5408
\n
\n
\n

\u3053\u3053\u304b\u3089\u306f\u4e00\u822c\u30e6\u30fc\u30b6\u3067OK\u3067\u3059\uff0e

\n
\n
\n

Nextcloud\u306e\u4e0a\u90e8\u304b\u3089\u300cSensorlogger\u300d\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068Sensorlogger\u306e\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n

\"20201219

\n
\n
\n

\u306f\u3058\u3081\u306f\u30c7\u30fc\u30bf\u304c\u306a\u3044\u306e\u3067\u307e\u3063\u3055\u3089\u3067\u3059\uff0e\u300cDevice\u300d\u8fba\u308a\u3067\u30c7\u30d0\u30a4\u30b9\u306e\u767b\u9332\u3092\u3059\u308b\u306e\u304b\u306a?\u3068\u601d\u3044\u307e\u3057\u305f\u304c\u51fa\u6765\u307e\u305b\u3093\uff0e
\n\u300cRead SensorLogger Wiki Devices\u300d\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u3067Wiki\u3092\u53c2\u7167\u3057\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n\n
\n
\n

\u30c7\u30fc\u30bf\u3092\u9001\u308b\u3068\u81ea\u52d5\u7684\u306b\u30c7\u30d0\u30a4\u30b9\u304c\u51fa\u6765\u308b\u3088\u3046\u3067\u3059\uff0eSimple, Complex\u306e2\u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u30bf\u30a4\u30d7\u304c\u3042\u308b\u3088\u3046\u3067\u3059\uff0eSimple\u306f\u6e29\u5ea6\uff0c\u6e7f\u5ea6\u306e\u3088\u3046\u3067\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3092\u8a66\u3057\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n

\u4ee5\u4e0b\u306e\u8fba\u308a\u304b\u3089 post.php \u3092\u6301\u3063\u3066\u304d\u3066\u4f7f\u3044\u307e\u3059\uff0e\u3053\u306escript\u306f\u30c0\u30df\u30fc\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u6e29\u5ea6\u3068\u6e7f\u5ea6\u30c7\u30fc\u30bf\u3092\u4f5c\u3063\u3066Sensourlogger\u306b\u30c7\u30fc\u30bf\u3092\u6295\u3052\u307e\u3059\uff0e

\n
\n
\n\n
\n
\n

\u4f55\u7b87\u6240\u304b\u66f8\u304d\u63db\u3048\u307e\u3059\uff0e
\n* $url = ` \u3092\u81ea\u5206\u306eNextcloud\u306eURL\u306b\u5909\u66f4\u3057\u307e\u3059\uff0e
\n* `$array = array(\"deviceId\" \u21d2
\u3092 uuidgen \u30b3\u30de\u30f3\u30c9\u306a\u3069\u3067\u751f\u6210\u3057\u305fUUID\u306b\u5909\u66f4\u3057\u307e\u3059\uff0e
\n* $username = \u3092Nextcloud\u306e\u81ea\u5206\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u5909\u66f4\u3057\u307e\u3059\uff0e
\n* $token = \u306b\u300c\u8a2d\u5b9a\u300d\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u300d\u30da\u30fc\u30b8\u306e\u300c\u30c7\u30d0\u30a4\u30b9\u3068\u30bb\u30c3\u30b7\u30e7\u30f3\u300d\u306e\u4e00\u756a\u4e0b\u306e\u300c\u65b0\u3057\u3044\u30a2\u30d7\u30ea\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u6210\u300d\u3067\u4f5c\u6210\u3057\u305f\u30c8\u30fc\u30af\u30f3\u306b\u4fee\u6b63\u3057\u307e\u3059\uff0e

\n
\n
\n

\u305d\u3057\u3066php\u3068php-curl\u304c\u5fc5\u8981\u306a\u306e\u3067\u5c0e\u5165\u3057\u307e\u3059\uff0e

\n
\n
\n
Debian sid amd64/Ubuntu 20.04 LTS/Raspberry Pi OS armhf\u3067\u306e\u4f8b
\n
\n
$ sudo apt install php-cli php-curl
\n
\n
\n
\n

\u3053\u306e\u72b6\u614b\u3067 post.php \u3092\u5b9f\u884c\u3057\u3066\u6210\u529f\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u5e30\u3063\u3066\u304d\u307e\u3059\uff0e

\n
\n
\n
\n
$ php ./post.php\n{\"success\":true,\"message\":\"Sensor Log successfully stored\",\"data\":null}
\n
\n
\n
\n

Sensorlogger\u306e\u30da\u30fc\u30b8\u306e List \u3092\u898b\u308b\u3068\u30a8\u30fc\u30bf\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u89e3\u308a\u307e\u3059 :)

\n
\n
\n

\u624b\u52d5\u3067\u5b9f\u884c\u3059\u308b\u306e\u306f\u5927\u5909\u306a\u306e\u3067crontab\u306b\u3053\u3093\u306a\u611f\u3058\u3067\u767b\u9332\u3057\u3066\u307f\u307e\u3059\uff0e5\u5206\u306b\u4e00\u56de\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3057\u307e\u3059\uff0e

\n
\n
\n
\n
$ crontab -e (1)\n$ crontab -l | grep post.php (2)\n*/5 * * * *     php ~/tmp/post.php 2&>1 > ~/tmp/post.php.log
\n
\n
\n
\n
    \n
  1. crontab\u306e\u7de8\u96c6
  2. \n
  3. crontab\u306b\u767b\u9332\u3055\u308c\u305f\u304b\u78ba\u8a8d
  4. \n
\n
\n
\n

\u540c\u69d8\u306bRaspberry Pi\u306e\u6e29\u5ea6\u3082\u9001\u3063\u3066\u307f\u307e\u3059\uff0e\u6e29\u5ea6\u306e $temperature \u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u66f8\u304d\u63db\u3048\u3066\uff0cUUID\u3082\u66f8\u304d\u63db\u3048\u308b\u3068OK\uff0e\u3053\u308c\u3082crontab\u306b\u767b\u9332\u3057\u307e\u3059\uff0e

\n
\n
\n
\n
    $temperature = system( '/opt/vc/bin/vcgencmd measure_temp | awk -F \"[=\\']\" \\'{print $2 }\\' | tr -d \\'\\n\\'' );
\n
\n
\n
\n

\u3057\u3070\u3089\u304f\u52d5\u304b\u3057\u3066\u304b\u3089\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u306e\u30c1\u30e3\u30fc\u30c8\u304c\u8868\u793a\u3067\u304d\u307e\u3057\u305f\uff0e

\n
\n
\n

\"20201219

\n
\n
\n

\u5bc6\u96c6\u3057\u3066\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u90e8\u5206\u306f\u30de\u30a6\u30b9\u30c9\u30e9\u30c3\u30b0\u3067\u77e9\u5f62\u9078\u629e\u3059\u308b\u3068\u305d\u306e\u90e8\u5206\u304c\u30ba\u30fc\u30e0\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n

\"20201219

\n
\n
\n

\u3068\u3044\u3046\u611f\u3058\u3067\u3068\u308a\u3042\u3048\u305a\u52d5\u304d\u307e\u3057\u305f\uff0e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u672a\u3060\u5145\u5b9f\u3057\u3066\u3044\u306a\u8cb7\u3063\u305f\u308a\u4f7f\u3044\u52dd\u624b\u3082\u60aa\u3044\u3067\u3059\u304c\u6700\u4f4e\u9650\u306e\u6a5f\u80fd\u306f\u3042\u308b\u304b\u306a\u3068\u3044\u3046\u611f\u3058\u3067\u3059\uff0e
\n\u8208\u5473\u304c\u3042\u3063\u305f\u3089\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e
\n\u82e5\u3057\u304f\u306f\u304a\u3059\u3059\u3081\u306e\u30a2\u30d7\u30ea\u3084\u30b5\u30fc\u30d3\u30b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\uff0e

\n
\n

\n", "content_text": "\u3053\u306e\u8a18\u4e8b\u306f \u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 Advent Calendar 2020 \u306e20\u65e5\u5206\u306e\u8a18\u4e8b\u3067\u3059\uff0e\n\u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8\u306f\u73fe\u5728\u6708\u306b\u4e00\u56de\u52c9\u5f37\u4f1a\u3092\u884c\u3044\u69d8\u3005\u306a\u8a71\u984c\u3067\u76db\u308a\u4e0a\u304c\u3063\u3066\u3044\u307e\u3059\uff0e\n\u6b21\u306e\u52c9\u5f37\u4f1a\u306f\u3061\u3087\u3046\u3069\u4eca\u65e5(20\u65e5)\u3067\u3059\uff0e\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u8997\u3044\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e\n\n\n\n\u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 \u7b2c99\u56de\u52c9\u5f37\u4f1a – connpass\n\n\n\n\u30bb\u30f3\u30b5\u30fc\u306e\u30ed\u30b0\u306a\u3069\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u306e\u306b\u8272\u3005\u306aweb\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u305f\u308a\uff0cGoogle\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u3044\u305f\u308a\u3057\u3066\u3044\u307e\u3059\uff0e\n\u4fbf\u5229\u306a\u3093\u3060\u3051\u3069\u30ed\u30c3\u30af\u30a4\u30f3\u306b\u306a\u308b\u306e\u306f\u5acc\u3060\u306a\u3063\u3066\u601d\u3063\u305f\u308a\u3057\u307e\u3059\uff0e\n\n\nNextcloud\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u5171\u6709\u30b5\u30fc\u30d3\u30b9+\u03b1\u306aOSS\u304c\u3042\u308a\u307e\u3059\uff0e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u6a5f\u80fd\u3092\u5897\u3084\u3059\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e\u4f8b\u3048\u3070\u30c6\u30ec\u30d3\u96fb\u8a71\u3084\uff0c\u30aa\u30f3\u30e9\u30a4\u30f3\u30aa\u30d5\u30a3\u30b9\u3068\u304b\uff0c\u30de\u30c3\u30d7\u30b5\u30fc\u30d3\u30b9\u3068\u304b\u69d8\u3005\u306a\u30a2\u30d7\u30ea\u304c\u3042\u308a\u307e\u3059\uff0e\n\u3053\u308c\u3092\u500b\u4eba\u7684\u306b\u7acb\u3066\u3066\u4fbf\u5229\u306b\u4f7f\u3063\u3066\u3044\u307e\u3059\n\n\n\nNextcloud\n\n\n\n\u3053\u306e\u4e2d\u306e\u30a2\u30d7\u30ea\u3092\u773a\u3081\u3066\u3044\u308b\u3068Sensorlogger\u3068\u3044\u3046\u30bb\u30f3\u30b5\u30fc\u306e\u30ed\u30b0\u3092\u4fdd\u5b58\u3067\u304d\u305d\u3046\u306a\u3082\u306e\u3092\u898b\u3064\u3051\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\nSensorlogger – \u30a2\u30d7\u30ea – App Store – Nextcloud\n\n\n\n\u307e\u305aNextcloud\u3067\u3059\u304c\uff0c\u3068\u308a\u3042\u3048\u305a\u8a66\u3059\u3060\u3051\u306a\u3089snap\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u304a\u624b\u8efd\u3067\u3059\uff0eRaspberry Pi + Raspberry Pi OS\u306a\u3069\u3067\u3082OK\u3067\u3059\uff0e\n\n\nDebian sid amd64/Ubuntu 20.04 LTS/Raspberry Pi OS armhf\u3067\u306f\u4ee5\u4e0b\u306e\u624b\u9806\u3067OK\u3067\u3057\u305f\uff0e\n\n\n\n$ sudo apt update && sudo apt upgrade (1)\n$ sudo apt install snapd (2)\n$ sudo snap install nextcloud (3)\n\n\n\n\n\u30b7\u30b9\u30c6\u30e0\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6700\u65b0\u306b\u3059\u308b\nsnap\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b snapd \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165\nsnap\u3067nextcloud\u3092\u5c0e\u5165\n\n\n\n10\u5206\u4f4d\u5f85\u3064\u3068\u5c0e\u5165\u304c\u7d42\u308f\u308a\u307e\u3059\uff0e\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u306bIP\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3059\u308b\u3068\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u7ba1\u7406\u8005ID/PASSWORD\u3092\u8a2d\u5b9a\u3057\u307e\u3059\uff0e\n\n\n\u3053\u308c\u3067\u3068\u308a\u3042\u3048\u305a\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3068\u601d\u3044\u307e\u3059\uff0e\n\n\n\u3053\u306e\u5f8cSensorlogger\u3092\u5c0e\u5165\u3057\u307e\u3059\uff0e\n\u7ba1\u7406\u8005\u6a29\u9650\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3067Nextcloud\u306e\u53f3\u4e0a\u306e\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c\u30a2\u30d7\u30ea\u300d\u3092\u958b\u304d\u307e\u3059\uff0e\n\n\n\n\n\n\u6b21\u306b\u4e0a\u306e\u691c\u7d22\u30d0\u30fc\u306b\u300cSensorlogger\u300d\u3068\u304b\u306e\u6587\u5b57\u5217\u3067\u691c\u7d22\u3057\u3066\u300c\u6709\u52b9\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u5c0e\u5165\u3057\u307e\u3059\uff0e\n\n\n\n\n\n\n\n\n\nTip\n\n\nNextcloud\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u5c0e\u5165\u3059\u308b\u3053\u3068\u3082\u51fa\u6765\u307e\u3059\uff0e\n$ sudo -u www-data occ app:install sensorlogger #\u901a\u5e38\u5c0e\u5165\u3057\u305f\u5834\u5408\n$ sudo /snap/bin/nextcloud.occ app:install sensorlogger #snap\u3067\u5c0e\u5165\u3057\u305f\u5834\u5408\n\n\n\n\n\n\u3053\u3053\u304b\u3089\u306f\u4e00\u822c\u30e6\u30fc\u30b6\u3067OK\u3067\u3059\uff0e\n\n\nNextcloud\u306e\u4e0a\u90e8\u304b\u3089\u300cSensorlogger\u300d\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068Sensorlogger\u306e\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff0e\n\n\n\n\n\n\u306f\u3058\u3081\u306f\u30c7\u30fc\u30bf\u304c\u306a\u3044\u306e\u3067\u307e\u3063\u3055\u3089\u3067\u3059\uff0e\u300cDevice\u300d\u8fba\u308a\u3067\u30c7\u30d0\u30a4\u30b9\u306e\u767b\u9332\u3092\u3059\u308b\u306e\u304b\u306a?\u3068\u601d\u3044\u307e\u3057\u305f\u304c\u51fa\u6765\u307e\u305b\u3093\uff0e\n\u300cRead SensorLogger Wiki Devices\u300d\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u3067Wiki\u3092\u53c2\u7167\u3057\u3066\u307f\u307e\u3059\uff0e\n\n\n\nhttps://github.com/alexstocker/sensorlogger/wiki/Users#devices\nAPI \u00b7 alexstocker/sensorlogger Wiki\n\n\n\n\u30c7\u30fc\u30bf\u3092\u9001\u308b\u3068\u81ea\u52d5\u7684\u306b\u30c7\u30d0\u30a4\u30b9\u304c\u51fa\u6765\u308b\u3088\u3046\u3067\u3059\uff0eSimple, Complex\u306e2\u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u30bf\u30a4\u30d7\u304c\u3042\u308b\u3088\u3046\u3067\u3059\uff0eSimple\u306f\u6e29\u5ea6\uff0c\u6e7f\u5ea6\u306e\u3088\u3046\u3067\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3092\u8a66\u3057\u3066\u307f\u307e\u3059\uff0e\n\n\n\u4ee5\u4e0b\u306e\u8fba\u308a\u304b\u3089 post.php \u3092\u6301\u3063\u3066\u304d\u3066\u4f7f\u3044\u307e\u3059\uff0e\u3053\u306escript\u306f\u30c0\u30df\u30fc\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u6e29\u5ea6\u3068\u6e7f\u5ea6\u30c7\u30fc\u30bf\u3092\u4f5c\u3063\u3066Sensourlogger\u306b\u30c7\u30fc\u30bf\u3092\u6295\u3052\u307e\u3059\uff0e\n\n\n\n$NEXTCLOUDPATH/apps/sensorlogger/tests/curl/post.php \u901a\u5e38\u5c0e\u5165\u3057\u305f\u5834\u5408\n/snap/nextcloud/current/htdocs/apps/sensorlogger/tests/curl/post.php snap\u3067\u5c0e\u5165\u3057\u305f\u5834\u5408\nsensorlogger/post.php at master \u00b7 alexstocker/sensorlogger GitHub\n\n\n\n\u4f55\u7b87\u6240\u304b\u66f8\u304d\u63db\u3048\u307e\u3059\uff0e\n* $url = ` \u3092\u81ea\u5206\u306eNextcloud\u306eURL\u306b\u5909\u66f4\u3057\u307e\u3059\uff0e\n* `$array = array(\"deviceId\" \u21d2 \u3092 uuidgen \u30b3\u30de\u30f3\u30c9\u306a\u3069\u3067\u751f\u6210\u3057\u305fUUID\u306b\u5909\u66f4\u3057\u307e\u3059\uff0e\n* $username = \u3092Nextcloud\u306e\u81ea\u5206\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u5909\u66f4\u3057\u307e\u3059\uff0e\n* $token = \u306b\u300c\u8a2d\u5b9a\u300d\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u300d\u30da\u30fc\u30b8\u306e\u300c\u30c7\u30d0\u30a4\u30b9\u3068\u30bb\u30c3\u30b7\u30e7\u30f3\u300d\u306e\u4e00\u756a\u4e0b\u306e\u300c\u65b0\u3057\u3044\u30a2\u30d7\u30ea\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u6210\u300d\u3067\u4f5c\u6210\u3057\u305f\u30c8\u30fc\u30af\u30f3\u306b\u4fee\u6b63\u3057\u307e\u3059\uff0e\n\n\n\u305d\u3057\u3066php\u3068php-curl\u304c\u5fc5\u8981\u306a\u306e\u3067\u5c0e\u5165\u3057\u307e\u3059\uff0e\n\n\nDebian sid amd64/Ubuntu 20.04 LTS/Raspberry Pi OS armhf\u3067\u306e\u4f8b\n\n$ sudo apt install php-cli php-curl\n\n\n\n\u3053\u306e\u72b6\u614b\u3067 post.php \u3092\u5b9f\u884c\u3057\u3066\u6210\u529f\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u5e30\u3063\u3066\u304d\u307e\u3059\uff0e\n\n\n\n$ php ./post.php\n{\"success\":true,\"message\":\"Sensor Log successfully stored\",\"data\":null}\n\n\n\nSensorlogger\u306e\u30da\u30fc\u30b8\u306e List \u3092\u898b\u308b\u3068\u30a8\u30fc\u30bf\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u89e3\u308a\u307e\u3059 :)\n\n\n\u624b\u52d5\u3067\u5b9f\u884c\u3059\u308b\u306e\u306f\u5927\u5909\u306a\u306e\u3067crontab\u306b\u3053\u3093\u306a\u611f\u3058\u3067\u767b\u9332\u3057\u3066\u307f\u307e\u3059\uff0e5\u5206\u306b\u4e00\u56de\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3057\u307e\u3059\uff0e\n\n\n\n$ crontab -e (1)\n$ crontab -l | grep post.php (2)\n*/5 * * * * php ~/tmp/post.php 2&>1 > ~/tmp/post.php.log\n\n\n\n\ncrontab\u306e\u7de8\u96c6\ncrontab\u306b\u767b\u9332\u3055\u308c\u305f\u304b\u78ba\u8a8d\n\n\n\n\u540c\u69d8\u306bRaspberry Pi\u306e\u6e29\u5ea6\u3082\u9001\u3063\u3066\u307f\u307e\u3059\uff0e\u6e29\u5ea6\u306e $temperature \u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u66f8\u304d\u63db\u3048\u3066\uff0cUUID\u3082\u66f8\u304d\u63db\u3048\u308b\u3068OK\uff0e\u3053\u308c\u3082crontab\u306b\u767b\u9332\u3057\u307e\u3059\uff0e\n\n\n\n $temperature = system( '/opt/vc/bin/vcgencmd measure_temp | awk -F \"[=\\']\" \\'{print $2 }\\' | tr -d \\'\\n\\'' );\n\n\n\n\u3057\u3070\u3089\u304f\u52d5\u304b\u3057\u3066\u304b\u3089\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u306e\u30c1\u30e3\u30fc\u30c8\u304c\u8868\u793a\u3067\u304d\u307e\u3057\u305f\uff0e\n\n\n\n\n\n\u5bc6\u96c6\u3057\u3066\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u90e8\u5206\u306f\u30de\u30a6\u30b9\u30c9\u30e9\u30c3\u30b0\u3067\u77e9\u5f62\u9078\u629e\u3059\u308b\u3068\u305d\u306e\u90e8\u5206\u304c\u30ba\u30fc\u30e0\u3055\u308c\u307e\u3059\uff0e\n\n\n\n\n\n\u3068\u3044\u3046\u611f\u3058\u3067\u3068\u308a\u3042\u3048\u305a\u52d5\u304d\u307e\u3057\u305f\uff0e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u672a\u3060\u5145\u5b9f\u3057\u3066\u3044\u306a\u8cb7\u3063\u305f\u308a\u4f7f\u3044\u52dd\u624b\u3082\u60aa\u3044\u3067\u3059\u304c\u6700\u4f4e\u9650\u306e\u6a5f\u80fd\u306f\u3042\u308b\u304b\u306a\u3068\u3044\u3046\u611f\u3058\u3067\u3059\uff0e\n\u8208\u5473\u304c\u3042\u3063\u305f\u3089\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e\n\u82e5\u3057\u304f\u306f\u304a\u3059\u3059\u3081\u306e\u30a2\u30d7\u30ea\u3084\u30b5\u30fc\u30d3\u30b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\uff0e", "date_published": "2020-12-20T00:00:17+09:00", "date_modified": "2020-12-19T23:49:12+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "nextcloud", "snap", "Buster", "Debian", "Focal Fossa(20.04)", "Linux", "Raspberry Pi OS", "sid", "Ubuntu" ] }, { "id": "http://matoken.org/blog/?p=2881", "url": "https://matoken.org/blog/2020/12/07/do-your-best-to-control-the-temperature-of-raspberry-pi-with-softwar/", "title": "Raspberry Pi \u306e\u6e29\u5ea6\u7ba1\u7406\u3092\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u9811\u5f35\u308b", "content_html": "
\n
\n
\n

\u3053\u306e\u8a18\u4e8b\u306f\u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 Advent Calendar 2020 \u306e12/07\u5206\u306e\u8a18\u4e8b\u3067\u3059\uff0e

\n
\n
\n

\u5185\u5bb9\u306f \u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 \u7b2c96\u56de\u52c9\u5f37\u4f1a \u3067\u767a\u8868\u3057\u305f\u5185\u5bb9\u3092\u52a0\u7b46\u4fee\u6b63\u3057\u305f\u3082\u306e\u3067\u3059\uff0e

\n
\n
\n
\n
\n

\u306f\u3058\u3081\u306b

\n
\n
\n

Raspberry Pi \u3068\u3044\u3046\u82f1\u56fd\u767a\u306e\u6559\u80b2\u5411\u3051\u3068\u3057\u30662012\u5e74\u306b\u767a\u58f2\u3055\u308c\u305f\u5b89\u4fa1\u306a\u30b7\u30f3\u30b0\u30eb\u30dc\u30fc\u30c9\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u304c\u3042\u308a\u307e\u3059\uff0e\u6559\u80b2\u5411\u3051\u3068\u3057\u3066\u767a\u58f2\u3055\u308c\u307e\u3057\u305f\u304c\u8da3\u5473\u306b\u3082\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\uff0eOS\u306f\u6a19\u6e96\u3067\u306fLinux(Debian\u30d9\u30fc\u30b9\u306eRaspberry Pi OS)\u304c\u63a1\u7528\u3055\u308c\u3066\u3044\u307e\u3059\uff0e

\n
\n\n
\n

\u79c1\u306f\u3082\u3063\u3071\u3089\u7701\u96fb\u529b\u306eLinux\u30de\u30b7\u30f3\u3068\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u591a\u3044\u3067\u3059\uff0e

\n
\n
\n
\n
\n

\u30c8\u30e9\u30d6\u30eb

\n
\n
\n

\u4eca\u590f\u7a7a\u8abf\u306e\u306a\u3044\u90e8\u5c4b\u306e\u81ea\u5b85\u30b5\u30fc\u30d0\u306e\u6a2a\u3067Raspberry Pi 3 model B + Raspberry Pi OS arm64(\u03b2)\u3067\u8a08\u7b97\u3092\u3055\u305b\u3066\u3044\u305f\u306e\u3067\u3059\u304c\uff0c\u3057\u3070\u3089\u304f\u52d5\u304b\u3057\u3066\u3044\u308b\u3068\u56fa\u307e\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e

\n
\n\n
\n

\u518d\u8d77\u52d5\u3059\u308c\u3070\u3057\u3070\u3089\u304f\u52d5\u304d\u307e\u3059\u304c\u3057\u3070\u3089\u304f\u3059\u308b\u3068\u3084\u306f\u308a\u56fa\u307e\u308a\u307e\u3059\uff0e\u3053\u308c\u3092\u3069\u3046\u306b\u304b\u51fa\u6765\u306a\u3044\u304b\u3068\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
\n

\u30ed\u30b0\u306e\u53d6\u5f97

\n
\n
\n

\u307e\u305a\u306f\u30ed\u30b0\u3092\u9332\u3063\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n
crontab\u30671\u5206\u6bce\u306b\u60c5\u5831\u3092\u8a18\u9332
\n
\n
* * * * *       printf \"`date +\\%s`,`cat /sys/class/thermal/thermal_zone0/temp`,`echo \"obase=2; ibase=16; \\`vcgencmd get_throttled | cut -f2 -dx\\`\" | bc`,`vcgencmd measure_clock arm|cut -f2 -d=`\\n\" >> ~/.temp.log
\n
\n
\n
\n

\u5185\u5bb9\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\uff0e(\u5916\u6c17\u6e29\u5ea6\u3082\u9332\u308c\u3070\u3088\u304b\u3063\u305f)

\n
\n
\n
\n
UNIX Time
\n
date +%s
\n
SoC\u6e29\u5ea6
\n
/sys/class/thermal/thermal_zone0/temp
\n
\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u5468\u308a\u306e\u30d5\u30e9\u30b0
\n
vcgencmd get_throttled
\n
arm\u5468\u6ce2\u6570
\n
vcgencmd measure_clock arm
\n
\n
\n
\n

\u30ed\u30b0\u304c\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304b\u308c\u308b\u9593\u306b\u30d5\u30ea\u30fc\u30ba\u3057\u3066\u30c7\u30fc\u30bf\u304c\u5931\u308f\u308c\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u306b /etc/fstab \u306e\u30de\u30a6\u30f3\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u306b sync \u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u4ed8\u3051\u3066\u304a\u304d\u307e\u3059\uff0e(\u518d\u8d77\u52d5\u304bremount\u3067\u53cd\u6620)

\n
\n
\n

\u30ed\u30b0\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u307e\u3059\uff0e\u4eca\u56de\u306f /dev/urandom \u3092cat\u3059\u308b\u3053\u3068\u3067\u8a08\u7b97\u3055\u305b\u307e\u3057\u305f\uff0e\u4eca\u56de\u306eRaspberry Pi 3 model B\u306f4core\u3042\u308b\u306e\u30674\u3064\u52d5\u304b\u3057\u3066\u3044\u307e\u3059\uff0e

\n
\n
\n
\u4eca\u56de\u306e\u30c6\u30b9\u30c8\u3067\u4f7f\u3063\u305f\u8ca0\u8377(\u3044\u3064\u3082\u306fvanity address/vtt\u3068\u304b\u3068\u304b)
\n
\n
$ cat /dev/urandom > /dev/null &\n$ cat /dev/urandom > /dev/null &\n$ cat /dev/urandom > /dev/null &\n$ cat /dev/urandom > /dev/null &
\n
\n
\n
\n
\n
\n

\u71b1\u304c\u539f\u56e0?

\n
\n
\n

\u3057\u3070\u3089\u304f\u52d5\u304b\u3057\u3066Raspberry Pi\u304c\u56fa\u307e\u3063\u305f\u5f8c\u306b\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\uff0e
\nSoC\u306e\u6e29\u5ea6\u304c85\u5ea6\u3092\u4f55\u5ea6\u304b\u8a18\u9332\u3057\u305f\u5f8c\u306b\u56fa\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e
\n85\u5ea6\u3068\u3044\u3046\u306e\u306fRaspberry Pi OS\u3067\u306e\u6a19\u6e96\u306eSoC\u5236\u9650\u6e29\u5ea6\u306e\u3088\u3046\u3067\u3059\uff0e\u3053\u306e\u6e29\u5ea6\u306e5\u5ea6\u524d(\u6a19\u6e96\u3067\u306f80\u5ea6)\u304b\u3089\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u59cb\u307e\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u30af\u30ed\u30c3\u30af\u304c\u4e0b\u304c\u3063\u3066\u6e29\u5ea6\u304c\u4e0b\u304c\u308c\u3070\u554f\u984c\u7121\u3055\u305d\u3046\u3060\u3051\u306980\u5ea6\u304b\u3089\u30af\u30ed\u30c3\u30af\u304c\u4e0b\u304c\u3063\u3066\u308285\u5ea6\u3092\u8d85\u3048\u3066\u56fa\u307e\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e
\n\u30d9\u30fc\u30bf\u7248\u306eRaspberry Pi OS amd64\u3092\u4f7f\u3063\u3066\u3044\u308b\u305b\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3068\u601d\u3044\uff0c\u6a19\u6e96\u306eRaspberry Pi OS armhf(32bit)\u7248\u306b\u5909\u66f4\u3057\u3066\u540c\u69d8\u306b\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u540c\u69d8\u306e\u52d5\u304d\u306e\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u6b63\u653b\u6cd5\u3068\u3057\u3066\u306f\u30d2\u30fc\u30c8\u30b7\u30f3\u30af\uff0c\u30d5\u30a1\u30f3\u306e\u5897\u8a2d\u3084\u7a7a\u8abf\u3092\u5165\u308c\u308b\u3068\u3088\u3055\u305d\u3046\u3067\u3059\u304c\uff0c\u91d1\u6b20\u306a\u306e\u3067\u3068\u308a\u3042\u3048\u305a\u30bd\u30d5\u30c8\u3060\u3051\u3067\u3069\u3046\u306b\u304b\u51fa\u6765\u306a\u3044\u304b\u3068\u8a66\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
\n

SoC\u5236\u9650\u6e29\u5ea6\u3092\u4e0b\u3052\u308b

\n
\n
\n

\u307e\u305aSoC\u306e\u5236\u9650\u6e29\u5ea6\u3067\u3059\u304c\uff0c\u516c\u5f0f\u30d5\u30a9\u30fc\u30e9\u30e0\u306770\u5ea6\u4ee5\u4e0b\u306b\u3057\u305f\u307b\u3046\u304c\u3044\u3044\u3068\u3044\u3046\u66f8\u304d\u8fbc\u307f\u3092\u898b\u304b\u3051\u307e\u3057\u305f\uff0e\u9006\u306b100\u5ea6\u3067\u3082\u5927\u4e08\u592b\u3068\u3044\u3046\u4eba\u3082\u5c45\u308b\u306e\u3067\u3059\u304c\u5b89\u5168\u5074\u306e70\u5ea6\u306b\u3057\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n

\u3053\u306e\u8a2d\u5b9a\u306f /boot/config.txt \u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f70\u5ea6\u306b\u8a2d\u5b9a\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u3053\u306e\u72b6\u614b\u3067\u518d\u8d77\u52d5\u3059\u308b\u3068\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
temp_limit=70
\n
\n
\n
\n

\u518d\u8d77\u52d5\u5f8c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u304c\u51fa\u6765\u307e\u3059\uff0e

\n
\n
\n
\n
$ vcgencmd get_config int | grep ^temp_limit=\ntemp_limit=70
\n
\n
\n
\n

\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u306870\u5ea6\u3092\u8d8a\u3048\u308b\u304f\u3089\u3044\u3067\u56fa\u307e\u308a\u307e\u3057\u305f\uff0e\u3084\u306f\u308a\u5236\u9650\u6e29\u5ea6\u3092\u8d8a\u3048\u308b\u3068\u56fa\u307e\u3063\u3066\u3044\u821e\u3046\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n
\n
\n

SoC\u306e\u6700\u5927\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u308b

\n
\n
\n

Raspberry Pi 3 model B \u306eSoC\u306f\u6700\u5927\u5468\u6ce2\u65701.2GHz\u3067\u3059\uff0e\u3053\u308c\u3092\u4e0b\u3052\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n

/boot/config.txt \u306e arm_freq= \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f800MHz\u306b\u8a2d\u5b9a\u3057\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u518d\u8d77\u52d5\u3067\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
arm_freq=800
\n
\n
\n
\n

\u518d\u8d77\u52d5\u5f8c\u306b\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\uff0e

\n
\n
\n
\n
$ vcgencmd get_config int | grep ^arm_freq=\narm_freq=800
\n
\n
\n
\n

\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u3068\u3084\u306f\u308a\u56fa\u307e\u308a\u307e\u3059\uff0e\u307e\u3042\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u52b9\u3044\u3066\u3082\u56fa\u307e\u308b\u306e\u3067\u4ed5\u65b9\u304c\u306a\u3044\u611f\u3058\u3067\u3059\uff0e

\n
\n
\n
\n
\n

SoC\u306e\u6700\u5c0f\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u308b(\u3053\u308c\u304c\u52b9\u304f\u306e\u3067\u306f?)

\n
\n
\n

\u6b21\u306bSoC\u6700\u5c0f\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u307e\u3059\uff0e\u65e2\u5b9a\u5024\u306f600MHz\u3067\uff0c\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u3082\u3053\u3053\u307e\u3067\u4e0b\u304c\u3063\u3066\u3044\u308b\u306e\u3067\u3053\u308c\u3092\u66f4\u306b\u4e0b\u3052\u308b\u3068\u6e29\u5ea6\u304c\u4e0b\u304c\u308a\u305d\u3046\u306a\u6c17\u304c\u3057\u307e\u3059\uff0e

\n
\n
\n

/boot/config.txt \u306e arm_freq_min= \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f400MHz\u306b\u8a2d\u5b9a\u3057\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u518d\u8d77\u52d5\u3067\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
arm_freq_min=400
\n
\n
\n
\n

\u3057\u304b\u3057\u518d\u8d77\u52d5\u5f8c\u306b\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068600MHz\u3088\u308a\u4e0b\u306b\u306f\u8a2d\u5b9a\u3067\u304d\u306a\u3044\u307f\u305f\u3044\u3067600MHz\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\uff0e

\n
\n
\n
\n
$ vcgencmd get_config int | grep ^arm_freq_min=\narm_freq_min=600
\n
\n
\n
\n

\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u3068\u3084\u306f\u308a600Mhz\u307e\u3067\u3057\u304b\u4e0b\u304c\u3089\u305a\u56fa\u307e\u308a\u307e\u3059\uff0e

\n
\n
\n

\u6b8b\u5ff5\u306a\u304c\u3089Raspberry Pi \u306e\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u306f\u7121\u7406\u305d\u3046\u3067\u3059\uff0e

\n
\n
\n
\n
\n

maxcpus\u3067\u30b3\u30a2\u3092\u5236\u9650\u3057\u3066\u307f\u308b

\n
\n
\n

Linux\u306e\u30d6\u30fc\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u3067 maxcpus \u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u30b3\u30a2\u3092\u5236\u9650\u3067\u304d\u307e\u3059\uff0eRaspberry Pi \u306e\u5834\u5408\u306f /boot/cmdline.txt \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e

\n
\n
\n

\u8a2d\u5b9a\u5f8c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e

\n
\n
\n
\n
$ grep -o -E 'maxcpus=.{0,9} ' /proc/cmdline\nmaxcpus=1\n$ grep ^processor /proc/cpuinfo | wc -l\n1
\n
\n
\n
\n

\u3053\u308c\u3067CPU core1\u6d25\u3067\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\uff0e\u3057\u304b\u3057\u6700\u5927\u5468\u6ce2\u6570\u3092600MHz\u304b\u30641core\u3067\u3082\u540c\u69d8\u306b\u30d5\u30ea\u30fc\u30ba\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
\n

cpufreq\u3067\u30af\u30ed\u30c3\u30af\u5236\u5fa1

\n
\n
\n

IntelCPU\u306eNotePC\u306a\u3069\u3067\u306fcoufreq\u3092\u4f7f\u3063\u3066\u3053\u306e\u3042\u305f\u308a\u306e\u5236\u5fa1\u3092\u3059\u308b\u306e\u3067\u3059\u304c\uff0c\u3053\u308c\u3067\u3082600mHz\u3088\u308a\u4e0b\u306b\u306f\u4e0b\u3052\u3089\u308c\u306a\u3044\u3088\u3046\u3067\u99c4\u76ee\u3067\u3057\u305f\uff0e

\n
\n
\n
\n
\n

LimitCPU\u3067\u6307\u5b9a\u30d7\u30ed\u30bb\u30b9\u306e\u5236\u9650\u3092\u884c\u3046

\n
\n
\n

LimitCPU\u306f\u6307\u5b9a\u30d7\u30ed\u30bb\u30b9\u3092\u76e3\u8996\u3057\uff0cCPU\u5229\u7528\u7387\u3084%\u3067\u5236\u9650\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\uff0eLinux, MacOS, *BSD\u306a\u3069\u306eUNIX-Likesystem\u3067\u5229\u7528\u3067\u304d\u307e\u3059\uff0e
\nRaspberry Pi OS\u3067\u306fcpulimit\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u3055\u308c\u3066\u304a\u308a\uff0c\u30b3\u30de\u30f3\u30c9\u3082coulimit\u3067\u3059\uff0e

\n
\n
\n
cpulimit\u306e\u5c0e\u5165
\n
\n
$ sudo apt install cpulimit
\n
\n
\n
\n

cpulimit\u30b3\u30de\u30f3\u30c9\u306b\u5236\u9650\u3057\u305f\u3044\u30d7\u30ed\u30bb\u30b9ID\u3084\u30d7\u30ed\u30bb\u30b9\u540d\u3068\u5236\u9650\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u52d5\u4f5c\u3057\u307e\u3059\uff0e

\n
\n
\n
cat \u304b\u3089\u306f\u3058\u307e\u308b\u30d7\u30ed\u30bb\u30b9\u309250%\u306b\u5236\u9650
\n
\n
$ pgrep ^cat | xargs -n1 -I{} sh -c \"cpulimit -p {} -l 50 -v &\"
\n
\n
\n
\n

cpulimit\u306750%\u306b\u5236\u9650\u3057\u3066\u307f\u305ft\u9803\u6e29\u5ea6\u304c\u4e0b\u304c\u308b\u306e\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\uff0e\u6570\u65e5\u52d5\u304b\u3057\u3066\u3082\u56fa\u307e\u3089\u306a\u304f\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e
\n\u5b9a\u671f\u7684\u306bSoC\u306e\u6e29\u5ea6\u3092\u78ba\u8a8d\u3057\u3066\u5236\u9650\u3092\u5909\u66f4\u3057\u3066\u3044\u304f\u3068\u826f\u3055\u305d\u3046\u3067\u3046s\uff0e

\n
\n\n
\n
\n
\n

LimitCPU\u306fCPUlimit\u306e\u958b\u767a\u304c\u6b62\u307e\u3063\u305f\u5f8c\u306e\u30d5\u30a9\u30fc\u30af\u3067\u3059\u304c\uff0c\u305d\u306e\u5f8cCPUlimit\u304c\u65b0\u3057\u304f\u958b\u767a\u304c\u59cb\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\u8a73\u7d30\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff0e

\n
\n
\n\n
\n
\n
\n
\n
\n
\n

cgroup\u3067CPU\u30ea\u30bd\u30fc\u30b9\u5236\u9650(\u672a\u78ba\u8a8d)

\n
\n
\n

LimitCPU\u304c\u52b9\u3044\u305f\u306e\u3067\u6050\u3089\u304fcgroup\u3067\u306eCPU\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u3067\u3082\u5927\u4e08\u592b\u305d\u3046\u3067\u3059\uff0e(\u672a\u78ba\u8a8d)

\n
\n
\n
\n
\n

\u304a\u308f\u308a\u306b

\n
\n
\n

\u73fe\u5728\u306f\u6c17\u6e29\u3082\u4e0b\u304c\u308a\u5236\u9650\u306a\u3069\u3057\u306a\u304f\u3066\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\uff0e\u3067\u3082\u304d\u3063\u3068\u6765\u590f\u306b\u307e\u305f\u8d77\u3053\u308b\u3068\u601d\u3046\u306e\u3067\u305d\u3053\u3067\u307e\u305f\u78ba\u8a8d\u3059\u308b\u3064\u3082\u308a\u3067\u3059\uff0e

\n
\n
\n

\u3057\u304b\u3057\uff0c\u4eca\u56de\u306e\u89e3\u6c7a\u65b9\u6cd5\u306fCPU\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u9650\u3057\u3066\u6e29\u5ea6\u3092\u4e0b\u3052\u3066\u5c45\u308b\u306e\u3067\u8a08\u7b97\u91cf\u306f\u6e1b\u3063\u3066\u3044\u307e\u3059\uff0e\u7a7a\u8abf\u3092\u5165\u308c\u305f\u308aCPU\u30d5\u30a1\u30f3\u3092\u5c0e\u5165\u3059\u308b\u306e\u304c\u6b63\u653b\u6cd5\u306b\u306a\u308b\u306e\u304b\u306a\u3068\u601d\u3044\u307e\u3059\uff0e
\nCPU\u30d5\u30a1\u30f3\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u304b\u3089\u5404\u7a2e\u767a\u58f2\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u305d\u308c\u3089\u3092\u4f7f\u3046\u304bDIY\u3059\u308b\u611f\u3058\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\uff0e

\n
\n
\n

\u305d\u3046\u3044\u3048\u3070\u6700\u8fd1Raspberry Pi OS\u306e\u8a2d\u5b9a\u30b3\u30de\u30f3\u30c9\u306e raspi-config \u306e\u4e2d\u306b Set behaviour of GPIO fan \u3068\u3044\u3046\u30e1\u30cb\u30e5\u30fc\u304c\u51fa\u6765\u305f\u308a\uff0cRaspberry Pi 4\u306b\u306f\u516c\u5f0f\u306eCPU\u30d5\u30a1\u30f3\u304c\u767a\u58f2\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3053\u308c\u3089\u3092\u4f7f\u3046\u306e\u304c\u826f\u3055\u305d\u3046\u3067\u3059\uff0e

\n
\n\n
\n
\n

\n", "content_text": "\u3053\u306e\u8a18\u4e8b\u306f\u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 Advent Calendar 2020 \u306e12/07\u5206\u306e\u8a18\u4e8b\u3067\u3059\uff0e\n\n\n\u5185\u5bb9\u306f \u65e5\u672cAndroid\u306e\u4f1a\u79cb\u8449\u539f\u652f\u90e8\u30ed\u30dc\u30c3\u30c8\u90e8 \u7b2c96\u56de\u52c9\u5f37\u4f1a \u3067\u767a\u8868\u3057\u305f\u5185\u5bb9\u3092\u52a0\u7b46\u4fee\u6b63\u3057\u305f\u3082\u306e\u3067\u3059\uff0e\n\n\n\n\n\u306f\u3058\u3081\u306b\n\n\nRaspberry Pi \u3068\u3044\u3046\u82f1\u56fd\u767a\u306e\u6559\u80b2\u5411\u3051\u3068\u3057\u30662012\u5e74\u306b\u767a\u58f2\u3055\u308c\u305f\u5b89\u4fa1\u306a\u30b7\u30f3\u30b0\u30eb\u30dc\u30fc\u30c9\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u304c\u3042\u308a\u307e\u3059\uff0e\u6559\u80b2\u5411\u3051\u3068\u3057\u3066\u767a\u58f2\u3055\u308c\u307e\u3057\u305f\u304c\u8da3\u5473\u306b\u3082\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\uff0eOS\u306f\u6a19\u6e96\u3067\u306fLinux(Debian\u30d9\u30fc\u30b9\u306eRaspberry Pi OS)\u304c\u63a1\u7528\u3055\u308c\u3066\u3044\u307e\u3059\uff0e\n\n\n\nTeach, Learn, and Make with Raspberry Pi\n\n\n\n\u79c1\u306f\u3082\u3063\u3071\u3089\u7701\u96fb\u529b\u306eLinux\u30de\u30b7\u30f3\u3068\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u591a\u3044\u3067\u3059\uff0e\n\n\n\n\n\u30c8\u30e9\u30d6\u30eb\n\n\n\u4eca\u590f\u7a7a\u8abf\u306e\u306a\u3044\u90e8\u5c4b\u306e\u81ea\u5b85\u30b5\u30fc\u30d0\u306e\u6a2a\u3067Raspberry Pi 3 model B + Raspberry Pi OS arm64(\u03b2)\u3067\u8a08\u7b97\u3092\u3055\u305b\u3066\u3044\u305f\u306e\u3067\u3059\u304c\uff0c\u3057\u3070\u3089\u304f\u52d5\u304b\u3057\u3066\u3044\u308b\u3068\u56fa\u307e\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e\n\n\n\nBuy a Raspberry Pi 3 Model B \u2013 Raspberry Pi\n\n\n\n\u518d\u8d77\u52d5\u3059\u308c\u3070\u3057\u3070\u3089\u304f\u52d5\u304d\u307e\u3059\u304c\u3057\u3070\u3089\u304f\u3059\u308b\u3068\u3084\u306f\u308a\u56fa\u307e\u308a\u307e\u3059\uff0e\u3053\u308c\u3092\u3069\u3046\u306b\u304b\u51fa\u6765\u306a\u3044\u304b\u3068\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\n\n\u30ed\u30b0\u306e\u53d6\u5f97\n\n\n\u307e\u305a\u306f\u30ed\u30b0\u3092\u9332\u3063\u3066\u307f\u307e\u3059\uff0e\n\n\ncrontab\u30671\u5206\u6bce\u306b\u60c5\u5831\u3092\u8a18\u9332\n\n* * * * * printf \"`date +\\%s`,`cat /sys/class/thermal/thermal_zone0/temp`,`echo \"obase=2; ibase=16; \\`vcgencmd get_throttled | cut -f2 -dx\\`\" | bc`,`vcgencmd measure_clock arm|cut -f2 -d=`\\n\" >> ~/.temp.log\n\n\n\n\u5185\u5bb9\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\uff0e(\u5916\u6c17\u6e29\u5ea6\u3082\u9332\u308c\u3070\u3088\u304b\u3063\u305f)\n\n\n\nUNIX Time\ndate +%s\nSoC\u6e29\u5ea6\n/sys/class/thermal/thermal_zone0/temp\n\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u5468\u308a\u306e\u30d5\u30e9\u30b0\nvcgencmd get_throttled\narm\u5468\u6ce2\u6570\nvcgencmd measure_clock arm\n\n\n\n\u30ed\u30b0\u304c\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304b\u308c\u308b\u9593\u306b\u30d5\u30ea\u30fc\u30ba\u3057\u3066\u30c7\u30fc\u30bf\u304c\u5931\u308f\u308c\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u306b /etc/fstab \u306e\u30de\u30a6\u30f3\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u306b sync \u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u4ed8\u3051\u3066\u304a\u304d\u307e\u3059\uff0e(\u518d\u8d77\u52d5\u304bremount\u3067\u53cd\u6620)\n\n\n\u30ed\u30b0\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u307e\u3059\uff0e\u4eca\u56de\u306f /dev/urandom \u3092cat\u3059\u308b\u3053\u3068\u3067\u8a08\u7b97\u3055\u305b\u307e\u3057\u305f\uff0e\u4eca\u56de\u306eRaspberry Pi 3 model B\u306f4core\u3042\u308b\u306e\u30674\u3064\u52d5\u304b\u3057\u3066\u3044\u307e\u3059\uff0e\n\n\n\u4eca\u56de\u306e\u30c6\u30b9\u30c8\u3067\u4f7f\u3063\u305f\u8ca0\u8377(\u3044\u3064\u3082\u306fvanity address/vtt\u3068\u304b\u3068\u304b)\n\n$ cat /dev/urandom > /dev/null &\n$ cat /dev/urandom > /dev/null &\n$ cat /dev/urandom > /dev/null &\n$ cat /dev/urandom > /dev/null &\n\n\n\n\n\n\u71b1\u304c\u539f\u56e0?\n\n\n\u3057\u3070\u3089\u304f\u52d5\u304b\u3057\u3066Raspberry Pi\u304c\u56fa\u307e\u3063\u305f\u5f8c\u306b\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\uff0e\nSoC\u306e\u6e29\u5ea6\u304c85\u5ea6\u3092\u4f55\u5ea6\u304b\u8a18\u9332\u3057\u305f\u5f8c\u306b\u56fa\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\n85\u5ea6\u3068\u3044\u3046\u306e\u306fRaspberry Pi OS\u3067\u306e\u6a19\u6e96\u306eSoC\u5236\u9650\u6e29\u5ea6\u306e\u3088\u3046\u3067\u3059\uff0e\u3053\u306e\u6e29\u5ea6\u306e5\u5ea6\u524d(\u6a19\u6e96\u3067\u306f80\u5ea6)\u304b\u3089\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u59cb\u307e\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u30af\u30ed\u30c3\u30af\u304c\u4e0b\u304c\u3063\u3066\u6e29\u5ea6\u304c\u4e0b\u304c\u308c\u3070\u554f\u984c\u7121\u3055\u305d\u3046\u3060\u3051\u306980\u5ea6\u304b\u3089\u30af\u30ed\u30c3\u30af\u304c\u4e0b\u304c\u3063\u3066\u308285\u5ea6\u3092\u8d85\u3048\u3066\u56fa\u307e\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\n\u30d9\u30fc\u30bf\u7248\u306eRaspberry Pi OS amd64\u3092\u4f7f\u3063\u3066\u3044\u308b\u305b\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3068\u601d\u3044\uff0c\u6a19\u6e96\u306eRaspberry Pi OS armhf(32bit)\u7248\u306b\u5909\u66f4\u3057\u3066\u540c\u69d8\u306b\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u540c\u69d8\u306e\u52d5\u304d\u306e\u3088\u3046\u3067\u3059\uff0e\n\n\n\u6b63\u653b\u6cd5\u3068\u3057\u3066\u306f\u30d2\u30fc\u30c8\u30b7\u30f3\u30af\uff0c\u30d5\u30a1\u30f3\u306e\u5897\u8a2d\u3084\u7a7a\u8abf\u3092\u5165\u308c\u308b\u3068\u3088\u3055\u305d\u3046\u3067\u3059\u304c\uff0c\u91d1\u6b20\u306a\u306e\u3067\u3068\u308a\u3042\u3048\u305a\u30bd\u30d5\u30c8\u3060\u3051\u3067\u3069\u3046\u306b\u304b\u51fa\u6765\u306a\u3044\u304b\u3068\u8a66\u3057\u307e\u3057\u305f\uff0e\n\n\n\n\nSoC\u5236\u9650\u6e29\u5ea6\u3092\u4e0b\u3052\u308b\n\n\n\u307e\u305aSoC\u306e\u5236\u9650\u6e29\u5ea6\u3067\u3059\u304c\uff0c\u516c\u5f0f\u30d5\u30a9\u30fc\u30e9\u30e0\u306770\u5ea6\u4ee5\u4e0b\u306b\u3057\u305f\u307b\u3046\u304c\u3044\u3044\u3068\u3044\u3046\u66f8\u304d\u8fbc\u307f\u3092\u898b\u304b\u3051\u307e\u3057\u305f\uff0e\u9006\u306b100\u5ea6\u3067\u3082\u5927\u4e08\u592b\u3068\u3044\u3046\u4eba\u3082\u5c45\u308b\u306e\u3067\u3059\u304c\u5b89\u5168\u5074\u306e70\u5ea6\u306b\u3057\u3066\u307f\u307e\u3059\uff0e\n\n\n\u3053\u306e\u8a2d\u5b9a\u306f /boot/config.txt \u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f70\u5ea6\u306b\u8a2d\u5b9a\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u3053\u306e\u72b6\u614b\u3067\u518d\u8d77\u52d5\u3059\u308b\u3068\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e\n\n\n\ntemp_limit=70\n\n\n\n\u518d\u8d77\u52d5\u5f8c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u304c\u51fa\u6765\u307e\u3059\uff0e\n\n\n\n$ vcgencmd get_config int | grep ^temp_limit=\ntemp_limit=70\n\n\n\n\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u306870\u5ea6\u3092\u8d8a\u3048\u308b\u304f\u3089\u3044\u3067\u56fa\u307e\u308a\u307e\u3057\u305f\uff0e\u3084\u306f\u308a\u5236\u9650\u6e29\u5ea6\u3092\u8d8a\u3048\u308b\u3068\u56fa\u307e\u3063\u3066\u3044\u821e\u3046\u3088\u3046\u3067\u3059\uff0e\n\n\n\n\nSoC\u306e\u6700\u5927\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u308b\n\n\nRaspberry Pi 3 model B \u306eSoC\u306f\u6700\u5927\u5468\u6ce2\u65701.2GHz\u3067\u3059\uff0e\u3053\u308c\u3092\u4e0b\u3052\u3066\u307f\u307e\u3059\uff0e\n\n\n/boot/config.txt \u306e arm_freq= \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f800MHz\u306b\u8a2d\u5b9a\u3057\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u518d\u8d77\u52d5\u3067\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e\n\n\n\narm_freq=800\n\n\n\n\u518d\u8d77\u52d5\u5f8c\u306b\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\uff0e\n\n\n\n$ vcgencmd get_config int | grep ^arm_freq=\narm_freq=800\n\n\n\n\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u3068\u3084\u306f\u308a\u56fa\u307e\u308a\u307e\u3059\uff0e\u307e\u3042\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u52b9\u3044\u3066\u3082\u56fa\u307e\u308b\u306e\u3067\u4ed5\u65b9\u304c\u306a\u3044\u611f\u3058\u3067\u3059\uff0e\n\n\n\n\nSoC\u306e\u6700\u5c0f\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u308b(\u3053\u308c\u304c\u52b9\u304f\u306e\u3067\u306f?)\n\n\n\u6b21\u306bSoC\u6700\u5c0f\u5468\u6ce2\u6570\u3092\u4e0b\u3052\u3066\u307f\u307e\u3059\uff0e\u65e2\u5b9a\u5024\u306f600MHz\u3067\uff0c\u30b5\u30fc\u30de\u30eb\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u3082\u3053\u3053\u307e\u3067\u4e0b\u304c\u3063\u3066\u3044\u308b\u306e\u3067\u3053\u308c\u3092\u66f4\u306b\u4e0b\u3052\u308b\u3068\u6e29\u5ea6\u304c\u4e0b\u304c\u308a\u305d\u3046\u306a\u6c17\u304c\u3057\u307e\u3059\uff0e\n\n\n/boot/config.txt \u306e arm_freq_min= \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306f400MHz\u306b\u8a2d\u5b9a\u3057\u305f\u3068\u304d\u306e\u4f8b\u3067\u3059\uff0e\u518d\u8d77\u52d5\u3067\u53cd\u6620\u3055\u308c\u307e\u3059\uff0e\n\n\n\narm_freq_min=400\n\n\n\n\u3057\u304b\u3057\u518d\u8d77\u52d5\u5f8c\u306b\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068600MHz\u3088\u308a\u4e0b\u306b\u306f\u8a2d\u5b9a\u3067\u304d\u306a\u3044\u307f\u305f\u3044\u3067600MHz\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\uff0e\n\n\n\n$ vcgencmd get_config int | grep ^arm_freq_min=\narm_freq_min=600\n\n\n\n\u3053\u306e\u72b6\u614b\u3067\u8ca0\u8377\u3092\u639b\u3051\u308b\u3068\u3084\u306f\u308a600Mhz\u307e\u3067\u3057\u304b\u4e0b\u304c\u3089\u305a\u56fa\u307e\u308a\u307e\u3059\uff0e\n\n\n\u6b8b\u5ff5\u306a\u304c\u3089Raspberry Pi \u306e\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u3067\u306f\u7121\u7406\u305d\u3046\u3067\u3059\uff0e\n\n\n\n\nmaxcpus\u3067\u30b3\u30a2\u3092\u5236\u9650\u3057\u3066\u307f\u308b\n\n\nLinux\u306e\u30d6\u30fc\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u3067 maxcpus \u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u30b3\u30a2\u3092\u5236\u9650\u3067\u304d\u307e\u3059\uff0eRaspberry Pi \u306e\u5834\u5408\u306f /boot/cmdline.txt \u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff0e\n\n\n\u8a2d\u5b9a\u5f8c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e\n\n\n\n$ grep -o -E 'maxcpus=.{0,9} ' /proc/cmdline\nmaxcpus=1\n$ grep ^processor /proc/cpuinfo | wc -l\n1\n\n\n\n\u3053\u308c\u3067CPU core1\u6d25\u3067\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\uff0e\u3057\u304b\u3057\u6700\u5927\u5468\u6ce2\u6570\u3092600MHz\u304b\u30641core\u3067\u3082\u540c\u69d8\u306b\u30d5\u30ea\u30fc\u30ba\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\uff0e\n\n\n\n\ncpufreq\u3067\u30af\u30ed\u30c3\u30af\u5236\u5fa1\n\n\nIntelCPU\u306eNotePC\u306a\u3069\u3067\u306fcoufreq\u3092\u4f7f\u3063\u3066\u3053\u306e\u3042\u305f\u308a\u306e\u5236\u5fa1\u3092\u3059\u308b\u306e\u3067\u3059\u304c\uff0c\u3053\u308c\u3067\u3082600mHz\u3088\u308a\u4e0b\u306b\u306f\u4e0b\u3052\u3089\u308c\u306a\u3044\u3088\u3046\u3067\u99c4\u76ee\u3067\u3057\u305f\uff0e\n\n\n\n\nLimitCPU\u3067\u6307\u5b9a\u30d7\u30ed\u30bb\u30b9\u306e\u5236\u9650\u3092\u884c\u3046\n\n\nLimitCPU\u306f\u6307\u5b9a\u30d7\u30ed\u30bb\u30b9\u3092\u76e3\u8996\u3057\uff0cCPU\u5229\u7528\u7387\u3084%\u3067\u5236\u9650\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\uff0eLinux, MacOS, *BSD\u306a\u3069\u306eUNIX-Likesystem\u3067\u5229\u7528\u3067\u304d\u307e\u3059\uff0e\nRaspberry Pi OS\u3067\u306fcpulimit\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u3057\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u3055\u308c\u3066\u304a\u308a\uff0c\u30b3\u30de\u30f3\u30c9\u3082coulimit\u3067\u3059\uff0e\n\n\ncpulimit\u306e\u5c0e\u5165\n\n$ sudo apt install cpulimit\n\n\n\ncpulimit\u30b3\u30de\u30f3\u30c9\u306b\u5236\u9650\u3057\u305f\u3044\u30d7\u30ed\u30bb\u30b9ID\u3084\u30d7\u30ed\u30bb\u30b9\u540d\u3068\u5236\u9650\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u52d5\u4f5c\u3057\u307e\u3059\uff0e\n\n\ncat \u304b\u3089\u306f\u3058\u307e\u308b\u30d7\u30ed\u30bb\u30b9\u309250%\u306b\u5236\u9650\n\n$ pgrep ^cat | xargs -n1 -I{} sh -c \"cpulimit -p {} -l 50 -v &\"\n\n\n\ncpulimit\u306750%\u306b\u5236\u9650\u3057\u3066\u307f\u305ft\u9803\u6e29\u5ea6\u304c\u4e0b\u304c\u308b\u306e\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\uff0e\u6570\u65e5\u52d5\u304b\u3057\u3066\u3082\u56fa\u307e\u3089\u306a\u304f\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e\n\u5b9a\u671f\u7684\u306bSoC\u306e\u6e29\u5ea6\u3092\u78ba\u8a8d\u3057\u3066\u5236\u9650\u3092\u5909\u66f4\u3057\u3066\u3044\u304f\u3068\u826f\u3055\u305d\u3046\u3067\u3046s\uff0e\n\n\n\u53c2\u8003URL\n\n\u7279\u5b9a\u30d7\u30ed\u30bb\u30b9\u306ecpu\u5229\u7528\u7387\u3092\u5236\u9650\u3059\u308bcpulimit\u3092\u8a66\u3059 \u2013 matoken\u2019s meme\n\n\n\n\n\nLimitCPU\u306fCPUlimit\u306e\u958b\u767a\u304c\u6b62\u307e\u3063\u305f\u5f8c\u306e\u30d5\u30a9\u30fc\u30af\u3067\u3059\u304c\uff0c\u305d\u306e\u5f8cCPUlimit\u304c\u65b0\u3057\u304f\u958b\u767a\u304c\u59cb\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\u8a73\u7d30\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\n\n\n\nLimitCPU\n\n\n\n\n\n\n\ncgroup\u3067CPU\u30ea\u30bd\u30fc\u30b9\u5236\u9650(\u672a\u78ba\u8a8d)\n\n\nLimitCPU\u304c\u52b9\u3044\u305f\u306e\u3067\u6050\u3089\u304fcgroup\u3067\u306eCPU\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u3067\u3082\u5927\u4e08\u592b\u305d\u3046\u3067\u3059\uff0e(\u672a\u78ba\u8a8d)\n\n\n\n\n\u304a\u308f\u308a\u306b\n\n\n\u73fe\u5728\u306f\u6c17\u6e29\u3082\u4e0b\u304c\u308a\u5236\u9650\u306a\u3069\u3057\u306a\u304f\u3066\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\uff0e\u3067\u3082\u304d\u3063\u3068\u6765\u590f\u306b\u307e\u305f\u8d77\u3053\u308b\u3068\u601d\u3046\u306e\u3067\u305d\u3053\u3067\u307e\u305f\u78ba\u8a8d\u3059\u308b\u3064\u3082\u308a\u3067\u3059\uff0e\n\n\n\u3057\u304b\u3057\uff0c\u4eca\u56de\u306e\u89e3\u6c7a\u65b9\u6cd5\u306fCPU\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u9650\u3057\u3066\u6e29\u5ea6\u3092\u4e0b\u3052\u3066\u5c45\u308b\u306e\u3067\u8a08\u7b97\u91cf\u306f\u6e1b\u3063\u3066\u3044\u307e\u3059\uff0e\u7a7a\u8abf\u3092\u5165\u308c\u305f\u308aCPU\u30d5\u30a1\u30f3\u3092\u5c0e\u5165\u3059\u308b\u306e\u304c\u6b63\u653b\u6cd5\u306b\u306a\u308b\u306e\u304b\u306a\u3068\u601d\u3044\u307e\u3059\uff0e\nCPU\u30d5\u30a1\u30f3\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u304b\u3089\u5404\u7a2e\u767a\u58f2\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u305d\u308c\u3089\u3092\u4f7f\u3046\u304bDIY\u3059\u308b\u611f\u3058\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\uff0e\n\n\n\u305d\u3046\u3044\u3048\u3070\u6700\u8fd1Raspberry Pi OS\u306e\u8a2d\u5b9a\u30b3\u30de\u30f3\u30c9\u306e raspi-config \u306e\u4e2d\u306b Set behaviour of GPIO fan \u3068\u3044\u3046\u30e1\u30cb\u30e5\u30fc\u304c\u51fa\u6765\u305f\u308a\uff0cRaspberry Pi 4\u306b\u306f\u516c\u5f0f\u306eCPU\u30d5\u30a1\u30f3\u304c\u767a\u58f2\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3053\u308c\u3089\u3092\u4f7f\u3046\u306e\u304c\u826f\u3055\u305d\u3046\u3067\u3059\uff0e\n\n\n\nBuy a Raspberry Pi 4 Case Fan \u2013 Raspberry Pi", "date_published": "2020-12-07T00:02:07+09:00", "date_modified": "2020-12-07T00:59:45+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "cpulimit", "limitcpu", "Raspberry Pi 3 B", "Raspberry Pi OS", "RaspberryPi", "Buster", "Linux", "Raspberry Pi" ] }, { "id": "http://matoken.org/blog/?p=2843", "url": "https://matoken.org/blog/2020/07/28/default-python-switching-on-raspberry-pi-os-debian-ubuntu/", "title": "Raspberry Pi OS/Debian/Ubuntu\u3067\u306e\u65e2\u5b9a\u306ePython\u5207\u308a\u66ff\u3048", "content_html": "
\n

\u6700\u8fd1\u4f7f\u3046Python\u30a2\u30d7\u30ea\u306fPython3\u304c\u591a\u304f\u306a\u3063\u3066\u3044\u307e\u3059\uff0ePython2\u306eEoL\u304c\u8feb\u3063\u3066\u3044\u308b\u306e\u3067\u6b63\u3057\u3044\u306e\u3067\u3059\u304c\uff0c\u624b\u5143\u306e\u74b0\u5883\u3067\u306f python \u30b3\u30de\u30f3\u30c9\u306f python2 \u306b\u5411\u3044\u3066\u3044\u307e\u3059\uff0epython3 \u30b3\u30de\u30f3\u30c9\u3092\u53e9\u3051\u3070\u3044\u3044\u306e\u3067\u3059\u304c\uff0c\u3053\u308c\u3092 python3 \u306b\u5411\u3051\u3089\u308c\u306a\u3044\u304b\u306a\u3068\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n

Raspberry Pi OS arm64(buster\u30d9\u30fc\u30b9)\u3067\u306ePython\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\uff0epython \u30b3\u30de\u30f3\u30c9\u306f python2.7 \u3092\u547c\u3076\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e

\n
\n
\n
\n
$ python --version\nPython 2.7.16\n$ ls -l `which python`\nlrwxrwxrwx 1 root root 7  3\u6708  5  2019 /usr/bin/python -> python2\n$ ls -l `which python2`\nlrwxrwxrwx 1 root root 9  3\u6708  5  2019 /usr/bin/python2 -> python2.7\n$ ls -l `which python3`\nlrwxrwxrwx 1 root root 9  3\u6708 26  2019 /usr/bin/python3 -> python3.7
\n
\n
\n
\n

update-alternatives \u3067\u7ba1\u7406\u3055\u308c\u3066\u308b\u306e\u304b\u306a?\u3068\u601d\u3044\u307e\u3057\u305f\u304c\u8a2d\u5b9a\u304c\u306a\u3055\u305d\u3046\u3067\u3059\uff0e

\n
\n
\n
\n
$ update-alternatives --get-selections|grep -i ^python
\n
\n
\n
\n

update-alternatives \u3092\u624b\u52d5\u3067\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3059\uff0e
\n\u3053\u308c\u3067 python \u30b3\u30de\u30f3\u30c9\u304c python3.7 \u3092\u547c\u3076\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1\nupdate-alternatives: /usr/bin/python (python) \u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u81ea\u52d5\u30e2\u30fc\u30c9\u3067 /usr/bin/python2.7 \u3092\u4f7f\u3044\u307e\u3059\n$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2\nupdate-alternatives: /usr/bin/python (python) \u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u81ea\u52d5\u30e2\u30fc\u30c9\u3067 /usr/bin/python3.7 \u3092\u4f7f\u3044\u307e\u3059\n$ ls -l `which python`\nlrwxrwxrwx 1 root root 24  7\u6708 28 08:47 /usr/bin/python -> /etc/alternatives/python\n$ python --version\nPython 3.7.3\n$ update-alternatives --query python\nName: python\nLink: /usr/bin/python\nStatus: auto\nBest: /usr/bin/python3.7\nValue: /usr/bin/python3.7\n\nAlternative: /usr/bin/python2.7\nPriority: 1\n\nAlternative: /usr/bin/python3.7\nPriority: 2
\n
\n
\n
\n

\u5207\u308a\u66ff\u3048\u305f\u3044\u3068\u304d\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u9078\u629e\u80a2\u306a\u304a\u305b\u3070ok\uff0e

\n
\n
\n
\n
$ sudo update-alternatives --config python\nalternative python (/usr/bin/python \u3092\u63d0\u4f9b) \u306b\u306f 2 \u500b\u306e\u9078\u629e\u80a2\u304c\u3042\u308a\u307e\u3059\u3002\n\n  \u9078\u629e\u80a2    \u30d1\u30b9              \u512a\u5148\u5ea6  \u72b6\u614b\n------------------------------------------------------------\n* 0            /usr/bin/python3.7   2         \u81ea\u52d5\u30e2\u30fc\u30c9\n  1            /usr/bin/python2.7   1         \u624b\u52d5\u30e2\u30fc\u30c9\n  2            /usr/bin/python3.7   2         \u624b\u52d5\u30e2\u30fc\u30c9\n\n\u73fe\u5728\u306e\u9078\u629e [*] \u3092\u4fdd\u6301\u3059\u308b\u306b\u306f <Enter>\u3001\u3055\u3082\u306a\u3051\u308c\u3070\u9078\u629e\u80a2\u306e\u756a\u53f7\u306e\u30ad\u30fc\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044:
\n
\n
\n
\n

Debian asid amd64, Ubuntu 20.04 LTS amd64 \u3067\u3082\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n
Debian sid amd64
\n
\n
$ update-alternatives --query python\nName: python\nLink: /usr/bin/python\nStatus: auto\nBest: /usr/bin/python3.8\nValue: /usr/bin/python3.8\n\nAlternative: /usr/bin/python2.7\nPriority: 1\n\nAlternative: /usr/bin/python3.7\nPriority: 2\n\nAlternative: /usr/bin/python3.8\nPriority: 3
\n
\n
\n
\n
Ubuntu 20,04 LTS amd64
\n
\n
$ update-alternatives --query python\nName: python\nLink: /usr/bin/python\nStatus: auto\nBest: /usr/bin/python3.8\nValue: /usr/bin/python3.8\n\nAlternative: /usr/bin/python2.7\nPriority: 1\n\nAlternative: /usr/bin/python3.5\nPriority: 2\n\nAlternative: /usr/bin/python3.8\nPriority: 3
\n
\n
\n
\n

\u3066\u3053\u3068\u3067 python \u30b3\u30de\u30f3\u30c9\u304c python3 \u306b\u306a\u308a\u307e\u3057\u305f\uff0e\u3057\u304b\u3057\u30b7\u30b9\u30c6\u30e0\u30ef\u30a4\u30c9\u306a\u8a2d\u5b9a\u306a\u306e\u3067\u30b7\u30b9\u30c6\u30e0\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306a\u3069\u3067\u554f\u984c\u304c\u51fa\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u306d\uff0e
\n\u554f\u984c\u304c\u8d77\u3053\u3063\u305f\u3089python2\u306b\u623b\u3057\u307e\u3057\u3087\u3046\uff0e

\n
\n
\n
Rasoberry Pi OS amd64
\n
\n
$ dpkg-query -W python python3\npython  2.7.16-1\npython3 3.7.3-1\n$ lsb_release -dr\nDescription:    Debian GNU/Linux 10 (buster)\nRelease:        10\n$ uname -m\naarch64\n$ cat /proc/device-tree/model&&echo\nRaspberry Pi 3 Model B Rev 1.2
\n
\n
\n
\n
Debian sid amd64
\n
\n
$ dpkg-query -W python python3 python3.7\npython  2.7.17-2\npython3 3.8.2-3\npython3.7       3.7.7-1+b1\n$ lsb_release -dr\nDescription:    Debian GNU/Linux bullseye/sid\nRelease:        unstable\n$ uname -m\nx86_64
\n
\n
\n
\n
Ubuntu 20.04 LTS amd64
\n
\n
$ dpkg-query -W python python3 python3.7\npython  2.7.17-1\npython3 3.8.2-0ubuntu2\npython3.7\n$ lsb_release -dr\nDescription:    Ubuntu 20.04.1 LTS\nRelease:        20.04\n$ uname -m\nx86_64
\n
\n
\n", "content_text": "\u6700\u8fd1\u4f7f\u3046Python\u30a2\u30d7\u30ea\u306fPython3\u304c\u591a\u304f\u306a\u3063\u3066\u3044\u307e\u3059\uff0ePython2\u306eEoL\u304c\u8feb\u3063\u3066\u3044\u308b\u306e\u3067\u6b63\u3057\u3044\u306e\u3067\u3059\u304c\uff0c\u624b\u5143\u306e\u74b0\u5883\u3067\u306f python \u30b3\u30de\u30f3\u30c9\u306f python2 \u306b\u5411\u3044\u3066\u3044\u307e\u3059\uff0epython3 \u30b3\u30de\u30f3\u30c9\u3092\u53e9\u3051\u3070\u3044\u3044\u306e\u3067\u3059\u304c\uff0c\u3053\u308c\u3092 python3 \u306b\u5411\u3051\u3089\u308c\u306a\u3044\u304b\u306a\u3068\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\nRaspberry Pi OS arm64(buster\u30d9\u30fc\u30b9)\u3067\u306ePython\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\uff0epython \u30b3\u30de\u30f3\u30c9\u306f python2.7 \u3092\u547c\u3076\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e\n\n\n\n$ python --version\nPython 2.7.16\n$ ls -l `which python`\nlrwxrwxrwx 1 root root 7 3\u6708 5 2019 /usr/bin/python -> python2\n$ ls -l `which python2`\nlrwxrwxrwx 1 root root 9 3\u6708 5 2019 /usr/bin/python2 -> python2.7\n$ ls -l `which python3`\nlrwxrwxrwx 1 root root 9 3\u6708 26 2019 /usr/bin/python3 -> python3.7\n\n\n\nupdate-alternatives \u3067\u7ba1\u7406\u3055\u308c\u3066\u308b\u306e\u304b\u306a?\u3068\u601d\u3044\u307e\u3057\u305f\u304c\u8a2d\u5b9a\u304c\u306a\u3055\u305d\u3046\u3067\u3059\uff0e\n\n\n\n$ update-alternatives --get-selections|grep -i ^python\n\n\n\nupdate-alternatives \u3092\u624b\u52d5\u3067\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3059\uff0e\n\u3053\u308c\u3067 python \u30b3\u30de\u30f3\u30c9\u304c python3.7 \u3092\u547c\u3076\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e\n\n\n\n$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1\nupdate-alternatives: /usr/bin/python (python) \u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u81ea\u52d5\u30e2\u30fc\u30c9\u3067 /usr/bin/python2.7 \u3092\u4f7f\u3044\u307e\u3059\n$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2\nupdate-alternatives: /usr/bin/python (python) \u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u81ea\u52d5\u30e2\u30fc\u30c9\u3067 /usr/bin/python3.7 \u3092\u4f7f\u3044\u307e\u3059\n$ ls -l `which python`\nlrwxrwxrwx 1 root root 24 7\u6708 28 08:47 /usr/bin/python -> /etc/alternatives/python\n$ python --version\nPython 3.7.3\n$ update-alternatives --query python\nName: python\nLink: /usr/bin/python\nStatus: auto\nBest: /usr/bin/python3.7\nValue: /usr/bin/python3.7\n\nAlternative: /usr/bin/python2.7\nPriority: 1\n\nAlternative: /usr/bin/python3.7\nPriority: 2\n\n\n\n\u5207\u308a\u66ff\u3048\u305f\u3044\u3068\u304d\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u9078\u629e\u80a2\u306a\u304a\u305b\u3070ok\uff0e\n\n\n\n$ sudo update-alternatives --config python\nalternative python (/usr/bin/python \u3092\u63d0\u4f9b) \u306b\u306f 2 \u500b\u306e\u9078\u629e\u80a2\u304c\u3042\u308a\u307e\u3059\u3002\n\n \u9078\u629e\u80a2 \u30d1\u30b9 \u512a\u5148\u5ea6 \u72b6\u614b\n------------------------------------------------------------\n* 0 /usr/bin/python3.7 2 \u81ea\u52d5\u30e2\u30fc\u30c9\n 1 /usr/bin/python2.7 1 \u624b\u52d5\u30e2\u30fc\u30c9\n 2 /usr/bin/python3.7 2 \u624b\u52d5\u30e2\u30fc\u30c9\n\n\u73fe\u5728\u306e\u9078\u629e [*] \u3092\u4fdd\u6301\u3059\u308b\u306b\u306f <Enter>\u3001\u3055\u3082\u306a\u3051\u308c\u3070\u9078\u629e\u80a2\u306e\u756a\u53f7\u306e\u30ad\u30fc\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044:\n\n\n\nDebian asid amd64, Ubuntu 20.04 LTS amd64 \u3067\u3082\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\nDebian sid amd64\n\n$ update-alternatives --query python\nName: python\nLink: /usr/bin/python\nStatus: auto\nBest: /usr/bin/python3.8\nValue: /usr/bin/python3.8\n\nAlternative: /usr/bin/python2.7\nPriority: 1\n\nAlternative: /usr/bin/python3.7\nPriority: 2\n\nAlternative: /usr/bin/python3.8\nPriority: 3\n\n\n\nUbuntu 20,04 LTS amd64\n\n$ update-alternatives --query python\nName: python\nLink: /usr/bin/python\nStatus: auto\nBest: /usr/bin/python3.8\nValue: /usr/bin/python3.8\n\nAlternative: /usr/bin/python2.7\nPriority: 1\n\nAlternative: /usr/bin/python3.5\nPriority: 2\n\nAlternative: /usr/bin/python3.8\nPriority: 3\n\n\n\n\u3066\u3053\u3068\u3067 python \u30b3\u30de\u30f3\u30c9\u304c python3 \u306b\u306a\u308a\u307e\u3057\u305f\uff0e\u3057\u304b\u3057\u30b7\u30b9\u30c6\u30e0\u30ef\u30a4\u30c9\u306a\u8a2d\u5b9a\u306a\u306e\u3067\u30b7\u30b9\u30c6\u30e0\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306a\u3069\u3067\u554f\u984c\u304c\u51fa\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u306d\uff0e\n\u554f\u984c\u304c\u8d77\u3053\u3063\u305f\u3089python2\u306b\u623b\u3057\u307e\u3057\u3087\u3046\uff0e\n\n\nRasoberry Pi OS amd64\n\n$ dpkg-query -W python python3\npython 2.7.16-1\npython3 3.7.3-1\n$ lsb_release -dr\nDescription: Debian GNU/Linux 10 (buster)\nRelease: 10\n$ uname -m\naarch64\n$ cat /proc/device-tree/model&&echo\nRaspberry Pi 3 Model B Rev 1.2\n\n\n\nDebian sid amd64\n\n$ dpkg-query -W python python3 python3.7\npython 2.7.17-2\npython3 3.8.2-3\npython3.7 3.7.7-1+b1\n$ lsb_release -dr\nDescription: Debian GNU/Linux bullseye/sid\nRelease: unstable\n$ uname -m\nx86_64\n\n\n\nUbuntu 20.04 LTS amd64\n\n$ dpkg-query -W python python3 python3.7\npython 2.7.17-1\npython3 3.8.2-0ubuntu2\npython3.7\n$ lsb_release -dr\nDescription: Ubuntu 20.04.1 LTS\nRelease: 20.04\n$ uname -m\nx86_64", "date_published": "2020-07-28T22:31:55+09:00", "date_modified": "2020-07-28T22:31:55+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "Python", "update-alternatives", "Buster", "Debian", "Focal Fossa(20.04)", "Linux", "Raspberry Pi OS", "sid", "Ubuntu" ] }, { "id": "http://matoken.org/blog/?p=2840", "url": "https://matoken.org/blog/2020/07/24/hello-world-in-sipeed-lichee-nano/", "title": "Sipeed Lichee Nano\u3067hello world", "content_html": "
\n

2020-07-23\u4f4e\u30ec\u30d9\u30eb\u52c9\u5f37\u4f1a\u306b\u53c2\u52a0\u3057\u307e\u3057\u305f\uff0eZoom.us\u3067\u306e\u958b\u50ac\u3067\u3057\u305f\uff0e

\n
\n
\n\n
\n
\n

\u5185\u5bb9\u306fLinux\u540d\u523a\u7684\u306a\u3082\u306e\u3092\u958b\u767a\u3057\u3088\u3046\u3068\u3044\u3046\u5185\u5bb9\u3067\uff0c\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3068\u3057\u3066SD\u30ab\u30fc\u30c9\u30b5\u30a4\u30ba\u306e\u5c0f\u3055\u306aLinux\u306e\u52d5\u4f5c\u3059\u308barm\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306eSipeed Lichee Nano\u3092\u4f7f\u3044\u307e\u3057\u305f\uff0e

\n
\n
\n\n
\n
\n

\u6b32\u3057\u3044\u5834\u5408\u306f1000\u5186\u3061\u3087\u3044\u304f\u3089\u3044\u304b\u3089\u3067\u5165\u624b\u3067\u304d\u305d\u3046\u3067\u3059\uff0e

\n
\n
\n\n
\n
\n

Lichee Nano\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u4eba\u306f\u30ea\u30e2\u30fc\u30c8\u3067\u89e6\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3042\u3063\u305f\u306e\u3067\u6301\u3063\u3066\u3044\u306a\u3044\u79c1\u3082\u697d\u3057\u3081\u307e\u3057\u305f\uff0e

\n
\n
\n

\u3053\u306e\u30ea\u30e2\u30fc\u30c8\u958b\u767a\u306e\u4ed5\u7d44\u307f\u306fLichee Nano\u3068Raspberry Pi\u3092USB\u7d4c\u7531\u306eUART\u3067\u63a5\u7d9a\u3057\uff0cRaspberry Pi\u3067GNU screen\u3092\u8d77\u52d5\uff0cssh\u7d4c\u7531\u3067GNU screen\u306b\u7e4b\u3044\u3067\u64cd\u4f5c\u3068\u3044\u3046\u611f\u3058\u3067\u3059\uff0e
\nGNU screen\u3092Gotty\u7b49\u306b\u3059\u308b\u3068\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067\u53c2\u52a0\u3067\u304d\u3066\u3061\u3087\u3063\u3068\u4fbf\u5229\u304b\u3082\u3068\u601d\u3063\u305f\u308a\u3082\uff0e(GoTTY\u306f\u958b\u767a\u6b62\u307e\u3063\u3066\u308b\u3088\u3046\u306b\u898b\u3048\u308b\u304b\u3089\u5225\u306e\u3082\u306e\u306e\u307b\u3046\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u306a\u3044)

\n
\n
\n\n
\n
\n

Lichee Nano\u3067\u4f55\u304b\u3092\u52d5\u304b\u3057\u305f\u3044\uff0earm\u3060\u3051\u3069armhf\u52d5\u304f\u306e\u304b\u306a?\u3068\u308a\u3042\u3048\u305a\u306a\u306b\u304b\u8ee2\u9001\u3057\u3066\u52d5\u304b\u3057\u3066\u307f\u3088\u3046\u3068\uff0e

\n
\n
\n

\u3068\u308a\u3042\u3048\u305aDebian\u306earmhf\u30d0\u30a4\u30ca\u30ea\u3092uuencode\u3057\u3066\u30b3\u30d4\u30da\u3067\u8ee2\u9001\u3057\u3066\u307f\u307e\u3059.\u3053\u308c\u304c\u52d5\u3051\u3070Debian\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7fa4\u304c\u5229\u7528\u3067\u304d\u308b\u304b\u3082\u3060\u3051\u3069\u2026\u2026\uff0e

\n
\n
\n

\u307e\u305a\u306f\u7c21\u5358\u305d\u3046\u306afortune\u3092\u8a66\u3057\u307e\u3059.

\n
\n
\n
Debian sid\u3067fortune-mod\u30d1\u30c3\u30b1\u30fc\u30b8\u306earmhf\u30d0\u30a4\u30ca\u30ea\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u5c55\u958b(add archtecture armhf\u3057\u3066\u3042\u308b\u74b0\u5883)
\n
\n
$ apt download -t armhf fortune-mod\n$ unar fortune-mod_1.99.1-7+b1_armhf.deb\n$ cd fortune-mod_1.99.1-7+b1_armhf\n$ tar xf data.tar.xz\n$ cd usr/games
\n
\n
\n
\n

Lichee Nano\u306fserial\u3067\u63a5\u7d9a\u3055\u308c\u3066\u3044\u3066\uff0cInternet\u306b\u306f\u7e4b\u304c\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u306e\u8ee2\u9001\u306b\u306fuudecode/uuencode\u3092\u4f7f\u3044\u307e\u3057\u305f\uff0e\u4e45\u3005\u3067\u3059\uff0e
\n\u624b\u5143\u306eGNU sharutils 4.15.2\u306euudecode\u306b\u306fbase64\u3092\u4f7f\u3046 -m, --base64 \u304c\u3042\u308b\u306e\u3067\u826f\u3055\u305d\u3046\uff0e\u3068\u601d\u3063\u305f\u3051\u3069Lichee Nano\u306e\u65b9\u306fbusybox\u306e\u3082\u306e\u3067\u975e\u5bfe\u5fdc\u3067\u3057\u305f\uff0e

\n
\n
\n
\u30ed\u30fc\u30ab\u30eb\u7aef\u672b\u3067\u5727\u7e2e\u3057\u3066uuencode\u3057\u3066\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u3078
\n
\n
$ gzip -c fortune | uuencode fortune.gz > fortune.gz.uu\n$ cat fortune.gz.uu | xclip
\n
\n
\n
\n
\u30ea\u30e2\u30fc\u30c8\u3067\u4f38\u5f35\u3057\u3066\u89e3\u51cd
\n
\n
# cat | uudecode    #\u3053\u3053\u3067\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u304b\u3089\u8cbc\u308a\u4ed8\u3051\n# zcat fortune.gz > fortune\n# rm fortune.gz
\n
\n
\n
\n

\u305d\u3057\u3066\u2026\u200b\u2026\u200b

\n
\n
\n
\n
# ./fortune\n-sh: ./fortune: not found\n# ldd ./fortune\nchecking sub-depends for 'not found'\nchecking sub-depends for '/lib/libc.so.6'\n/lib/ld-linux.so.3 (0xb6fa0000)\nlibrecode.so.0 => not found (0x00000000)\nlibc.so.6 => /lib/libc.so.6 (0x00000000)\n/lib/ld-linux.so.3 => /lib/ld-linux.so.3 (0x00000000)
\n
\n
\n
\n

\u3053\u308c\u3092\u52d5\u304b\u3059\u306e\u306f\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30ea\u30f3\u30af\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3092\u7528\u610f\u3057\u3066\u3042\u3052\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u5bb9\u91cf\u7684\u306b\u96e3\u3057\u3044\u3067\u3059\u306d\uff0e

\n
\n
\n

\u3053\u3053\u3067\u306fgzip\u3067\u5727\u7e2e\u3057\u307e\u3057\u305f\u304c\uff0cLichee Nano\u306ebusybox\u306bxz\u304c\u3042\u308a\u307e\u3057\u305f\uff0egzip\u3088\u308axz\u306b\u3057\u305f\u307b\u3046\u304c\u5c0f\u3055\u304f\u306a\u308a\u307e\u3059\u306d\uff0e\u8a66\u3057\u3066\u307f\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u3067\u3057\u305f\uff0e$ xz -c fortune | uuencode fortune.xz > fortune.xz.uu

\n
\n
\n
\u30b5\u30a4\u30ba\u6bd4\u8f03
\n
\n
-rw-r--r-- 1 matoken matoken 22368 Jul 23 15:11 fortune #\u5143\u30d5\u30a1\u30a4\u30eb\n-rw-r--r-- 1 matoken matoken 30844 Jul 23 14:58 fortune.uu #uudecode\n-rw-r--r-- 1 matoken matoken 14975 Jul 23 15:08 fortune.gz.uu #zip + uudecode\n-rw-r--r-- 1 matoken matoken 13047 Jul 23 15:47 fortune.xz.uu #xz + uudecode
\n
\n
\n
\n

\u305d\u3046\u3044\u3048\u3070\u3042\u307e\u308a\u6709\u540d\u3067\u306f\u306a\u3044\u3067\u3059\u304cbasE91\u306a\u3093\u3066\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0ebase64\u3088\u308a\u30b5\u30a4\u30ba\u304c\u5c0f\u3055\u304f\u306a\u308a\u307e\u3059\u304c\u5c0e\u5165\u304b\u3089\u3084\u3089\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3061\u3087\u3063\u3068\u9762\u5012\uff0e

\n
\n
\n\n
\n
\n

Hello world\u3092\u8a66\u3057\u3066\u307f\u307e\u3059\uff0e\u9069\u5f53\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7528\u610f\u3057\u3066\u30b9\u30bf\u30c6\u30a3\u30c3\u30af\u30ea\u30f3\u30af\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n
\n
$ cat hello.c\n#include <stdio.h>\nint\nmain(void)\n{\n    printf(\"Hello, world!\\n\");\n    return 0;\n}\n$ gcc -static ./hello.c\n$ ./a.out\nHello, world!\n$ ls -l a.out\n-rwxr-xr-x 1 pi pi 571120 7\u6708 23 16:18 a.out
\n
\n
\n
\n

\u3067\u304b\u3044\u2026\u200b\u2026\u200b

\n
\n
\n

\u3068\u308a\u3042\u3048\u305a\u3067\u304b\u3044\u306e\u306f\u304a\u3044\u3068\u3044\u3066\u3053\u308c\u3060\u3068arm64\u306a\u306e\u3067\u52d5\u304f\u306f\u305a\u304c\u306a\u3044\uff0e\u3068\u3044\u3046\u3053\u3068\u3067\u30af\u30ed\u30b9\u30b3\u30f3\u30d1\u30a4\u30eb\u74b0\u5883\u3092\u7528\u610f\u3057\u307e\u3059\uff0e

\n
\n
\n\n
\n
\n

\u4eca\u56de\u8a66\u3057\u305f\u30db\u30b9\u30c8\u306fDebian sid amd64/Ubuntu 20.04 LTS arm64/Raspberry Pi OS arm64\u3067\u3059\uff0e\u3044\u305a\u308c\u3082\u540c\u3058\u624b\u9806\u3067OK\u3067\u3057\u305f\uff0e

\n
\n
\n

crossbuild-essential-<arch> \u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u5404\u7a2e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u74b0\u5883\u304c\u5c0e\u5165\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n
\n
$ apt-cache search crossbuild-essential-\ncrossbuild-essential-amd64 - Informational list of cross-build-essential packages\ncrossbuild-essential-arm64 - Informational list of cross-build-essential packages\ncrossbuild-essential-armel - Informational list of cross-build-essential packages\ncrossbuild-essential-armhf - Informational list of cross-build-essential packages\ncrossbuild-essential-i386 - Informational list of cross-build-essential packages\ncrossbuild-essential-powerpc - Informational list of cross-build-essential packages\ncrossbuild-essential-ppc64el - Informational list of cross-build-essential packages\ncrossbuild-essential-s390x - Informational list of cross-build-essential packages\ncrossbuild-essential-mips - Informational list of cross-build-essential packages\ncrossbuild-essential-mips64 - Informational list of cross-build-essential packages\ncrossbuild-essential-mips64el - Informational list of cross-build-essential packages\ncrossbuild-essential-mips64r6 - Informational list of cross-build-essential packages\ncrossbuild-essential-mips64r6el - Informational list of cross-build-essential packages\ncrossbuild-essential-mipsel - Informational list of cross-build-essential packages\ncrossbuild-essential-mipsr6 - Informational list of cross-build-essential packages\ncrossbuild-essential-mipsr6el - Informational list of cross-build-essential packages
\n
\n
\n
\n

\u6ca2\u5c71\u3042\u308a\u307e\u3059\uff0e\u4eca\u56de\u306farmlf/armhf\u306e crossbuild-essential-armel, crossbuild-essential-armhf \u3092\u5c0e\u5165\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo apt install crossbuild-essential-armel crossbuild-essential-armhf
\n
\n
\n
\n

gcc\u3060\u3051\u3067\u3044\u3044\u5834\u5408\u306farmlf\u306f gcc-arm-linux-gnueabi\uff0carmhf\u306f gcc-arm-linux-gnueabihf \u3060\u3051\u3067OK\u3067\u3059\uff0e

\n
\n
\n

\u307e\u305a\u306f arm-linux-gnueabihf-gcc \u3092\u4f7f\u3063\u3066armhf\u306e\u30d0\u30a4\u30ca\u30ea\u3092\u4f5c\u308a\u307e\u3059\uff0e

\n
\n
\n
\n
$ /usr/bin/arm-linux-gnueabihf-gcc -static ./hello.c\n$ strip a.out\n$ xz -c a.out | uuencode a.out.xz > a.out.xz.uu
\n
\n
\n
\n

armhf\u306f\u99c4\u76ee\u305d\u3046\u3067\u3059\uff0e

\n
\n
\n
\n
# cat | uudecode\n^d\n# xzcat ./a.out.xz > ./a.out\n# chmod +x ./a.out\n# ./a.out\nSegmentation fault
\n
\n
\n
\n

\u6b21\u306f gcc-arm-linux-gnueabi \u3067armlf\u306e\u30d0\u30a4\u30ca\u30ea\u3092\u4f5c\u3063\u3066\u8a66\u3059\u3068\u52d5\u304d\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ /usr/bin/arm-linux-gnueabi-gcc -static ./hello.c\n$ strip a.out\n$ xz -c a.out | uuencode a.out.xz > a.out.xz.uu
\n
\n
\n
\n
\n
# cat | uudecode\n^d\n# xzcat ./a.out.xz > ./a.out\n# chmod +x ./a.out\n# ./a.out\nHello, world!\n# /usr/bin/time -f \"%M KB\" ./a.out\nHello, world!\n2144 KB
\n
\n
\n
\n

\u3053\u306e\u8fba\u308a\u3067\u4eca\u56de\u306f\u6642\u9593\u5207\u308c\uff0e\u6b21\u56de\u306e\u540c\u3058\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u308a\u305d\u3046\u3067\u3059\uff0e\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u304b\u3089\uff0e

\n
\n
\n\n
\n
\n

\u3068\u308a\u3042\u3048\u305aarmel\u306e\u30d0\u30a4\u30ca\u30ea\u304c\u52d5\u304f\u3088\u3046\u306a\u306e\u304c\u308f\u304b\u3063\u305f\u306e\u3067\u9762\u767d\u305d\u3046\u306a\u5c0f\u3055\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8a66\u305d\u3046\u304b\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3059\uff0ecowsay\u3068\u304b\u597d\u304d\u306a\u3093\u3060\u3051\u3069\u3053\u308c\u306fPerl\u306a\u306e\u3067\u5bb9\u91cf\u7684\u306b\u96e3\u3057\u305d\u3046\uff0e\u3068\u308a\u3042\u3048\u305afortune\u3042\u305f\u308a\u304b\u306a?

\n
\n
\n

\u4ee5\u524dPQI Air Pen\u3067\u3084\u3063\u305f\u3088\u3046\u306bSD card\u3092\u7528\u610f\u3057\u3066\u305d\u3053\u306bDebian armlf\u74b0\u5883\u3092\u5c55\u958b\u3057\u3066chroot\u3068\u304b\u3082\u3067\u304d\u305d\u3046\u3067\u3059\uff0e

\n
\n
\n\n
\n", "content_text": "2020-07-23\u4f4e\u30ec\u30d9\u30eb\u52c9\u5f37\u4f1a\u306b\u53c2\u52a0\u3057\u307e\u3057\u305f\uff0eZoom.us\u3067\u306e\u958b\u50ac\u3067\u3057\u305f\uff0e\n\n\n\n\u4f4e\u30ec\u30d9\u30eb\u52c9\u5f37\u4f1a2020\u5e7407\u6708 – connpass\n\n\n\n\u5185\u5bb9\u306fLinux\u540d\u523a\u7684\u306a\u3082\u306e\u3092\u958b\u767a\u3057\u3088\u3046\u3068\u3044\u3046\u5185\u5bb9\u3067\uff0c\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3068\u3057\u3066SD\u30ab\u30fc\u30c9\u30b5\u30a4\u30ba\u306e\u5c0f\u3055\u306aLinux\u306e\u52d5\u4f5c\u3059\u308barm\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306eSipeed Lichee Nano\u3092\u4f7f\u3044\u307e\u3057\u305f\uff0e\n\n\n\n\u8354\u679d\u6d3eNano \u5168\u6d41\u7a0b\u6307\u5357 \u2014 \u8354\u679d\u6d3eNano \u5168\u6d41\u7a0b\u6307\u5357 documentation\n\n\n\n\u6b32\u3057\u3044\u5834\u5408\u306f1000\u5186\u3061\u3087\u3044\u304f\u3089\u3044\u304b\u3089\u3067\u5165\u624b\u3067\u304d\u305d\u3046\u3067\u3059\uff0e\n\n\n\nSipeed Lichee Nano – \u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9 1045\u5186 + \u9001\u6599200\u5186 =1245\u5186\nLichee Nano \u2013 Shigezone Online 990\u5186 + \u9001\u6599400\u5186 = 1390\u5186\n\u30105705\u3011SIPEED-LICHEE-NANO Sipeed Lichee Nano 1050\u5186 + \u9001\u6599350\u5186 = 1400\u5186\n\uff2c\uff49\uff43\uff48\uff45\uff45\uff30\uff49\u3000\uff2e\uff41\uff4e\uff4f\u3000\uff11\uff16\uff2d\u3000\uff46\uff4c\uff41\uff53\uff48: \u30de\u30a4\u30b3\u30f3\u95a2\u9023 \u79cb\u6708\u96fb\u5b50\u901a\u5546-\u96fb\u5b50\u90e8\u54c1\u30fb\u30cd\u30c3\u30c8\u901a\u8ca9\u30001000\u5186 + \u9001\u6599500\u5186 = 1500\u5186\nSipeed Lichee Nano Linux \u958b\u767a\u30dc\u30fc\u30c9 16M Flash – Seeed Studio 707\u5186+ shipping\n\n\n\nLichee Nano\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u4eba\u306f\u30ea\u30e2\u30fc\u30c8\u3067\u89e6\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3042\u3063\u305f\u306e\u3067\u6301\u3063\u3066\u3044\u306a\u3044\u79c1\u3082\u697d\u3057\u3081\u307e\u3057\u305f\uff0e\n\n\n\u3053\u306e\u30ea\u30e2\u30fc\u30c8\u958b\u767a\u306e\u4ed5\u7d44\u307f\u306fLichee Nano\u3068Raspberry Pi\u3092USB\u7d4c\u7531\u306eUART\u3067\u63a5\u7d9a\u3057\uff0cRaspberry Pi\u3067GNU screen\u3092\u8d77\u52d5\uff0cssh\u7d4c\u7531\u3067GNU screen\u306b\u7e4b\u3044\u3067\u64cd\u4f5c\u3068\u3044\u3046\u611f\u3058\u3067\u3059\uff0e\nGNU screen\u3092Gotty\u7b49\u306b\u3059\u308b\u3068\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067\u53c2\u52a0\u3067\u304d\u3066\u3061\u3087\u3063\u3068\u4fbf\u5229\u304b\u3082\u3068\u601d\u3063\u305f\u308a\u3082\uff0e(GoTTY\u306f\u958b\u767a\u6b62\u307e\u3063\u3066\u308b\u3088\u3046\u306b\u898b\u3048\u308b\u304b\u3089\u5225\u306e\u3082\u306e\u306e\u307b\u3046\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u306a\u3044)\n\n\n\n\u7aef\u672b\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b Web \u3067\u5171\u6709\u3067\u304d\u308b GoTTY \u2013 matoken\u2019s meme\n\n\n\nLichee Nano\u3067\u4f55\u304b\u3092\u52d5\u304b\u3057\u305f\u3044\uff0earm\u3060\u3051\u3069armhf\u52d5\u304f\u306e\u304b\u306a?\u3068\u308a\u3042\u3048\u305a\u306a\u306b\u304b\u8ee2\u9001\u3057\u3066\u52d5\u304b\u3057\u3066\u307f\u3088\u3046\u3068\uff0e\n\n\n\u3068\u308a\u3042\u3048\u305aDebian\u306earmhf\u30d0\u30a4\u30ca\u30ea\u3092uuencode\u3057\u3066\u30b3\u30d4\u30da\u3067\u8ee2\u9001\u3057\u3066\u307f\u307e\u3059.\u3053\u308c\u304c\u52d5\u3051\u3070Debian\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7fa4\u304c\u5229\u7528\u3067\u304d\u308b\u304b\u3082\u3060\u3051\u3069\u2026\u2026\uff0e\n\n\n\u307e\u305a\u306f\u7c21\u5358\u305d\u3046\u306afortune\u3092\u8a66\u3057\u307e\u3059.\n\n\nDebian sid\u3067fortune-mod\u30d1\u30c3\u30b1\u30fc\u30b8\u306earmhf\u30d0\u30a4\u30ca\u30ea\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u5c55\u958b(add archtecture armhf\u3057\u3066\u3042\u308b\u74b0\u5883)\n\n$ apt download -t armhf fortune-mod\n$ unar fortune-mod_1.99.1-7+b1_armhf.deb\n$ cd fortune-mod_1.99.1-7+b1_armhf\n$ tar xf data.tar.xz\n$ cd usr/games\n\n\n\nLichee Nano\u306fserial\u3067\u63a5\u7d9a\u3055\u308c\u3066\u3044\u3066\uff0cInternet\u306b\u306f\u7e4b\u304c\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u306e\u8ee2\u9001\u306b\u306fuudecode/uuencode\u3092\u4f7f\u3044\u307e\u3057\u305f\uff0e\u4e45\u3005\u3067\u3059\uff0e\n\u624b\u5143\u306eGNU sharutils 4.15.2\u306euudecode\u306b\u306fbase64\u3092\u4f7f\u3046 -m, --base64 \u304c\u3042\u308b\u306e\u3067\u826f\u3055\u305d\u3046\uff0e\u3068\u601d\u3063\u305f\u3051\u3069Lichee Nano\u306e\u65b9\u306fbusybox\u306e\u3082\u306e\u3067\u975e\u5bfe\u5fdc\u3067\u3057\u305f\uff0e\n\n\n\u30ed\u30fc\u30ab\u30eb\u7aef\u672b\u3067\u5727\u7e2e\u3057\u3066uuencode\u3057\u3066\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u3078\n\n$ gzip -c fortune | uuencode fortune.gz > fortune.gz.uu\n$ cat fortune.gz.uu | xclip\n\n\n\n\u30ea\u30e2\u30fc\u30c8\u3067\u4f38\u5f35\u3057\u3066\u89e3\u51cd\n\n# cat | uudecode #\u3053\u3053\u3067\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u304b\u3089\u8cbc\u308a\u4ed8\u3051\n# zcat fortune.gz > fortune\n# rm fortune.gz\n\n\n\n\u305d\u3057\u3066\u2026\u200b\u2026\u200b\n\n\n\n# ./fortune\n-sh: ./fortune: not found\n# ldd ./fortune\nchecking sub-depends for 'not found'\nchecking sub-depends for '/lib/libc.so.6'\n/lib/ld-linux.so.3 (0xb6fa0000)\nlibrecode.so.0 => not found (0x00000000)\nlibc.so.6 => /lib/libc.so.6 (0x00000000)\n/lib/ld-linux.so.3 => /lib/ld-linux.so.3 (0x00000000)\n\n\n\n\u3053\u308c\u3092\u52d5\u304b\u3059\u306e\u306f\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30ea\u30f3\u30af\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3092\u7528\u610f\u3057\u3066\u3042\u3052\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u5bb9\u91cf\u7684\u306b\u96e3\u3057\u3044\u3067\u3059\u306d\uff0e\n\n\n\u3053\u3053\u3067\u306fgzip\u3067\u5727\u7e2e\u3057\u307e\u3057\u305f\u304c\uff0cLichee Nano\u306ebusybox\u306bxz\u304c\u3042\u308a\u307e\u3057\u305f\uff0egzip\u3088\u308axz\u306b\u3057\u305f\u307b\u3046\u304c\u5c0f\u3055\u304f\u306a\u308a\u307e\u3059\u306d\uff0e\u8a66\u3057\u3066\u307f\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u3067\u3057\u305f\uff0e$ xz -c fortune | uuencode fortune.xz > fortune.xz.uu\n\n\n\u30b5\u30a4\u30ba\u6bd4\u8f03\n\n-rw-r--r-- 1 matoken matoken 22368 Jul 23 15:11 fortune #\u5143\u30d5\u30a1\u30a4\u30eb\n-rw-r--r-- 1 matoken matoken 30844 Jul 23 14:58 fortune.uu #uudecode\n-rw-r--r-- 1 matoken matoken 14975 Jul 23 15:08 fortune.gz.uu #zip + uudecode\n-rw-r--r-- 1 matoken matoken 13047 Jul 23 15:47 fortune.xz.uu #xz + uudecode\n\n\n\n\u305d\u3046\u3044\u3048\u3070\u3042\u307e\u308a\u6709\u540d\u3067\u306f\u306a\u3044\u3067\u3059\u304cbasE91\u306a\u3093\u3066\u3082\u306e\u3082\u3042\u308a\u307e\u3059\uff0ebase64\u3088\u308a\u30b5\u30a4\u30ba\u304c\u5c0f\u3055\u304f\u306a\u308a\u307e\u3059\u304c\u5c0e\u5165\u304b\u3089\u3084\u3089\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3061\u3087\u3063\u3068\u9762\u5012\uff0e\n\n\n\nunix:commands:base91 [wiki.matoken.org]\n\n\n\nHello world\u3092\u8a66\u3057\u3066\u307f\u307e\u3059\uff0e\u9069\u5f53\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7528\u610f\u3057\u3066\u30b9\u30bf\u30c6\u30a3\u30c3\u30af\u30ea\u30f3\u30af\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u307f\u307e\u3059\uff0e\n\n\n\n$ cat hello.c\n#include <stdio.h>\nint\nmain(void)\n{\n printf(\"Hello, world!\\n\");\n return 0;\n}\n$ gcc -static ./hello.c\n$ ./a.out\nHello, world!\n$ ls -l a.out\n-rwxr-xr-x 1 pi pi 571120 7\u6708 23 16:18 a.out\n\n\n\n\u3067\u304b\u3044\u2026\u200b\u2026\u200b\n\n\n\u3068\u308a\u3042\u3048\u305a\u3067\u304b\u3044\u306e\u306f\u304a\u3044\u3068\u3044\u3066\u3053\u308c\u3060\u3068arm64\u306a\u306e\u3067\u52d5\u304f\u306f\u305a\u304c\u306a\u3044\uff0e\u3068\u3044\u3046\u3053\u3068\u3067\u30af\u30ed\u30b9\u30b3\u30f3\u30d1\u30a4\u30eb\u74b0\u5883\u3092\u7528\u610f\u3057\u307e\u3059\uff0e\n\n\n\nCrossToolchains – Debian Wiki\n\n\n\n\u4eca\u56de\u8a66\u3057\u305f\u30db\u30b9\u30c8\u306fDebian sid amd64/Ubuntu 20.04 LTS arm64/Raspberry Pi OS arm64\u3067\u3059\uff0e\u3044\u305a\u308c\u3082\u540c\u3058\u624b\u9806\u3067OK\u3067\u3057\u305f\uff0e\n\n\ncrossbuild-essential-<arch> \u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u5404\u7a2e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u74b0\u5883\u304c\u5c0e\u5165\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\n$ apt-cache search crossbuild-essential-\ncrossbuild-essential-amd64 - Informational list of cross-build-essential packages\ncrossbuild-essential-arm64 - Informational list of cross-build-essential packages\ncrossbuild-essential-armel - Informational list of cross-build-essential packages\ncrossbuild-essential-armhf - Informational list of cross-build-essential packages\ncrossbuild-essential-i386 - Informational list of cross-build-essential packages\ncrossbuild-essential-powerpc - Informational list of cross-build-essential packages\ncrossbuild-essential-ppc64el - Informational list of cross-build-essential packages\ncrossbuild-essential-s390x - Informational list of cross-build-essential packages\ncrossbuild-essential-mips - Informational list of cross-build-essential packages\ncrossbuild-essential-mips64 - Informational list of cross-build-essential packages\ncrossbuild-essential-mips64el - Informational list of cross-build-essential packages\ncrossbuild-essential-mips64r6 - Informational list of cross-build-essential packages\ncrossbuild-essential-mips64r6el - Informational list of cross-build-essential packages\ncrossbuild-essential-mipsel - Informational list of cross-build-essential packages\ncrossbuild-essential-mipsr6 - Informational list of cross-build-essential packages\ncrossbuild-essential-mipsr6el - Informational list of cross-build-essential packages\n\n\n\n\u6ca2\u5c71\u3042\u308a\u307e\u3059\uff0e\u4eca\u56de\u306farmlf/armhf\u306e crossbuild-essential-armel, crossbuild-essential-armhf \u3092\u5c0e\u5165\u3057\u307e\u3057\u305f\uff0e\n\n\n\n$ sudo apt install crossbuild-essential-armel crossbuild-essential-armhf\n\n\n\ngcc\u3060\u3051\u3067\u3044\u3044\u5834\u5408\u306farmlf\u306f gcc-arm-linux-gnueabi\uff0carmhf\u306f gcc-arm-linux-gnueabihf \u3060\u3051\u3067OK\u3067\u3059\uff0e\n\n\n\u307e\u305a\u306f arm-linux-gnueabihf-gcc \u3092\u4f7f\u3063\u3066armhf\u306e\u30d0\u30a4\u30ca\u30ea\u3092\u4f5c\u308a\u307e\u3059\uff0e\n\n\n\n$ /usr/bin/arm-linux-gnueabihf-gcc -static ./hello.c\n$ strip a.out\n$ xz -c a.out | uuencode a.out.xz > a.out.xz.uu\n\n\n\narmhf\u306f\u99c4\u76ee\u305d\u3046\u3067\u3059\uff0e\n\n\n\n# cat | uudecode\n^d\n# xzcat ./a.out.xz > ./a.out\n# chmod +x ./a.out\n# ./a.out\nSegmentation fault\n\n\n\n\u6b21\u306f gcc-arm-linux-gnueabi \u3067armlf\u306e\u30d0\u30a4\u30ca\u30ea\u3092\u4f5c\u3063\u3066\u8a66\u3059\u3068\u52d5\u304d\u307e\u3057\u305f\uff0e\n\n\n\n$ /usr/bin/arm-linux-gnueabi-gcc -static ./hello.c\n$ strip a.out\n$ xz -c a.out | uuencode a.out.xz > a.out.xz.uu\n\n\n\n\n# cat | uudecode\n^d\n# xzcat ./a.out.xz > ./a.out\n# chmod +x ./a.out\n# ./a.out\nHello, world!\n# /usr/bin/time -f \"%M KB\" ./a.out\nHello, world!\n2144 KB\n\n\n\n\u3053\u306e\u8fba\u308a\u3067\u4eca\u56de\u306f\u6642\u9593\u5207\u308c\uff0e\u6b21\u56de\u306e\u540c\u3058\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u308a\u305d\u3046\u3067\u3059\uff0e\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u304b\u3089\uff0e\n\n\n\n\u4f4e\u30ec\u30d9\u30eb\u52c9\u5f37\u4f1a2020\u5e7408\u6708 – connpass\n\n\n\n\u3068\u308a\u3042\u3048\u305aarmel\u306e\u30d0\u30a4\u30ca\u30ea\u304c\u52d5\u304f\u3088\u3046\u306a\u306e\u304c\u308f\u304b\u3063\u305f\u306e\u3067\u9762\u767d\u305d\u3046\u306a\u5c0f\u3055\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8a66\u305d\u3046\u304b\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3059\uff0ecowsay\u3068\u304b\u597d\u304d\u306a\u3093\u3060\u3051\u3069\u3053\u308c\u306fPerl\u306a\u306e\u3067\u5bb9\u91cf\u7684\u306b\u96e3\u3057\u305d\u3046\uff0e\u3068\u308a\u3042\u3048\u305afortune\u3042\u305f\u308a\u304b\u306a?\n\n\n\u4ee5\u524dPQI Air Pen\u3067\u3084\u3063\u305f\u3088\u3046\u306bSD card\u3092\u7528\u610f\u3057\u3066\u305d\u3053\u306bDebian armlf\u74b0\u5883\u3092\u5c55\u958b\u3057\u3066chroot\u3068\u304b\u3082\u3067\u304d\u305d\u3046\u3067\u3059\uff0e\n\n\n\nPQI Air Pen Hack – Speaker Deck", "date_published": "2020-07-24T23:46:32+09:00", "date_modified": "2020-07-24T23:46:56+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "gcc", "include", "Lichee Nano", "Sipeed", "uudecode", "xz", "zip", "Buster", "Debian", "Focal Fossa(20.04)", "Linux", "Raspberry Pi OS", "sid", "Ubuntu", "\u52c9\u5f37\u4f1a", "\u96fb\u5b50\u5de5\u4f5c" ] }, { "id": "http://matoken.org/blog/?p=2834", "url": "https://matoken.org/blog/2020/07/17/a-little-experiment-with-the-new-features-of-rsync-3-2-0/", "title": "rsync 3.2.0\u306e\u65b0\u6a5f\u80fd\u3092\u5c11\u3057\u8a66\u3059", "content_html": "
\n
\n
\n

\u30d5\u30a1\u30a4\u30eb\u540c\u671f\u306b\u3068\u3066\u3082\u4fbf\u5229\u306arsync\u306e3.2.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\uff0e

\n
\n
\n\n
\n
\n

\u30d0\u30b0\u30d5\u30a3\u30af\u30b9\u3084\uff0c\u3044\u304f\u3064\u304b\u306e\u65b0\u6a5f\u80fd\u304c\u5165\u3063\u305f\u3088\u3046\u306a\u306e\u3067\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n

\u203b1. \u3053\u306e\u8a18\u4e8b\u6295\u7a3f\u6642\u306b\u306f 3.2.2 \u304c\u51fa\u3066\u3044\u307e\u3059\uff0e
\n\u203b2. \u9e7f\u5150\u5cf6Linux\u52c9\u5f37\u4f1a 2020.06\u3067\u767a\u8868\u3057\u305f\u3082\u306e\u3068\u540c\u3058\u5185\u5bb9\u3067\u3059\uff0e

\n
\"rsync

\n

View more on edocr

\n
\n
\n
\n
\n
\n

\u5c0e\u5165\u4f8b

\n
\n
\n

Debian sid amd64 & Ubuntu 20.04 LTS amd64

\n
\n
\n
$ sudo apt build-dep rsync\n$ sudo apt install libxxhash-dev libzstd-dev liblz4-dev\n$ wget -c \\\nhttps://download.samba.org/pub/rsync/rsync-3.2.0.tar.gz \\\nhttps://download.samba.org/pub/rsync/rsync-3.2.0.tar.gz.asc \\\nhttps://opencoder.net/WayneDavison.key\n$ gpg2 --import ./WayneDavison.key\n$ gpg2 --verify ./rsync-3.2.0.tar.gz.asc\n$ tar tvzf ./rsync-3.2.0.tar.gz\n$ tar xzf ./rsync-3.2.0.tar.gz\n$ cd rsync-3.2.0\n$ ./configure --help\n$ ./configure\n$ make\n$ ./rsync --version\nrsync  version 3.2.0  protocol version 31\nCopyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others.\nWeb site: http://rsync.samba.org/\nCapabilities:\n    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,\n    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append,\n    ACLs, xattrs, iconv, symtimes, prealloc, SIMD\nChecksum list:\n    xxh64 (xxhash) md5 md4 none\nCompress list:\n    zstd lz4 zlibx zlib none\n\nrsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you\nare welcome to redistribute it under certain conditions.  See the GNU\nGeneral Public Licence for details.
\n
\n
\n
\n\n\n\n\n\n\n\n
\n
Note
\n
\ngpg\u9375\u306f\u6b21\u304b\u3089\u5165\u624b\u3067\u304d\u307e\u3059\uff0ersync download
\n
\n
\n
\n

Raspberri Pi OS amd64

\n
\n

Raspberry Pi OS arm64\u306e\u5834\u5408 libzstd-dev \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 1.3.8+dfsg-3 \u3068\u5c11\u3057\u53e4\u304fbuild\u306b\u5931\u6557\u3057\u307e\u3059\uff0e ./configure --disable-zstd \u3068\u3057\u3066zstd\u3092\u7121\u52b9\u306b\u3059\u308b\u304b\uff0csource\u304b\u3089 zstd 1.4.5 \u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067build\u51fa\u6765\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ make\n  :\ntoken.c: In function \u2018init_compression_level\u2019:\ntoken.c:73:40: warning: implicit declaration of function \u2018ZSTD_minCLevel\u2019; did you mean \u2018ZSTD_maxCLevel\u2019? [-Wimplicit-function-declaration]\n   min_level = skip_compression_level = ZSTD_minCLevel();\n                                        ^~~~~~~~~~~~~~\n                                        ZSTD_maxCLevel\ntoken.c: In function \u2018send_zstd_token\u2019:\ntoken.c:685:2: error: unknown type name \u2018ZSTD_EndDirective\u2019; did you mean \u2018ZSTD_DDict\u2019?\n  ZSTD_EndDirective flush = ZSTD_e_continue;\n  ^~~~~~~~~~~~~~~~~\n  ZSTD_DDict\ntoken.c:685:28: error: \u2018ZSTD_e_continue\u2019 undeclared (first use in this function)\n  ZSTD_EndDirective flush = ZSTD_e_continue;\n                            ^~~~~~~~~~~~~~~\ntoken.c:685:28: note: each undeclared identifier is reported only once for each function it appears in\ntoken.c:701:3: warning: implicit declaration of function \u2018ZSTD_CCtx_setParameter\u2019 [-Wimplicit-function-declaration]\n   ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_compressionLevel, do_compression_level);\n   ^~~~~~~~~~~~~~~~~~~~~~\ntoken.c:701:37: error: \u2018ZSTD_c_compressionLevel\u2019 undeclared (first use in this function); did you mean \u2018skip_compression_level\u2019?\n   ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_compressionLevel, do_compression_level);\n                                     ^~~~~~~~~~~~~~~~~~~~~~~\n                                     skip_compression_level\ntoken.c:751:13: error: \u2018ZSTD_e_flush\u2019 undeclared (first use in this function); did you mean \u2018ZSTD_DCtx_s\u2019?\n     flush = ZSTD_e_flush;\n             ^~~~~~~~~~~~\n             ZSTD_DCtx_s\ntoken.c:753:8: warning: implicit declaration of function \u2018ZSTD_compressStream2\u2019; did you mean \u2018ZSTD_compressStream\u2019? [-Wimplicit-function-declaration]\n    r = ZSTD_compressStream2(zstd_cctx, &zstd_out_buff, &zstd_in_buff, flush);\n        ^~~~~~~~~~~~~~~~~~~~\n        ZSTD_compressStream\n$ cd ..\n$ sudo apt remove libzstd-dev\n$ wget https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz \\\nhttps://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz.sha256\n$ sha256sum -c ./zstd-1.4.5.tar.gz.sha256\n$ tar tvf ./zstd-1.4.5.tar.gz | lv\n$ tar xf ./zstd-1.4.5.tar.gz\n$ cd zstd-1.4.5\n$ make\n$ sudo make install\n$ cd ../rsync-3.2.0\n$ ./configure && make
\n
\n
\n
\n
\n

Debian sid amd64

\n
\n

Debian sid amd64 \u74b0\u5883\u306b\u306f\u3059\u3067\u306b\u964d\u3063\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u304b\u3089\u5c0e\u5165\u3059\u308b\u3060\u3051\u3067OK\u3067\u3059\uff0e

\n
\n
\n
\n
$ sudo apt install rsync\n$ rsync --version\nrsync  version 3.2.0  protocol version 31\nCopyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others.\nWeb site: http://rsync.samba.org/\nCapabilities:\n    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,\n    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append,\n    ACLs, xattrs, iconv, symtimes, prealloc, SIMD\nChecksum list:\n    xxh64 (xxhash) md5 md4 none\nCompress list:\n    zstd lz4 zlibx zlib none\n\nrsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you\nare welcome to redistribute it under certain conditions.  See the GNU\nGeneral Public Licence for details.\n$ dpkg-query -W rsync\nrsync   3.2.0-1
\n
\n
\n
\n

\u3063\u3066\u3053\u3068\u3067\u8a66\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0eNEWS\u3092\u898b\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n\n
\n
\n
\n
\n
\n

BUG FIX

\n
\n
\n
\n
\n

Avoid a hang when an overabundance of messages clogs up all the I/O buffers.

\n
\n
\n
\n
\n

\u3053\u306e\u30d0\u30b0\u4fee\u6b63\u304c\u3061\u3087\u3063\u3068\u6c17\u306b\u306a\u308a\u307e\u3059\uff0efat32\u306e\u5236\u9650\u306b\u5f15\u3063\u304b\u304b\u3063\u305f\u3068\u304d\u306b\u5e30\u3063\u3066\u3053\u306a\u3044\u554f\u984c\u3082\u3053\u308c\u3067\u89e3\u6c7a\u3057\u3066\u308b\u304b\u3082?\u672a\u78ba\u8a8d\uff0e

\n
\n\n
\n
\n
\n

ENHANCEMENTS

\n
\n
\n

–checksum-choice=STR, –cc=STR

\n
\n

\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u5f62\u5f0f\u3092\u9078\u3079\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e\u73fe\u5728\u9078\u629e\u3067\u304d\u308b\u306e\u306f xxh64/md5/md4 \u306e3\u7a2e\u985e or none or auto(\u65e2\u5b9a\u5024)

\n
\n
\n
man(1)\u3088\u308a
\n
\n
              o      auto (the default)\n              o      xxh64 (aka xxhash)\n              o      md5\n              o      md4\n              o      none
\n
\n
\n
\n

--version \u306b\u3082\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
$ rsync --version | grep Checksum -A1\nChecksum list:\n    xxh64 (xxhash) md5 md4 none
\n
\n
\n
\n

configure option \u306b --disable-xxhash \u304c\u3042\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
  --disable-xxhash        disable xxhash checksums
\n
\n
\n
\n

\u74b0\u5883\u5909\u6570 RSYNC_CHECKSUM_LIST \u3067\u3082\u6307\u5b9a\u3067\u304d\u307e\u3059\uff0e\u30aa\u30d7\u30b7\u30e7\u30f3 --checksum-choice \u304c\u3042\u308b\u5834\u5408\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307b\u3046\u304c\u512a\u5148\u306a\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u3061\u306a\u307f\u306b --checksum-choice \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044 3.1.3 \u306b\u5bfe\u3057\u3066 xxh64 \u3092\u5411\u3051\u3066\u53e9\u3044\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\uff0e(md4, md5 \u306fok)

\n
\n
\n
\n
$ rsync --checksum-choice=xxh64 -avc ./* user@remote:/tmp/\nunknown checksum name: xxh64\nrsync error: requested action not supported (code 4) at checksum.c(73) [server=3.1.3]\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.2.0]
\n
\n
\n
\n

\u6642\u9593\u304c\u3069\u306e\u304f\u3089\u3044\u5909\u308f\u308b\u304b\u3061\u3087\u3046\u3069\u8ee2\u304c\u3063\u3066\u3044\u305fkernel source(\u5c0f\u3055\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u6ca2\u5c71)\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u306f\u3058\u3081\u666e\u901a\u306b\u540c\u671f\u3057\u305f\u5f8c\uff0c\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2\u3057\u3066 md4, md5, xxh64 \u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u601d\u3063\u305f\u3088\u308a\u5dee\u304c\u51fa\u306a\u3044\u611f\u3058?

\n
\n
\n
md4
\n
\n
$ find ./linux-5.6 | wc -l\n82114\n$ du -ms ./linux-5.6\n1310    ./linux-5.6\n$ rsync --checksum-choice=auto -ac ./linux-5.6 /tmp/\n$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=md4 -ac ./linux-5.6 /tmp/\n3\n\nreal    0m52.393s\nuser    0m5.051s\nsys     0m12.246s
\n
\n
\n
\n
md5
\n
\n
$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=md5 -ac ./linux-5.6 /tmp/\n3\n\nreal    0m57.716s\nuser    0m6.976s\nsys     0m13.486s
\n
\n
\n
\n
xxh64
\n
\n
$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=xxh64 -ac ./linux-5.6 /tmp/\n3\n\nreal    1m5.520s\nuser    0m2.507s\nsys     0m13.625s
\n
\n
\n
\n

\u5927\u304d\u3081\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3082\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e4GB\u7a0b\u306eiso\u30d5\u30a1\u30a4\u30eb1\u3064\u3067\u3059\uff0emd4, md5 \u306f\u3042\u307e\u308a\u4ee3\u308f\u308a\u307e\u305b\u3093\u304c\uff0cxxh64 \u306f\u304b\u306a\u308a\u9ad8\u901f\u3067\u3059\u306d\uff0e

\n
\n
\n
md4
\n
\n
$ ls -s ./Parrot-security-4.9.1_x64.iso*\n3909164 ./Parrot-security-4.9.1_x64.iso  3909164 ./Parrot-security-4.9.1_x64.iso2\n$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=md4 -ac ./Parrot-security-4.9.1_x64.iso ./Parrot-security-4.9.1_x\n64.iso2\n3\n\nreal    0m23.276s\nuser    0m10.601s\nsys     0m4.387s
\n
\n
\n
\n
md5
\n
\n
$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=md5 -ac ./Parrot-security-4.9.1_x64.iso ./Parrot-security-4.9.1_x64.iso2\n3\n\nreal    0m28.150s\nuser    0m16.945s\nsys     0m4.399s
\n
\n
\n
\n
xxh64
\n
\n
$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=xxh64 -ac ./Parrot-security-4.9.1_x64.iso ./Parrot-security-4.9.1_x64.iso2\n3\n\nreal    0m12.767s\nuser    0m1.375s\nsys     0m4.060s
\n
\n
\n
\n

\u3053\u306e\u8fba\u306e\u901f\u5ea6\u306f\u74b0\u5883\u306b\u3088\u308a\u5927\u5206\u5909\u308f\u308b\u3068\u601d\u3046\u306e\u3067\u53c2\u8003\u7a0b\u5ea6\u306b\uff0e

\n
\n
\n
\n
\n
\n

–compress-choice=STR, –zc=STR

\n
\n
\n

--compress \u30aa\u30d7\u30b7\u30e7\u30f3\u5229\u7528\u6642\u306e\u5727\u7e2e\u5f62\u5f0f\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u5727\u7e2e\u5f62\u5f0f\u306frsync 3.2.0 \u540c\u58eb\u3067\u306f zlibx \u5f62\u5f0f\u304c zlib \u5f62\u5f0f\u3088\u308a\u3082\u512a\u5148\u3055\u308c\u308b\u3088\u3046\u3067\u3059\uff0e
\n\u9078\u629e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f zstd, lz4, zlibx, zlib, none \u306e\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n
man(1)\u3088\u308a
\n
\n
              o      zstd\n              o      lz4\n              o      zlibx\n              o      zlib\n              o      none
\n
\n
\n
\n

rsync --version \u3067\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e

\n
\n
\n
\n
$ rsync --version | grep Compress -A1\nCompress list:\n    zstd lz4 zlibx zlib none
\n
\n
\n
\n

configure oprion \u306b --disable-zstd, --disable-lz4 \u304c\u3042\u308a\u307e\u3059\uff0e

\n
\n
\n
\n
  --disable-zstd          disable zstd compression\n  --disable-lz4           disable LZ4 compression
\n
\n
\n
\n

\u74b0\u5883\u5909\u6570 RSYNC_COMPRESS_LIST \u3067\u3082\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u672a\u5bfe\u5fdc\u306e 3.1.3 \u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3068 unknown option \u3068\u8a00\u308f\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
$ time rsync --compress-choice=zstd --compress -a ./hoge mk@x201i.local:/tmp/\nrsync: on remote machine: --compress-choice=zstd: unknown option\nrsync error: syntax or usage error (code 1) at main.c(1596) [server=3.1.3]\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.2.0]
\n
\n
\n
\n

\u3053\u3061\u3089\u3082\u7c21\u5358\u306b\u30d9\u30f3\u30c1\u3092\uff0e\u3067\u3082Wi-Fi\u74b0\u5883\u3060\u3057\u53c2\u8003\u7a0b\u5ea6\u306b\uff0e

\n
\n
\n
zstd
\n
\n
$ ssh user@remote rm -rf ~/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=zstd --compress -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal    4m38.921s\nuser    0m24.463s\nsys     0m7.182s
\n
\n
\n
\n
lz4
\n
\n
$ ssh user@remote rm -rf ~user/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=lz4 --compress -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal    9m28.829s\nuser    0m4.878s\nsys     0m6.177s
\n
\n
\n
\n
zlibx
\n
\n
$ ssh user@remote rm -rf ~user/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=zlibx --compress -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal    5m21.702s\nuser    0m46.740s\nsys     0m6.541s
\n
\n
\n
\n
zlib
\n
\n
$ ssh user@remote rm -rf ~user/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=zlib --compress -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal    5m28.722s\nuser    0m45.861s\nsys     0m6.381s
\n
\n
\n
\n
none
\n
\n
$ ssh user@remote rm -rf ~user/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=none -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal    22m56.712s\nuser    0m1.848s\nsys     0m7.323s
\n
\n
\n
\n

–debug=NSTR

\n
\n

\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u3068\u5727\u7e2e\u306e\u8a73\u7d30\u3092\u8868\u793a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u3088\u3046\u3067\u3059\uff0e\u3069\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u304b\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e

\n
\n
\n
–debug=NSTR \u3092\u4ed8\u3051\u305f\u3068\u304d\u306e\u306e\u5b9f\u884c\u7d50\u679c\u4f8b
\n
\n
Client negotiated checksum: xxh64\nClient compress: zstd (level 3)
\n
\n
\n
\n
\n

–debug=OPTS, -M\u2014\u200bdebug=OPTS

\n
\n

--debug=OPTS \u3092\u4f7f\u3046\u3068\u30ea\u30e2\u30fc\u30c8\u306ersync\u306b\u30c7\u30d0\u30c3\u30b0\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9001\u3089\u306a\u304f\u306a\u308b\u3088\u3046\u3067\u3059\uff0e\u3053\u308c\u306b\u3088\u308a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3068\u30b5\u30fc\u30d0\u5074\u3067\u7570\u306a\u308b\u30c7\u30d0\u30c3\u30b0\u30ec\u30d9\u30eb\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305d\u3046\u3067\u3059\uff0e
\n\u30ea\u30e2\u30fc\u30c8\u5074\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9001\u308b\u5834\u5408\u306b\u306f -M\u2014\u200bdebug=OPTS

\n
\n
\n
\n

SIGINFO & SIGVTALRM

\n
\n

rsync\u30d7\u30ed\u30bb\u30b9\u306b SIGINFO & SIGVTALRM \u30b7\u30b0\u30ca\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0eLinux\u306f SIGINFO \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\uff0c SIGVTALRM \u3092\u8a66\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
rsync\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u72b6\u614b\u3067 SIGVTALRM \u3092\u9001\u4fe1
\n
\n
$ pkill -SIGVTALRM rsync
\n
\n
\n
\n
rsync\u304c\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a
\n
\n
linux-5.6/arch/sparc/lib/lshrdi3.S\n    114,384,392  81%  931.12kB/s    0:01:59 (xfr#21058, ir-chk=1030/23451)
\n
\n
\n
\n
\n

–copy-as=USER[:GROUP]

\n
\n

\u6307\u5b9a\u30e6\u30fc\u30b6/\u30b0\u30eb\u30fc\u30d7\u6a29\u9650\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n
\u30b3\u30d4\u30fc\u5143\u306b3\u30e6\u30fc\u30b6\u306e\u30d5\u30a1\u30a4\u30eb
\n
\n
$ ls -Al /tmp/rsync-test/\ntotal 0\n-rw-r--r-- 1 matoken  matoken  0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 root     root     0 Jun 25 18:51 root\n-rw-r--r-- 1 www-data www-data 0 Jun 25 18:51 www-data
\n
\n
\n
\n
\u666e\u901a\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3068\u30e6\u30fc\u30b6\u304c\u5f15\u304d\u7d99\u304c\u308c\u308b
\n
\n
$ sudo ./rsync -a /tmp/rsync-test/ /tmp/rsync-test2\n$ ls -lA /tmp/rsync-test2\ntotal 0\n-rw-r--r-- 1 matoken  matoken  0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 root     root     0 Jun 25 18:51 root\n-rw-r--r-- 1 www-data www-data 0 Jun 25 18:51 www-data
\n
\n
\n
\n
--copy-as=matoken \u3092\u6307\u5b9a\u3059\u308b\u3068\u3059\u3079\u3066matoken\u306b\u306a\u308b
\n
\n
$ sudo \\rm -rf /tmp/rsync-test2\n$ sudo ./rsync --copy-as=matoken -a /tmp/rsync-test/ /tmp/rsync-test2\n$ ls -lA /tmp/rsync-test2\ntotal 0\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:51 root\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:51 www-data
\n
\n
\n
\n
\n

-V

\n
\n

--version \u306e\u77ed\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066 -V \u304c\u5165\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ ./rsync --help|grep -- -V\n--version, -V            print the version + other info and exit\n$ ./rsync --help|grep \\-V\ngrep (GNU grep) 3.4\nCopyright (C) 2020 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nWritten by Mike Haertel and others; see\n<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
\n
\n
\n
\n
\n

–ipv4, -4 / –ipv6, -6

\n
\n

ipv4, ipv6 \u3092\u6307\u5b9a\u3057\u305f\u3044\u3068\u304d\u306b rsh='ssh -4' \u3068\u3059\u308b\u3088\u308a\u4fbf\u5229\u306a --ipv4, -4, --ipv6, -6 \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5165\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
ipv4\u3057\u304b\u306a\u3044\u74b0\u5883\u3067 -6 \u3092\u6307\u5b9a\u3057\u3066\u5931\u6557\u3059\u308b
\n
\n
$ rsync -avc6 ./ user@remote:/tmp/\nssh: Could not resolve hostname remote: Name or service not known\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: unexplained error (code 255) at io.c(235) [sender=3.2.1]
\n
\n
\n
\n
\n
\n", "content_text": "\u30d5\u30a1\u30a4\u30eb\u540c\u671f\u306b\u3068\u3066\u3082\u4fbf\u5229\u306arsync\u306e3.2.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\uff0e\n\n\n\nrsync\n\n\n\n\u30d0\u30b0\u30d5\u30a3\u30af\u30b9\u3084\uff0c\u3044\u304f\u3064\u304b\u306e\u65b0\u6a5f\u80fd\u304c\u5165\u3063\u305f\u3088\u3046\u306a\u306e\u3067\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\u203b1. \u3053\u306e\u8a18\u4e8b\u6295\u7a3f\u6642\u306b\u306f 3.2.2 \u304c\u51fa\u3066\u3044\u307e\u3059\uff0e\n\u203b2. \u9e7f\u5150\u5cf6Linux\u52c9\u5f37\u4f1a 2020.06\u3067\u767a\u8868\u3057\u305f\u3082\u306e\u3068\u540c\u3058\u5185\u5bb9\u3067\u3059\uff0e\n\nView more on edocr\n\n\n\n\n\n\u5c0e\u5165\u4f8b\n\n\nDebian sid amd64 & Ubuntu 20.04 LTS amd64\n\n\n$ sudo apt build-dep rsync\n$ sudo apt install libxxhash-dev libzstd-dev liblz4-dev\n$ wget -c \\\nhttps://download.samba.org/pub/rsync/rsync-3.2.0.tar.gz \\\nhttps://download.samba.org/pub/rsync/rsync-3.2.0.tar.gz.asc \\\nhttps://opencoder.net/WayneDavison.key\n$ gpg2 --import ./WayneDavison.key\n$ gpg2 --verify ./rsync-3.2.0.tar.gz.asc\n$ tar tvzf ./rsync-3.2.0.tar.gz\n$ tar xzf ./rsync-3.2.0.tar.gz\n$ cd rsync-3.2.0\n$ ./configure --help\n$ ./configure\n$ make\n$ ./rsync --version\nrsync version 3.2.0 protocol version 31\nCopyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others.\nWeb site: http://rsync.samba.org/\nCapabilities:\n 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,\n socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append,\n ACLs, xattrs, iconv, symtimes, prealloc, SIMD\nChecksum list:\n xxh64 (xxhash) md5 md4 none\nCompress list:\n zstd lz4 zlibx zlib none\n\nrsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you\nare welcome to redistribute it under certain conditions. See the GNU\nGeneral Public Licence for details.\n\n\n\n\n\n\n\nNote\n\n\ngpg\u9375\u306f\u6b21\u304b\u3089\u5165\u624b\u3067\u304d\u307e\u3059\uff0ersync download\n\n\n\n\n\n\nRaspberri Pi OS amd64\n\nRaspberry Pi OS arm64\u306e\u5834\u5408 libzstd-dev \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 1.3.8+dfsg-3 \u3068\u5c11\u3057\u53e4\u304fbuild\u306b\u5931\u6557\u3057\u307e\u3059\uff0e ./configure --disable-zstd \u3068\u3057\u3066zstd\u3092\u7121\u52b9\u306b\u3059\u308b\u304b\uff0csource\u304b\u3089 zstd 1.4.5 \u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067build\u51fa\u6765\u307e\u3057\u305f\uff0e\n\n\n\n$ make\n :\ntoken.c: In function \u2018init_compression_level\u2019:\ntoken.c:73:40: warning: implicit declaration of function \u2018ZSTD_minCLevel\u2019; did you mean \u2018ZSTD_maxCLevel\u2019? [-Wimplicit-function-declaration]\n min_level = skip_compression_level = ZSTD_minCLevel();\n ^~~~~~~~~~~~~~\n ZSTD_maxCLevel\ntoken.c: In function \u2018send_zstd_token\u2019:\ntoken.c:685:2: error: unknown type name \u2018ZSTD_EndDirective\u2019; did you mean \u2018ZSTD_DDict\u2019?\n ZSTD_EndDirective flush = ZSTD_e_continue;\n ^~~~~~~~~~~~~~~~~\n ZSTD_DDict\ntoken.c:685:28: error: \u2018ZSTD_e_continue\u2019 undeclared (first use in this function)\n ZSTD_EndDirective flush = ZSTD_e_continue;\n ^~~~~~~~~~~~~~~\ntoken.c:685:28: note: each undeclared identifier is reported only once for each function it appears in\ntoken.c:701:3: warning: implicit declaration of function \u2018ZSTD_CCtx_setParameter\u2019 [-Wimplicit-function-declaration]\n ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_compressionLevel, do_compression_level);\n ^~~~~~~~~~~~~~~~~~~~~~\ntoken.c:701:37: error: \u2018ZSTD_c_compressionLevel\u2019 undeclared (first use in this function); did you mean \u2018skip_compression_level\u2019?\n ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_compressionLevel, do_compression_level);\n ^~~~~~~~~~~~~~~~~~~~~~~\n skip_compression_level\ntoken.c:751:13: error: \u2018ZSTD_e_flush\u2019 undeclared (first use in this function); did you mean \u2018ZSTD_DCtx_s\u2019?\n flush = ZSTD_e_flush;\n ^~~~~~~~~~~~\n ZSTD_DCtx_s\ntoken.c:753:8: warning: implicit declaration of function \u2018ZSTD_compressStream2\u2019; did you mean \u2018ZSTD_compressStream\u2019? [-Wimplicit-function-declaration]\n r = ZSTD_compressStream2(zstd_cctx, &zstd_out_buff, &zstd_in_buff, flush);\n ^~~~~~~~~~~~~~~~~~~~\n ZSTD_compressStream\n$ cd ..\n$ sudo apt remove libzstd-dev\n$ wget https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz \\\nhttps://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz.sha256\n$ sha256sum -c ./zstd-1.4.5.tar.gz.sha256\n$ tar tvf ./zstd-1.4.5.tar.gz | lv\n$ tar xf ./zstd-1.4.5.tar.gz\n$ cd zstd-1.4.5\n$ make\n$ sudo make install\n$ cd ../rsync-3.2.0\n$ ./configure && make\n\n\n\n\nDebian sid amd64\n\nDebian sid amd64 \u74b0\u5883\u306b\u306f\u3059\u3067\u306b\u964d\u3063\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u304b\u3089\u5c0e\u5165\u3059\u308b\u3060\u3051\u3067OK\u3067\u3059\uff0e\n\n\n\n$ sudo apt install rsync\n$ rsync --version\nrsync version 3.2.0 protocol version 31\nCopyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others.\nWeb site: http://rsync.samba.org/\nCapabilities:\n 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,\n socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append,\n ACLs, xattrs, iconv, symtimes, prealloc, SIMD\nChecksum list:\n xxh64 (xxhash) md5 md4 none\nCompress list:\n zstd lz4 zlibx zlib none\n\nrsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you\nare welcome to redistribute it under certain conditions. See the GNU\nGeneral Public Licence for details.\n$ dpkg-query -W rsync\nrsync 3.2.0-1\n\n\n\n\u3063\u3066\u3053\u3068\u3067\u8a66\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0eNEWS\u3092\u898b\u3066\u307f\u307e\u3059\uff0e\n\n\n\nNEWS\n\n\n\n\n\n\nBUG FIX\n\n\n\n\nAvoid a hang when an overabundance of messages clogs up all the I/O buffers.\n\n\n\n\n\u3053\u306e\u30d0\u30b0\u4fee\u6b63\u304c\u3061\u3087\u3063\u3068\u6c17\u306b\u306a\u308a\u307e\u3059\uff0efat32\u306e\u5236\u9650\u306b\u5f15\u3063\u304b\u304b\u3063\u305f\u3068\u304d\u306b\u5e30\u3063\u3066\u3053\u306a\u3044\u554f\u984c\u3082\u3053\u308c\u3067\u89e3\u6c7a\u3057\u3066\u308b\u304b\u3082?\u672a\u78ba\u8a8d\uff0e\n\n\n\nHDD\u30c7\u30fc\u30bf\u5fa9\u65e7\u6642\u306bFAT32\u306e\u5236\u9650\u306b\u5d4c\u3063\u305f\u30e1\u30e2 \u2013 matoken\u2019s meme\n\n\n\n\n\nENHANCEMENTS\n\n\n–checksum-choice=STR, –cc=STR\n\n\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u5f62\u5f0f\u3092\u9078\u3079\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e\u73fe\u5728\u9078\u629e\u3067\u304d\u308b\u306e\u306f xxh64/md5/md4 \u306e3\u7a2e\u985e or none or auto(\u65e2\u5b9a\u5024)\n\n\nman(1)\u3088\u308a\n\n o auto (the default)\n o xxh64 (aka xxhash)\n o md5\n o md4\n o none\n\n\n\n--version \u306b\u3082\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e\n\n\n\n$ rsync --version | grep Checksum -A1\nChecksum list:\n xxh64 (xxhash) md5 md4 none\n\n\n\nconfigure option \u306b --disable-xxhash \u304c\u3042\u308a\u307e\u3057\u305f\uff0e\n\n\n\n --disable-xxhash disable xxhash checksums\n\n\n\n\u74b0\u5883\u5909\u6570 RSYNC_CHECKSUM_LIST \u3067\u3082\u6307\u5b9a\u3067\u304d\u307e\u3059\uff0e\u30aa\u30d7\u30b7\u30e7\u30f3 --checksum-choice \u304c\u3042\u308b\u5834\u5408\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307b\u3046\u304c\u512a\u5148\u306a\u3088\u3046\u3067\u3059\uff0e\n\n\n\u3061\u306a\u307f\u306b --checksum-choice \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044 3.1.3 \u306b\u5bfe\u3057\u3066 xxh64 \u3092\u5411\u3051\u3066\u53e9\u3044\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\uff0e(md4, md5 \u306fok)\n\n\n\n$ rsync --checksum-choice=xxh64 -avc ./* user@remote:/tmp/\nunknown checksum name: xxh64\nrsync error: requested action not supported (code 4) at checksum.c(73) [server=3.1.3]\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.2.0]\n\n\n\n\u6642\u9593\u304c\u3069\u306e\u304f\u3089\u3044\u5909\u308f\u308b\u304b\u3061\u3087\u3046\u3069\u8ee2\u304c\u3063\u3066\u3044\u305fkernel source(\u5c0f\u3055\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u6ca2\u5c71)\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u306f\u3058\u3081\u666e\u901a\u306b\u540c\u671f\u3057\u305f\u5f8c\uff0c\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2\u3057\u3066 md4, md5, xxh64 \u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u601d\u3063\u305f\u3088\u308a\u5dee\u304c\u51fa\u306a\u3044\u611f\u3058?\n\n\nmd4\n\n$ find ./linux-5.6 | wc -l\n82114\n$ du -ms ./linux-5.6\n1310 ./linux-5.6\n$ rsync --checksum-choice=auto -ac ./linux-5.6 /tmp/\n$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=md4 -ac ./linux-5.6 /tmp/\n3\n\nreal 0m52.393s\nuser 0m5.051s\nsys 0m12.246s\n\n\n\nmd5\n\n$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=md5 -ac ./linux-5.6 /tmp/\n3\n\nreal 0m57.716s\nuser 0m6.976s\nsys 0m13.486s\n\n\n\nxxh64\n\n$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=xxh64 -ac ./linux-5.6 /tmp/\n3\n\nreal 1m5.520s\nuser 0m2.507s\nsys 0m13.625s\n\n\n\n\u5927\u304d\u3081\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3082\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e4GB\u7a0b\u306eiso\u30d5\u30a1\u30a4\u30eb1\u3064\u3067\u3059\uff0emd4, md5 \u306f\u3042\u307e\u308a\u4ee3\u308f\u308a\u307e\u305b\u3093\u304c\uff0cxxh64 \u306f\u304b\u306a\u308a\u9ad8\u901f\u3067\u3059\u306d\uff0e\n\n\nmd4\n\n$ ls -s ./Parrot-security-4.9.1_x64.iso*\n3909164 ./Parrot-security-4.9.1_x64.iso 3909164 ./Parrot-security-4.9.1_x64.iso2\n$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=md4 -ac ./Parrot-security-4.9.1_x64.iso ./Parrot-security-4.9.1_x\n64.iso2\n3\n\nreal 0m23.276s\nuser 0m10.601s\nsys 0m4.387s\n\n\n\nmd5\n\n$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=md5 -ac ./Parrot-security-4.9.1_x64.iso ./Parrot-security-4.9.1_x64.iso2\n3\n\nreal 0m28.150s\nuser 0m16.945s\nsys 0m4.399s\n\n\n\nxxh64\n\n$ sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches ; time rsync --checksum-choice=xxh64 -ac ./Parrot-security-4.9.1_x64.iso ./Parrot-security-4.9.1_x64.iso2\n3\n\nreal 0m12.767s\nuser 0m1.375s\nsys 0m4.060s\n\n\n\n\u3053\u306e\u8fba\u306e\u901f\u5ea6\u306f\u74b0\u5883\u306b\u3088\u308a\u5927\u5206\u5909\u308f\u308b\u3068\u601d\u3046\u306e\u3067\u53c2\u8003\u7a0b\u5ea6\u306b\uff0e\n\n\n\n\n\n–compress-choice=STR, –zc=STR\n\n\n--compress \u30aa\u30d7\u30b7\u30e7\u30f3\u5229\u7528\u6642\u306e\u5727\u7e2e\u5f62\u5f0f\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\u5727\u7e2e\u5f62\u5f0f\u306frsync 3.2.0 \u540c\u58eb\u3067\u306f zlibx \u5f62\u5f0f\u304c zlib \u5f62\u5f0f\u3088\u308a\u3082\u512a\u5148\u3055\u308c\u308b\u3088\u3046\u3067\u3059\uff0e\n\u9078\u629e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f zstd, lz4, zlibx, zlib, none \u306e\u3088\u3046\u3067\u3059\uff0e\n\n\nman(1)\u3088\u308a\n\n o zstd\n o lz4\n o zlibx\n o zlib\n o none\n\n\n\nrsync --version \u3067\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e\n\n\n\n$ rsync --version | grep Compress -A1\nCompress list:\n zstd lz4 zlibx zlib none\n\n\n\nconfigure oprion \u306b --disable-zstd, --disable-lz4 \u304c\u3042\u308a\u307e\u3059\uff0e\n\n\n\n --disable-zstd disable zstd compression\n --disable-lz4 disable LZ4 compression\n\n\n\n\u74b0\u5883\u5909\u6570 RSYNC_COMPRESS_LIST \u3067\u3082\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\u672a\u5bfe\u5fdc\u306e 3.1.3 \u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3068 unknown option \u3068\u8a00\u308f\u308c\u307e\u3059\uff0e\n\n\n\n$ time rsync --compress-choice=zstd --compress -a ./hoge mk@x201i.local:/tmp/\nrsync: on remote machine: --compress-choice=zstd: unknown option\nrsync error: syntax or usage error (code 1) at main.c(1596) [server=3.1.3]\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.2.0]\n\n\n\n\u3053\u3061\u3089\u3082\u7c21\u5358\u306b\u30d9\u30f3\u30c1\u3092\uff0e\u3067\u3082Wi-Fi\u74b0\u5883\u3060\u3057\u53c2\u8003\u7a0b\u5ea6\u306b\uff0e\n\n\nzstd\n\n$ ssh user@remote rm -rf ~/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=zstd --compress -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal 4m38.921s\nuser 0m24.463s\nsys 0m7.182s\n\n\n\nlz4\n\n$ ssh user@remote rm -rf ~user/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=lz4 --compress -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal 9m28.829s\nuser 0m4.878s\nsys 0m6.177s\n\n\n\nzlibx\n\n$ ssh user@remote rm -rf ~user/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=zlibx --compress -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal 5m21.702s\nuser 0m46.740s\nsys 0m6.541s\n\n\n\nzlib\n\n$ ssh user@remote rm -rf ~user/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=zlib --compress -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal 5m28.722s\nuser 0m45.861s\nsys 0m6.381s\n\n\n\nnone\n\n$ ssh user@remote rm -rf ~user/tmp/linux-5.6; echo 3 | sudo tee /proc/sys/vm/drop_caches; time rsync --compress-choice=none -a --rsync-path=~/src/rsync-3.2.0/rsync ~/src/linux-5.6 user@remote:~/tmp/\n3\n\nreal 22m56.712s\nuser 0m1.848s\nsys 0m7.323s\n\n\n\n–debug=NSTR\n\n\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u3068\u5727\u7e2e\u306e\u8a73\u7d30\u3092\u8868\u793a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u3088\u3046\u3067\u3059\uff0e\u3069\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u304b\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e\n\n\n–debug=NSTR \u3092\u4ed8\u3051\u305f\u3068\u304d\u306e\u306e\u5b9f\u884c\u7d50\u679c\u4f8b\n\nClient negotiated checksum: xxh64\nClient compress: zstd (level 3)\n\n\n\n\n–debug=OPTS, -M\u2014\u200bdebug=OPTS\n\n--debug=OPTS \u3092\u4f7f\u3046\u3068\u30ea\u30e2\u30fc\u30c8\u306ersync\u306b\u30c7\u30d0\u30c3\u30b0\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9001\u3089\u306a\u304f\u306a\u308b\u3088\u3046\u3067\u3059\uff0e\u3053\u308c\u306b\u3088\u308a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3068\u30b5\u30fc\u30d0\u5074\u3067\u7570\u306a\u308b\u30c7\u30d0\u30c3\u30b0\u30ec\u30d9\u30eb\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305d\u3046\u3067\u3059\uff0e\n\u30ea\u30e2\u30fc\u30c8\u5074\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9001\u308b\u5834\u5408\u306b\u306f -M\u2014\u200bdebug=OPTS\n\n\n\nSIGINFO & SIGVTALRM\n\nrsync\u30d7\u30ed\u30bb\u30b9\u306b SIGINFO & SIGVTALRM \u30b7\u30b0\u30ca\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0eLinux\u306f SIGINFO \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\uff0c SIGVTALRM \u3092\u8a66\u3057\u307e\u3057\u305f\uff0e\n\n\nrsync\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u72b6\u614b\u3067 SIGVTALRM \u3092\u9001\u4fe1\n\n$ pkill -SIGVTALRM rsync\n\n\n\nrsync\u304c\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a\n\nlinux-5.6/arch/sparc/lib/lshrdi3.S\n 114,384,392 81% 931.12kB/s 0:01:59 (xfr#21058, ir-chk=1030/23451)\n\n\n\n\n–copy-as=USER[:GROUP]\n\n\u6307\u5b9a\u30e6\u30fc\u30b6/\u30b0\u30eb\u30fc\u30d7\u6a29\u9650\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\u30b3\u30d4\u30fc\u5143\u306b3\u30e6\u30fc\u30b6\u306e\u30d5\u30a1\u30a4\u30eb\n\n$ ls -Al /tmp/rsync-test/\ntotal 0\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 root root 0 Jun 25 18:51 root\n-rw-r--r-- 1 www-data www-data 0 Jun 25 18:51 www-data\n\n\n\n\u666e\u901a\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3068\u30e6\u30fc\u30b6\u304c\u5f15\u304d\u7d99\u304c\u308c\u308b\n\n$ sudo ./rsync -a /tmp/rsync-test/ /tmp/rsync-test2\n$ ls -lA /tmp/rsync-test2\ntotal 0\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 root root 0 Jun 25 18:51 root\n-rw-r--r-- 1 www-data www-data 0 Jun 25 18:51 www-data\n\n\n\n--copy-as=matoken \u3092\u6307\u5b9a\u3059\u308b\u3068\u3059\u3079\u3066matoken\u306b\u306a\u308b\n\n$ sudo \\rm -rf /tmp/rsync-test2\n$ sudo ./rsync --copy-as=matoken -a /tmp/rsync-test/ /tmp/rsync-test2\n$ ls -lA /tmp/rsync-test2\ntotal 0\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:51 root\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:51 www-data\n\n\n\n\n-V\n\n--version \u306e\u77ed\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066 -V \u304c\u5165\u308a\u307e\u3057\u305f\uff0e\n\n\n\n$ ./rsync --help|grep -- -V\n--version, -V print the version + other info and exit\n$ ./rsync --help|grep \\-V\ngrep (GNU grep) 3.4\nCopyright (C) 2020 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nWritten by Mike Haertel and others; see\n<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.\n\n\n\n\n–ipv4, -4 / –ipv6, -6\n\nipv4, ipv6 \u3092\u6307\u5b9a\u3057\u305f\u3044\u3068\u304d\u306b rsh='ssh -4' \u3068\u3059\u308b\u3088\u308a\u4fbf\u5229\u306a --ipv4, -4, --ipv6, -6 \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5165\u308a\u307e\u3057\u305f\uff0e\n\n\nipv4\u3057\u304b\u306a\u3044\u74b0\u5883\u3067 -6 \u3092\u6307\u5b9a\u3057\u3066\u5931\u6557\u3059\u308b\n\n$ rsync -avc6 ./ user@remote:/tmp/\nssh: Could not resolve hostname remote: Name or service not known\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: unexplained error (code 255) at io.c(235) [sender=3.2.1]", "date_published": "2020-07-17T06:40:12+09:00", "date_modified": "2020-07-17T06:42:54+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "rsync", "Buster", "Debian", "Focal Fossa(20.04)", "Linux", "Raspberry Pi OS", "sid", "Ubuntu" ] }, { "id": "http://matoken.org/blog/?p=2810", "url": "https://matoken.org/blog/2020/06/12/calculate-the-address-to-use-in-tor-hidden-service-vanity-addresses/", "title": "tor\u306ehidden service\u3067\u4f7f\u3046\u30a2\u30c9\u30ec\u30b9\u3092\u8a08\u7b97\u3059\u308b(Vanity Addresses)", "content_html": "
\n
\n
\n

\u6700\u8fd1\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u8aad\u307f\u307e\u3057\u305f\uff0e

\n
\n\n
\n

\u4eca\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306f\u30c9\u30e1\u30a4\u30f3\u983c\u308a\u306a\u5272\u306b\u5358\u4e00\u969c\u5bb3\u70b9\u3068\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3042\u307e\u308a\u3088\u308d\u3057\u304f\u306a\u3044\uff0e\u3067\u3082\u9003\u3052\u9053\u304c\u3042\u307e\u308a\u306a\u3044\u306e\u3067\u3059\u3088\u306d\u2026\u2026\uff0e
\n\u3068\u308a\u3042\u3048\u305a\u4ee5\u524d\u304b\u3089\u305d\u306e\u3046\u3061\u3084\u308d\u3046\u3068\u601d\u3063\u3066\u653e\u7f6e\u3057\u3066\u3044\u305ftor\u306ehidden service\u3067\u30df\u30e9\u30fc\u3092\u7acb\u3066\u308b\u306e\u3092\u3084\u3063\u3066\u307f\u3088\u3046\u304b\u306a\u3068\u601d\u3044\u7acb\u3061\u307e\u3057\u305f\uff0e

\n
\n
\n

\u3068\u308a\u3042\u3048\u305a /etc/tor/torrc \u3067\u4ee5\u4e0b\u306e\u3042\u305f\u308a\u3092\u6709\u52b9\u306b\u3057\u3066tor\u3092\u518d\u8d77\u52d5\u3057\u3066httpd\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3060\u3051\u3067\u52d5\u304d\u307e\u3059\uff0e

\n
\n
\n
\n
HiddenServiceDir /var/lib/tor/hidden_service/\nHiddenServicePort 80 127.0.0.1:80
\n
\n
\n
\n

\u3053\u306e\u3068\u304d\u306e\u30a2\u30c9\u30ec\u30b9\u306ftor\u518d\u8d77\u52d5\u5f8c\u306b HiddenServiceDir \u4ee5\u4e0b\u306b\u4f5c\u3089\u308c\u308b hostname \u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306e\u540d\u524d\u306b\u306a\u308a\u307e\u3059\uff0e

\n
\n
\n
\n
$ sudo cat /var/lib/tor/hidden_service/hostname\ntbiettfnprnqpoccrz3ll7hioprbyjoam2n6okihpadf5ukaa4hwrwad.onion
\n
\n
\n
\n

\u3053\u306e\u30a2\u30c9\u30ec\u30b9\u306f[a-z|3-7]\u306e32\u6587\u5b57(BASE32)\u304b\u3089\u306a\u308b16\u6587\u5b57\u306e onion v2 \u30a2\u30c9\u30ec\u30b9\u3068\uff0c56\u6587\u5b57\u306e onion v3 \u30a2\u30c9\u30ec\u30b9\u304c\u3042\u3063\u3066\uff0c\u6700\u8fd1\u306f\u5f8c\u8005\u306ev3\u30a2\u30c9\u30ec\u30b9\u304c\u898f\u5b9a\u5024\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\u9375\u306f RSA \u304b\u3089 ed25519 \u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e

\n
\n
\n

Onion v2 \u306f\u30db\u30b9\u30c8\u30cd\u30fc\u30e0\u304b\u3089\u79d8\u5bc6\u9375\u3092\u6c42\u3081\u308b\u306e\u306b\u73fe\u5b9f\u7684\u306a\u6642\u9593\u3067\u6e08\u3080\u306e\u304c\u8fd1\u3065\u3044\u3066\u304d\u3066\u3044\u308b\u3088\u3046\u306a\u306e\u3067\u3068\u3066\u3082\u9577\u304f\u3066\u4f7f\u3044\u3065\u3089\u3044\u3067\u3059\u304c\u3053\u308c\u304b\u3089\u306fOnion v3 \u30a2\u30c9\u30ec\u30b9\u306b\u3057\u305f\u307b\u3046\u304c\u826f\u3055\u305d\u3046\u3067\u3059\uff0e
\n\u4eca\u306fv2,v3 \u3092\u4f75\u7528\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3082\u591a\u3044\u3088\u3046\u3067\u3059\uff0e

\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Onion v2Onion v3
\n

hostname\u6587\u5b57\u9577

\n
\n

16

\n
\n

56

\n
\n

\u9375\u5f62\u5f0f

\n
\n

RSA

\n
\n

ed25519

\n
\n

\u9375\u30d5\u30a1\u30a4\u30eb\u540d

\n
\n

private_key

\n
\n

hs_ed25519_secret_key hs_ed25519_public_key

\n
\n
\n

(\u7121\u99c4\u306b)\u30a2\u30c9\u30ec\u30b9\u3092\u8a08\u7b97\u3057\u3066\u597d\u307f\u306e\u5358\u8a9e\u306b\u30de\u30c3\u30c1\u3057\u305f\u3082\u306e\u3092\u63a2\u3059(\u4f8b\u3048\u3070matoken\u304b\u3089\u59cb\u307e\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u63a2\u3059\u3068\u304b)\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\uff0e
\n\u3053\u3046\u3044\u3063\u305f\u30a2\u30c9\u30ec\u30b9\u306fVanity Addresses \u3068\u3044\u3046\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u4ed6\u306b\u3082\u30a2\u30c9\u30ec\u30b9\u3092\u58f2\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u3082\u3042\u308a\u307e\u3059\u304c\uff0c\u76f8\u624b\u306f\u79d8\u5bc6\u9375\u3092\u6301\u3063\u3066\u3044\u308b\u308f\u3051\u3067\u3042\u307e\u308a\u3088\u304f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\uff0e

\n
\n
\n
\n
\n

Onion v2 \u30a2\u30c9\u30ec\u30b9\u3092 eschalot \u3067\u63a2\u3059

\n
\n
\n
\n
\n

add 2020-07-28)

\n
\n
\n

Onion v2 \u30a2\u30c9\u30ec\u30b9\u306f2021\u5e7411\u6708\u3042\u305f\u308a\u3067\u4f7f\u3048\u306a\u304f\u306a\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n\n
\n
\n
\n

Onion v2 \u30a2\u30c9\u30ec\u30b9\u3092 eschalot \u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u307f\u307e\u3059\uff0e

\n
\n\n
\n
\u5c0e\u5165
\n
\n
$ sudo apt install libssl-dev\n$ git clone https://github.com/ReclaimYourPrivacy/eschalot\n$ cd eschalot\n$ make\n$ ./eschalot\nVersion: 1.2.0\n\nusage:\neschalot [-c] [-v] [-t count] ([-n] [-l min-max] -f filename) | (-r regex) | (-p prefix)\n  -v         : verbose mode - print extra information to STDERR\n  -c         : continue searching after the hash is found\n  -t count   : number of threads to spawn default is one)\n  -l min-max : look for prefixes that are from 'min' to 'max' characters long\n  -n         : Allow digits to be part of the prefix (affects wordlist mode only)\n  -f filename: name of the text file with a list of prefixes\n  -p prefix  : single prefix to look for (1-16 characters long)\n  -r regex   : search for a POSIX-style regular expression\n\nExamples:\n  eschalot -cvt4 -l8-12 -f wordlist.txt >> results.txt\n  eschalot -v -r '^test|^exam'\n  eschalot -ct5 -p test\n\n  base32 alphabet allows letters [a-z] and digits [2-7]\n  Regex pattern examples:\n    xxx           must contain 'xxx'\n    ^foo          must begin with 'foo'\n    bar$          must end with 'bar'\n    b[aoeiu]r     must have a vowel between 'b' and 'r'\n    '^ab|^cd'     must begin with 'ab' or 'cd'\n    [a-z]{16}     must contain letters only, no digits\n    ^dusk.*dawn$  must begin with 'dusk' and end with 'dawn'\n    [a-z2-7]{16}  any name - will succeed after one iteration
\n
\n
\n
\n

\u4ee5\u4e0b\u306f -t \u3067\u30b9\u30ec\u30c3\u30c9\u6570\u3092\u6307\u5b9a\uff0c-v \u3067\u5197\u9577\u51fa\u529b\uff0c-p \u3067 abc \u65b9\u59cb\u307e\u308b\u30db\u30b9\u30c8\u540d\u3092\u63a2\u3057\u3066\u3044\u307e\u3059\uff0e
\n\u898b\u3064\u304b\u308b\u3068\u6a19\u6e96\u51fa\u529b\u306b\u30db\u30b9\u30c8\u540d\u3068\u79d8\u5bc6\u9375\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
$ time ./eschalot -t`nproc` -v -p abc\nVerbose, single result, no digits, 4 threads, prefixes 3-3 characters long.\nThread #1 started.\nThread #2 started.\nThread #3 started.\nThread #4 started.\nRunning, collecting performance data...\nFound a key for abc (3) - abcamzmribeujuzw.onion\n----------------------------------------------------------------\nabcamzmribeujuzw.onion\n-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQDIHD5uCynAW/Y1Vmyef8KrKuyFMzavij5Gl6aHYoiaGWNkJOZ7\nP/Xc1Z78YTZ7LtzpWCAWLax4PmIhQiwPhldsD/kVWKAi0fODxaP/Z0XoJjqIfx8f\nCmVWIQ1L9TVp9kfp8nLtXm9CnawCT98g0VE/jvZEddBV2oaVCuq88BTsoQIEAQBz\n4QKBgBHzMeQAOOkyB3yCc51oYOh92jYLyXJuc511HR9yki7b/CxIhjL7miA+GVmJ\nn4DD9nKubE5/xE6KrNnm3YZ1kmar2Yl/8fLJxBUrVoDUeGAc7i77i+tqM4d1LCr3\nX1Ead8S7WpnnTVSmRHiLjuebaF78BWiMII4+3v9d1e6PQXbRAkEA9IJknhUNSO5b\n1bzEIOmybg94r3fvBdWsc9xiwm6ONMBI2WyAVwmxDZ63Spwb/AyKCEblwekcaw6h\nNMmhBQeUmQJBANGDs597RqBQUsFqtb5BoBkQgELIVeS4xKgZXrDI9SKfnnpTxv8Z\nypah+g335EN3/bBgfbqy8C7zFZhjHclzFUkCQQDcoP4aDG1zPO4TFcnguwvnGv/j\nkOBS3h0CJOVY+rLTlUaekvjD6ugVLQ0olFItL1wyyZ3IifKcDHoDWJo/OOZZAkAQ\n82dcvUGLOUpZObyFTdyUkU/eytiXaQZM0UdTDPnGYmrH/CBEaoSSjgRG7MEdFf2k\nr+VVLqSnp+g6tFwp9It5AkBI4fJxCrrANt3E/CCrFW4iZXIqP3aPXHHZK5SqtQzJ\ngBKUN8HSRxo/dURQPOLKKX0ynVJaMhg5UO4tQ3rHiJwa\n-----END RSA PRIVATE KEY-----\n\nSegmentation fault\n\nreal    0m0.126s\nuser    0m0.399s\nsys     0m0.015s
\n
\n
\n
\n

-r \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6b63\u898f\u8868\u73fe\u304c\u5229\u7528\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306e\u4f8b\u306f abc \u304b\u3089\u59cb\u307e\u308a bca \u3067\u7d42\u308f\u308b\u30db\u30b9\u30c8\u540d\u304b\uff0cdeadbeef \u3067\u59cb\u307e\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u63a2\u3057\u3066\u3044\u307e\u3059\uff0e

\n
\n
\n
\n
$ ./eschalot -t`nproc` -v -r \"^abc.*bca^|^deadbeef\"
\n
\n
\n
\n

-c \u30aa\u30d7\u30b7\u30e7\u30f3\u30671\u3064\u898b\u3064\u304b\u3063\u3066\u3082\u4e2d\u65ad\u3059\u308b\u307e\u3067\u63a2\u3057\u7d9a\u3051\u307e\u3059\uff0e
\n\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\uff0e

\n
\n
\n
\n
$ ./eschalot -cvt`nproc` -r \"^abc.bca^|^deadbeef\" >> result.log
\n
\n
\n
\n

\u63a2\u3057\u305f\u3044\u30ef\u30fc\u30c9\u304c\u591a\u3044\u5834\u5408\u306f1\u30ef\u30fc\u30c91\u884c\u306e\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066 -f \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\uff0e\u305f\u3060\u3057\uff0c\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u6307\u5b9a\u6642\u306f7\u6587\u5b57\u4ee5\u4e0b\u306e\u30ef\u30fc\u30c9\u306f\u7121\u8996\u3055\u308c\u308b\u3088\u3046\u3067\u3059\uff0e-l \u30aa\u30d7\u30b7\u30e7\u30f3\u3067 7-16 \u306e\u3088\u3046\u306b\u6700\u5c0f\u6587\u5b57\u6570\u30927\u4ee5\u4e0b\u306b\u3059\u308c\u3070\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\uff0c\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f7\u4ee5\u4e0b\u3060\u3068\u30a8\u30e9\u30fc\u3067\u7d42\u4e86\u3057\u3066\u3057\u307e\u3044\u307e\u3059\uff0e

\n
\n
\n
\n
$ ./eschalot -cvt`nproc` -f ./wordlist.dic >> result.log
\n
\n
\n
\n

GPU\u3092\u4f7f\u3046\u30c4\u30fc\u30eb\u3082\u8907\u6570\u3042\u308a\u307e\u3059\uff0e\u4f8b\u3048\u3070 Scallion \u3053\u3063\u3061\u306e\u307b\u3046\u304c\u305a\u3063\u3068\u901f\u3044\u3067\u3057\u3087\u3046\uff0e(ASIC\u3068\u304b\u3082\u3042\u308b\u306e\u304b\u306a?)

\n
\n\n
\n
\n
\n

Onion v3 \u30a2\u30c9\u30ec\u30b9\u3092 mkp224o \u3067\u63a2\u3059

\n
\n
\n

Onion v3 \u30a2\u30c9\u30ec\u30b9\u306f mkp224o \u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n\n
\n

configure option\u306b --enable-amd64-51-30k , --enable-amd64-64-24k \u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308b\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u304c\uff0c\u306a\u3057\uff0c--enable-amd64-51-30k , --enable-amd64-64-24k \u306e\u3044\u305a\u308c\u3067\u3082\u6709\u610f\u306a\u901f\u5ea6\u5dee\u306f\u898b\u3089\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff0e(Intel\u00ae Core\"\u2122\" i5-3320M)

\n
\n
\n
\u5c0e\u5165
\n
\n
$ sudo apt install libsodium-dev autoconf\n$ git clone https://github.com/cathugger/mkp224o\n$ cd mkp224o\n$ ./autogen.sh\n$ ./configure\n$ make\n$ ./mkp224o\nUsage: ./mkp224o filter [filter...] [options]\n       ./mkp224o -f filterfile [options]\nOptions:\n        -h  - print help to stdout and quit\n        -f  - specify filter file which contains filters separated by newlines\n        -D  - deduplicate filters\n        -q  - do not print diagnostic output to stderr\n        -x  - do not print onion names\n        -v  - print more diagnostic data\n        -o filename  - output onion names to specified file (append)\n        -O filename  - output onion names to specified file (overwrite)\n        -F  - include directory names in onion names output\n        -d dirname  - output directory\n        -t numthreads  - specify number of threads to utilise (default - CPU core count or 1)\n        -j numthreads  - same as -t\n        -n numkeys  - specify number of keys (default - 0 - unlimited)\n        -N numwords  - specify number of words per key (default - 1)\n        -z  - use faster key generation method; this is now default\n        -Z  - use slower key generation method\n        -B  - use batching key generation method (>10x faster than -z, experimental)\n        -s  - print statistics each 10 seconds\n        -S t  - print statistics every specified ammount of seconds\n        -T  - do not reset statistics counters when printing\n        -y  - output generated keys in YAML format instead of dumping them to filesystem\n        -Y [filename [host.onion]]  - parse YAML encoded input and extract key(s) to filesystem\n        --rawyaml  - raw (unprefixed) public/secret keys for -y/-Y (may be useful for tor controller API)\n        -p passphrase  - use passphrase to initialize the random seed with\n        -P  - same as -p, but takes passphrase from PASSPHRASE environment variable
\n
\n
\n
\n

\u63a2\u3057\u305f\u3044\u30ef\u30fc\u30c9\u3092\u5f15\u6570\u306b\u4e0e\u3048\u3066\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u5229\u7528\u3067\u304d\u307e\u3059\uff0e\u7d50\u679c\u306f\u30db\u30b9\u30c8\u540d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306b\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
$ time ./mkp224o abcd\nsorting filters... done.\nfilters:\n        abcd\nin total, 1 filter\nusing 4 threads\nabcdpr2quwoxranttf2ywckm7g5giysscy62kmhyqmnq2ycvooxbtryd.onion\n^Cwaiting for threads to finish... done.\n\nreal    0m8.982s\nuser    0m21.740s\nsys     0m0.167s\n$ ls -A abcdpr2quwoxranttf2ywckm7g5giysscy62kmhyqmnq2ycvooxbtryd.onion\nhostname  hs_ed25519_public_key  hs_ed25519_secret_key
\n
\n
\n
\n

\u7d50\u679c\u3092 onion \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ time ./mkp224o -d ./onion abcd
\n
\n
\n
\n

\u30d5\u30a3\u30eb\u30bf\u306f\u8907\u6570\u66f8\u3051\u307e\u3059\uff0e

\n
\n
\n
\n
$ time ./mkp224o -d ./onion abcd efgh ijkl
\n
\n
\n
\n

-S \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305f\u79d2\u6570\u3054\u3068\u306b\u7d71\u8a08\u4e0a\u3092\u9d5c\u3092\u51fa\u529b\u3057\u307e\u3059\uff0e\u30d5\u30a3\u30eb\u30bf\u306b\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3044\u307e\u3059\uff0e

\n
\n
\n
\n
$ ./mkp224o -S 300 -d ./onion -f ./wordlist.dic
\n
\n
\n
\n

\u4ee5\u4e0b\u306f\u624b\u5143\u306eNotePC\u3068Raspberry Pi 3 model B\u3067\u306e\u901f\u5ea6\u3067\u3059\uff0ePC\u306e\u65b9\u306f\u71b1\u3067\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u52b9\u3044\u3066\u3044\u308b\u306e\u3082\u3042\u308a\u307e\u3059\u304c\uff0c\u6848\u5916Raspberry Pi \u304c\u60aa\u304f\u306a\u3044\u6570\u5b57\u306b\u898b\u3048\u307e\u3059\uff0e\u81ea\u5206\u306e\u74b0\u5883\u306e\u5834\u5408\u96fb\u6c17\u4ee3\u7b49\u3092\u8003\u3048\u308b\u3068Raspberry Pi \u3092\u4e26\u5217\u3067\u52d5\u304b\u3057\u3066\u304a\u304f\u307b\u3046\u304c\u826f\u3055\u305d\u3046\u3067\u3059\uff0e

\n
\n
\n
Intel\u00ae Core\"\u2122\" i5-3320M
\n
\n
>calc/sec:202602.624226, succ/sec:0.000000, rest/sec:0.000000, elapsed:300.129147sec\n>calc/sec:177378.183948, succ/sec:0.006667, rest/sec:0.006667, elapsed:600.131277sec\n>calc/sec:155232.657607, succ/sec:0.006667, rest/sec:0.006667, elapsed:900.106274sec\n>calc/sec:111928.180486, succ/sec:0.000000, rest/sec:0.000000, elapsed:1200.166338sec
\n
\n
\n
\n
Raspberry Pi 3 model B(aarch64 kernel)
\n
\n
>calc/sec:103867.893552, succ/sec:0.003333, rest/sec:0.003333, elapsed:300.130969sec\n>calc/sec:100761.039921, succ/sec:0.003333, rest/sec:0.003333, elapsed:600.155046sec\n>calc/sec:94511.877034, succ/sec:0.009999, rest/sec:0.009999, elapsed:900.194934sec\n>calc/sec:91854.274354, succ/sec:0.003334, rest/sec:0.003334, elapsed:1200.130938sec
\n
\n
\n
\n
\n
\n

Vanity Addresses \u306e\u8a2d\u5b9a

\n
\n
\n

Onion v2

\n
\n

torrc \u306e HiddenServiceDir \u4ee5\u4e0b\u306e hostname, hs_ed25519_public_key, hs_ed25519_secret_key \u3092\u9000\u907f\u3057\u307e\u3059\uff0e
\n\u6b21\u306b private_key \u30d5\u30a1\u30a4\u30eb\u3092tor\u306e\u6a29\u9650\u3067\u4f5c\u6210\u3057\uff0c\u898b\u3064\u3051\u305fRSA\u9375\u3092\u4fdd\u5b58\u3057\u307e\u3059\uff0e

\n
\n
\n

\u305d\u306e\u5f8ctor\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u53cd\u6620\u3055\u308c\u3066 hostname \u30d5\u30a1\u30a4\u30eb\u3082\u4f5c\u6210\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
$ grep ^HiddenServiceDir /etc/tor/torrc\nHiddenServiceDir /var/lib/tor/other_hidden_service/\n$ sudo ls -A /var/lib/tor/other_hidden_service/\nauthorized_clients  hostname  hs_ed25519_public_key  hs_ed25519_secret_key  private_key\n$ sudo rm /var/lib/tor/other_hidden_service/hostname /var/lib/tor/other_hidden_service/hs_ed25519_public_key /var/lib/tor/other_hidden_service/hs_ed25519_secret_key\n$ sudo install -o debian-tor -g debian-tor -m 400 /dev/null /var/lib/tor/other_hidden_service/private_key\n$ echo '-----BEGIN RSA PRIVATE KEY-----\n> MIICXQIBAAKBgQDIHD5uCynAW/Y1Vmyef8KrKuyFMzavij5Gl6aHYoiaGWNkJOZ7\n> P/Xc1Z78YTZ7LtzpWCAWLax4PmIhQiwPhldsD/kVWKAi0fODxaP/Z0XoJjqIfx8f\n> CmVWIQ1L9TVp9kfp8nLtXm9CnawCT98g0VE/jvZEddBV2oaVCuq88BTsoQIEAQBz\n> 4QKBgBHzMeQAOOkyB3yCc51oYOh92jYLyXJuc511HR9yki7b/CxIhjL7miA+GVmJ\n> n4DD9nKubE5/xE6KrNnm3YZ1kmar2Yl/8fLJxBUrVoDUeGAc7i77i+tqM4d1LCr3\n> X1Ead8S7WpnnTVSmRHiLjuebaF78BWiMII4+3v9d1e6PQXbRAkEA9IJknhUNSO5b\n> 1bzEIOmybg94r3fvBdWsc9xiwm6ONMBI2WyAVwmxDZ63Spwb/AyKCEblwekcaw6h\n> NMmhBQeUmQJBANGDs597RqBQUsFqtb5BoBkQgELIVeS4xKgZXrDI9SKfnnpTxv8Z\n> ypah+g335EN3/bBgfbqy8C7zFZhjHclzFUkCQQDcoP4aDG1zPO4TFcnguwvnGv/j\n> kOBS3h0CJOVY+rLTlUaekvjD6ugVLQ0olFItL1wyyZ3IifKcDHoDWJo/OOZZAkAQ\n> 82dcvUGLOUpZObyFTdyUkU/eytiXaQZM0UdTDPnGYmrH/CBEaoSSjgRG7MEdFf2k\n> r+VVLqSnp+g6tFwp9It5AkBI4fJxCrrANt3E/CCrFW4iZXIqP3aPXHHZK5SqtQzJ\n> gBKUN8HSRxo/dURQPOLKKX0ynVJaMhg5UO4tQ3rHiJwa\n> -----END RSA PRIVATE KEY-----' | sudo -u debian-tor tee /var/lib/tor/other_hidden_service/private_key\n$ sudo service tor restart\n$ torsocks w3m `sudo -u debian-tor cat /var/lib/tor/other_hidden_service/hostname`
\n
\n
\n
\n
\n

Onion v3

\n
\n

torrc \u306e HiddenServiceDir \u4ee5\u4e0b\u306e hostname, hs_ed25519_public_key, hs_ed25519_secret_key \u3092\u9000\u907f\u3057\u307e\u3059\uff0e
\n\u6b21\u306b hs_ed25519_secret_key \u30d5\u30a1\u30a4\u30eb\u3092tor\u306e\u6a29\u9650\u3067\u30b3\u30d4\u30fc\u3057\u307e\u3059\uff0e

\n
\n
\n

\u305d\u306e\u5f8ctor\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u53cd\u6620\u3055\u308c\u3066 hostname, hs_ed25519_public_key \u30d5\u30a1\u30a4\u30eb\u3082\u4f5c\u6210\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
$ grep ^HiddenServiceDir /etc/tor/torrc\nHiddenServiceDir /var/lib/tor/other_hidden_service/\n$ sudo ls -A /var/lib/tor/other_hidden_service/\nauthorized_clients  hostname  hs_ed25519_public_key  hs_ed25519_secret_key  private_key\n$ sudo rm /var/lib/tor/other_hidden_service/hostname /var/lib/tor/other_hidden_service/hs_ed25519_public_key /var/lib/tor/other_hidden_service/hs_ed25519_secret_key\n$ sudo install -o debian-tor -g debian-tor -m 400 ./onion/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion/hs_ed25519_secret_key /var/lib/tor/other_hidden_service/hs_ed25519_secret_key\n$ sudo service tor restart\n$ torsocks w3m `sudo -u debian-tor cat /var/lib/tor/other_hidden_service/hostname`
\n
\n
\n
\n
\n
\n
\n

\u307e\u3068\u3081

\n
\n
\n

\u3068\u3044\u3046\u611f\u3058\u30673\u65e5\u307b\u3069\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u305f\u304c matoken \u304b\u3089\u59cb\u307e\u308b\u30db\u30b9\u30c8\u540d\u30923\u3064\u307b\u3069\u6398\u308a\u5f53\u3066\u307e\u3057\u305f\uff0e\u8fd1\u3044\u3046\u3061\u306b\u30df\u30e9\u30fc\u3092\u8a2d\u5b9a\u3057\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\uff0e(v2, v3\u306e\u30a2\u30c9\u30ec\u30b9\u30921\u3064\u306etor\u30b5\u30fc\u30d3\u30b9\u3067\u30db\u30b9\u30c8\u3059\u308b\u65b9\u6cd5\u3063\u3066\u3042\u308b\u306e\u304b\u306a?)
\n\u3057\u304b\u3057\u8a2d\u5b9a\u3057\u3066\u3082\u30a2\u30af\u30bb\u30b9\u306f\u307b\u307c\u7121\u3044\u3088\u3046\u306a\u6c17\u3082\u2026\u2026\uff0e

\n
\n
\n

\u3061\u306a\u307f\u306btor\u306fNAT\u8d8a\u3048\u3082\u3057\u3066\u3057\u307e\u3046\u306e\u3067sshd\u306a\u3069\u3092\u8a31\u53ef\u3059\u308b\u5834\u5408\u306f\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\uff0e

\n
\n
\n
\n
$ torsocks w3m -dump http://matoken3inrzd4ks.onion/\n _     _   _             ____               _        _              _____\n| |__ | |_| |_ _ __ _   / / / __ ___   __ _| |_ ___ | | _____ _ __ |___ /\n| '_ \\| __| __| '_ (_) / / / '_ ` _ \\ / _` | __/ _ \\| |/ / _ \\ '_ \\  |_ \\\n| | | | |_| |_| |_) | / / /| | | | | | (_| | || (_) |   <  __/ | | |___) |\n|_| |_|\\__|\\__| .__(_)_/_/ |_| |_| |_|\\__,_|\\__\\___/|_|\\_\\___|_| |_|____/\n              |_|\n _                   _ _  _   _                     _                __\n(_)_ __  _ __ ______| | || | | | _____   ___  _ __ (_) ___  _ __    / /\n| | '_ \\| '__|_  / _` | || |_| |/ / __| / _ \\| '_ \\| |/ _ \\| '_ \\  / /\n| | | | | |   / / (_| |__   _|   <\\__ \\| (_) | | | | | (_) | | | |/ /\n|_|_| |_|_|  /___\\__,_|  |_| |_|\\_\\___(_)___/|_| |_|_|\\___/|_| |_/_/
\n
\n
\n
\n
\u74b0\u5883
\n
\n
$ dpkg-query -W tor\ntor     0.3.5.10-1\n$ lsb_release -dr\nDescription:    Debian GNU/Linux 10 (buster)\nRelease:        10\n$ uname -m\naarch64\n$ cat /proc/device-tree/model ;echo\nRaspberry Pi 3 Model B Rev 1.2
\n
\n
\n
\n
\n

\n", "content_text": "\u6700\u8fd1\u3053\u306e\u3088\u3046\u306a\u8a18\u4e8b\u3092\u8aad\u307f\u307e\u3057\u305f\uff0e\n\n\n\nGoogle\u306b\u30c9\u30e1\u30a4\u30f3\u3092\u30d6\u30ed\u30c3\u30af\u3055\u308c\u305f\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u304c\u300cCloudflare\u306b\u4e57\u308a\u63db\u3048\u308b\u300d\u3068\u6068\u307f\u7bc0 – GIGAZINE\n\n\n\n\u4eca\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306f\u30c9\u30e1\u30a4\u30f3\u983c\u308a\u306a\u5272\u306b\u5358\u4e00\u969c\u5bb3\u70b9\u3068\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3042\u307e\u308a\u3088\u308d\u3057\u304f\u306a\u3044\uff0e\u3067\u3082\u9003\u3052\u9053\u304c\u3042\u307e\u308a\u306a\u3044\u306e\u3067\u3059\u3088\u306d\u2026\u2026\uff0e\n\u3068\u308a\u3042\u3048\u305a\u4ee5\u524d\u304b\u3089\u305d\u306e\u3046\u3061\u3084\u308d\u3046\u3068\u601d\u3063\u3066\u653e\u7f6e\u3057\u3066\u3044\u305ftor\u306ehidden service\u3067\u30df\u30e9\u30fc\u3092\u7acb\u3066\u308b\u306e\u3092\u3084\u3063\u3066\u307f\u3088\u3046\u304b\u306a\u3068\u601d\u3044\u7acb\u3061\u307e\u3057\u305f\uff0e\n\n\n\u3068\u308a\u3042\u3048\u305a /etc/tor/torrc \u3067\u4ee5\u4e0b\u306e\u3042\u305f\u308a\u3092\u6709\u52b9\u306b\u3057\u3066tor\u3092\u518d\u8d77\u52d5\u3057\u3066httpd\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3060\u3051\u3067\u52d5\u304d\u307e\u3059\uff0e\n\n\n\nHiddenServiceDir /var/lib/tor/hidden_service/\nHiddenServicePort 80 127.0.0.1:80\n\n\n\n\u3053\u306e\u3068\u304d\u306e\u30a2\u30c9\u30ec\u30b9\u306ftor\u518d\u8d77\u52d5\u5f8c\u306b HiddenServiceDir \u4ee5\u4e0b\u306b\u4f5c\u3089\u308c\u308b hostname \u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306e\u540d\u524d\u306b\u306a\u308a\u307e\u3059\uff0e\n\n\n\n$ sudo cat /var/lib/tor/hidden_service/hostname\ntbiettfnprnqpoccrz3ll7hioprbyjoam2n6okihpadf5ukaa4hwrwad.onion\n\n\n\n\u3053\u306e\u30a2\u30c9\u30ec\u30b9\u306f[a-z|3-7]\u306e32\u6587\u5b57(BASE32)\u304b\u3089\u306a\u308b16\u6587\u5b57\u306e onion v2 \u30a2\u30c9\u30ec\u30b9\u3068\uff0c56\u6587\u5b57\u306e onion v3 \u30a2\u30c9\u30ec\u30b9\u304c\u3042\u3063\u3066\uff0c\u6700\u8fd1\u306f\u5f8c\u8005\u306ev3\u30a2\u30c9\u30ec\u30b9\u304c\u898f\u5b9a\u5024\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\u9375\u306f RSA \u304b\u3089 ed25519 \u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e\n\n\nOnion v2 \u306f\u30db\u30b9\u30c8\u30cd\u30fc\u30e0\u304b\u3089\u79d8\u5bc6\u9375\u3092\u6c42\u3081\u308b\u306e\u306b\u73fe\u5b9f\u7684\u306a\u6642\u9593\u3067\u6e08\u3080\u306e\u304c\u8fd1\u3065\u3044\u3066\u304d\u3066\u3044\u308b\u3088\u3046\u306a\u306e\u3067\u3068\u3066\u3082\u9577\u304f\u3066\u4f7f\u3044\u3065\u3089\u3044\u3067\u3059\u304c\u3053\u308c\u304b\u3089\u306fOnion v3 \u30a2\u30c9\u30ec\u30b9\u306b\u3057\u305f\u307b\u3046\u304c\u826f\u3055\u305d\u3046\u3067\u3059\uff0e\n\u4eca\u306fv2,v3 \u3092\u4f75\u7528\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3082\u591a\u3044\u3088\u3046\u3067\u3059\uff0e\n\n\n\n\n\n\n\n\n\n\nOnion v2\nOnion v3\n\n\n\n\n\nhostname\u6587\u5b57\u9577\n\n\n16\n\n\n56\n\n\n\n\n\u9375\u5f62\u5f0f\n\n\nRSA\n\n\ned25519\n\n\n\n\n\u9375\u30d5\u30a1\u30a4\u30eb\u540d\n\n\nprivate_key\n\n\nhs_ed25519_secret_key hs_ed25519_public_key\n\n\n\n\n\n(\u7121\u99c4\u306b)\u30a2\u30c9\u30ec\u30b9\u3092\u8a08\u7b97\u3057\u3066\u597d\u307f\u306e\u5358\u8a9e\u306b\u30de\u30c3\u30c1\u3057\u305f\u3082\u306e\u3092\u63a2\u3059(\u4f8b\u3048\u3070matoken\u304b\u3089\u59cb\u307e\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u63a2\u3059\u3068\u304b)\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\uff0e\n\u3053\u3046\u3044\u3063\u305f\u30a2\u30c9\u30ec\u30b9\u306fVanity Addresses \u3068\u3044\u3046\u3088\u3046\u3067\u3059\uff0e\n\n\n\u4ed6\u306b\u3082\u30a2\u30c9\u30ec\u30b9\u3092\u58f2\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u3082\u3042\u308a\u307e\u3059\u304c\uff0c\u76f8\u624b\u306f\u79d8\u5bc6\u9375\u3092\u6301\u3063\u3066\u3044\u308b\u308f\u3051\u3067\u3042\u307e\u308a\u3088\u304f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\uff0e\n\n\n\n\nOnion v2 \u30a2\u30c9\u30ec\u30b9\u3092 eschalot \u3067\u63a2\u3059\n\n\n\n\nadd 2020-07-28)\n\n\nOnion v2 \u30a2\u30c9\u30ec\u30b9\u306f2021\u5e7411\u6708\u3042\u305f\u308a\u3067\u4f7f\u3048\u306a\u304f\u306a\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\nOnion Service version 2 deprecation timeline | Tor Blog\n\n\n\n\n\nOnion v2 \u30a2\u30c9\u30ec\u30b9\u3092 eschalot \u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u307f\u307e\u3059\uff0e\n\n\n\nReclaimYourPrivacy/eschalot: It is important to stress that we have not written this piece of software (see LICENSE)\n\n\n\n\u5c0e\u5165\n\n$ sudo apt install libssl-dev\n$ git clone https://github.com/ReclaimYourPrivacy/eschalot\n$ cd eschalot\n$ make\n$ ./eschalot\nVersion: 1.2.0\n\nusage:\neschalot [-c] [-v] [-t count] ([-n] [-l min-max] -f filename) | (-r regex) | (-p prefix)\n -v : verbose mode - print extra information to STDERR\n -c : continue searching after the hash is found\n -t count : number of threads to spawn default is one)\n -l min-max : look for prefixes that are from 'min' to 'max' characters long\n -n : Allow digits to be part of the prefix (affects wordlist mode only)\n -f filename: name of the text file with a list of prefixes\n -p prefix : single prefix to look for (1-16 characters long)\n -r regex : search for a POSIX-style regular expression\n\nExamples:\n eschalot -cvt4 -l8-12 -f wordlist.txt >> results.txt\n eschalot -v -r '^test|^exam'\n eschalot -ct5 -p test\n\n base32 alphabet allows letters [a-z] and digits [2-7]\n Regex pattern examples:\n xxx must contain 'xxx'\n ^foo must begin with 'foo'\n bar$ must end with 'bar'\n b[aoeiu]r must have a vowel between 'b' and 'r'\n '^ab|^cd' must begin with 'ab' or 'cd'\n [a-z]{16} must contain letters only, no digits\n ^dusk.*dawn$ must begin with 'dusk' and end with 'dawn'\n [a-z2-7]{16} any name - will succeed after one iteration\n\n\n\n\u4ee5\u4e0b\u306f -t \u3067\u30b9\u30ec\u30c3\u30c9\u6570\u3092\u6307\u5b9a\uff0c-v \u3067\u5197\u9577\u51fa\u529b\uff0c-p \u3067 abc \u65b9\u59cb\u307e\u308b\u30db\u30b9\u30c8\u540d\u3092\u63a2\u3057\u3066\u3044\u307e\u3059\uff0e\n\u898b\u3064\u304b\u308b\u3068\u6a19\u6e96\u51fa\u529b\u306b\u30db\u30b9\u30c8\u540d\u3068\u79d8\u5bc6\u9375\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e\n\n\n\n$ time ./eschalot -t`nproc` -v -p abc\nVerbose, single result, no digits, 4 threads, prefixes 3-3 characters long.\nThread #1 started.\nThread #2 started.\nThread #3 started.\nThread #4 started.\nRunning, collecting performance data...\nFound a key for abc (3) - abcamzmribeujuzw.onion\n----------------------------------------------------------------\nabcamzmribeujuzw.onion\n-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQDIHD5uCynAW/Y1Vmyef8KrKuyFMzavij5Gl6aHYoiaGWNkJOZ7\nP/Xc1Z78YTZ7LtzpWCAWLax4PmIhQiwPhldsD/kVWKAi0fODxaP/Z0XoJjqIfx8f\nCmVWIQ1L9TVp9kfp8nLtXm9CnawCT98g0VE/jvZEddBV2oaVCuq88BTsoQIEAQBz\n4QKBgBHzMeQAOOkyB3yCc51oYOh92jYLyXJuc511HR9yki7b/CxIhjL7miA+GVmJ\nn4DD9nKubE5/xE6KrNnm3YZ1kmar2Yl/8fLJxBUrVoDUeGAc7i77i+tqM4d1LCr3\nX1Ead8S7WpnnTVSmRHiLjuebaF78BWiMII4+3v9d1e6PQXbRAkEA9IJknhUNSO5b\n1bzEIOmybg94r3fvBdWsc9xiwm6ONMBI2WyAVwmxDZ63Spwb/AyKCEblwekcaw6h\nNMmhBQeUmQJBANGDs597RqBQUsFqtb5BoBkQgELIVeS4xKgZXrDI9SKfnnpTxv8Z\nypah+g335EN3/bBgfbqy8C7zFZhjHclzFUkCQQDcoP4aDG1zPO4TFcnguwvnGv/j\nkOBS3h0CJOVY+rLTlUaekvjD6ugVLQ0olFItL1wyyZ3IifKcDHoDWJo/OOZZAkAQ\n82dcvUGLOUpZObyFTdyUkU/eytiXaQZM0UdTDPnGYmrH/CBEaoSSjgRG7MEdFf2k\nr+VVLqSnp+g6tFwp9It5AkBI4fJxCrrANt3E/CCrFW4iZXIqP3aPXHHZK5SqtQzJ\ngBKUN8HSRxo/dURQPOLKKX0ynVJaMhg5UO4tQ3rHiJwa\n-----END RSA PRIVATE KEY-----\n\nSegmentation fault\n\nreal 0m0.126s\nuser 0m0.399s\nsys 0m0.015s\n\n\n\n-r \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6b63\u898f\u8868\u73fe\u304c\u5229\u7528\u3067\u304d\u307e\u3059\uff0e\u4ee5\u4e0b\u306e\u4f8b\u306f abc \u304b\u3089\u59cb\u307e\u308a bca \u3067\u7d42\u308f\u308b\u30db\u30b9\u30c8\u540d\u304b\uff0cdeadbeef \u3067\u59cb\u307e\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u63a2\u3057\u3066\u3044\u307e\u3059\uff0e\n\n\n\n$ ./eschalot -t`nproc` -v -r \"^abc.*bca^|^deadbeef\"\n\n\n\n-c \u30aa\u30d7\u30b7\u30e7\u30f3\u30671\u3064\u898b\u3064\u304b\u3063\u3066\u3082\u4e2d\u65ad\u3059\u308b\u307e\u3067\u63a2\u3057\u7d9a\u3051\u307e\u3059\uff0e\n\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\uff0e\n\n\n\n$ ./eschalot -cvt`nproc` -r \"^abc.bca^|^deadbeef\" >> result.log\n\n\n\n\u63a2\u3057\u305f\u3044\u30ef\u30fc\u30c9\u304c\u591a\u3044\u5834\u5408\u306f1\u30ef\u30fc\u30c91\u884c\u306e\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066 -f \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\uff0e\u305f\u3060\u3057\uff0c\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u6307\u5b9a\u6642\u306f7\u6587\u5b57\u4ee5\u4e0b\u306e\u30ef\u30fc\u30c9\u306f\u7121\u8996\u3055\u308c\u308b\u3088\u3046\u3067\u3059\uff0e-l \u30aa\u30d7\u30b7\u30e7\u30f3\u3067 7-16 \u306e\u3088\u3046\u306b\u6700\u5c0f\u6587\u5b57\u6570\u30927\u4ee5\u4e0b\u306b\u3059\u308c\u3070\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\uff0c\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f7\u4ee5\u4e0b\u3060\u3068\u30a8\u30e9\u30fc\u3067\u7d42\u4e86\u3057\u3066\u3057\u307e\u3044\u307e\u3059\uff0e\n\n\n\n$ ./eschalot -cvt`nproc` -f ./wordlist.dic >> result.log\n\n\n\nGPU\u3092\u4f7f\u3046\u30c4\u30fc\u30eb\u3082\u8907\u6570\u3042\u308a\u307e\u3059\uff0e\u4f8b\u3048\u3070 Scallion \u3053\u3063\u3061\u306e\u307b\u3046\u304c\u305a\u3063\u3068\u901f\u3044\u3067\u3057\u3087\u3046\uff0e(ASIC\u3068\u304b\u3082\u3042\u308b\u306e\u304b\u306a?)\n\n\n\nlachesis/scallion: GPU-based Onion Hash generator\n\n\n\n\n\nOnion v3 \u30a2\u30c9\u30ec\u30b9\u3092 mkp224o \u3067\u63a2\u3059\n\n\nOnion v3 \u30a2\u30c9\u30ec\u30b9\u306f mkp224o \u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\ncathugger/mkp224o: vanity address generator for tor onion v3 (ed25519) hidden services\n\n\n\nconfigure option\u306b --enable-amd64-51-30k , --enable-amd64-64-24k \u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308b\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u304c\uff0c\u306a\u3057\uff0c--enable-amd64-51-30k , --enable-amd64-64-24k \u306e\u3044\u305a\u308c\u3067\u3082\u6709\u610f\u306a\u901f\u5ea6\u5dee\u306f\u898b\u3089\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff0e(Intel\u00ae Core i5-3320M)\n\n\n\u5c0e\u5165\n\n$ sudo apt install libsodium-dev autoconf\n$ git clone https://github.com/cathugger/mkp224o\n$ cd mkp224o\n$ ./autogen.sh\n$ ./configure\n$ make\n$ ./mkp224o\nUsage: ./mkp224o filter [filter...] [options]\n ./mkp224o -f filterfile [options]\nOptions:\n -h - print help to stdout and quit\n -f - specify filter file which contains filters separated by newlines\n -D - deduplicate filters\n -q - do not print diagnostic output to stderr\n -x - do not print onion names\n -v - print more diagnostic data\n -o filename - output onion names to specified file (append)\n -O filename - output onion names to specified file (overwrite)\n -F - include directory names in onion names output\n -d dirname - output directory\n -t numthreads - specify number of threads to utilise (default - CPU core count or 1)\n -j numthreads - same as -t\n -n numkeys - specify number of keys (default - 0 - unlimited)\n -N numwords - specify number of words per key (default - 1)\n -z - use faster key generation method; this is now default\n -Z - use slower key generation method\n -B - use batching key generation method (>10x faster than -z, experimental)\n -s - print statistics each 10 seconds\n -S t - print statistics every specified ammount of seconds\n -T - do not reset statistics counters when printing\n -y - output generated keys in YAML format instead of dumping them to filesystem\n -Y [filename [host.onion]] - parse YAML encoded input and extract key(s) to filesystem\n --rawyaml - raw (unprefixed) public/secret keys for -y/-Y (may be useful for tor controller API)\n -p passphrase - use passphrase to initialize the random seed with\n -P - same as -p, but takes passphrase from PASSPHRASE environment variable\n\n\n\n\u63a2\u3057\u305f\u3044\u30ef\u30fc\u30c9\u3092\u5f15\u6570\u306b\u4e0e\u3048\u3066\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u5229\u7528\u3067\u304d\u307e\u3059\uff0e\u7d50\u679c\u306f\u30db\u30b9\u30c8\u540d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306b\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e\n\n\n\n$ time ./mkp224o abcd\nsorting filters... done.\nfilters:\n abcd\nin total, 1 filter\nusing 4 threads\nabcdpr2quwoxranttf2ywckm7g5giysscy62kmhyqmnq2ycvooxbtryd.onion\n^Cwaiting for threads to finish... done.\n\nreal 0m8.982s\nuser 0m21.740s\nsys 0m0.167s\n$ ls -A abcdpr2quwoxranttf2ywckm7g5giysscy62kmhyqmnq2ycvooxbtryd.onion\nhostname hs_ed25519_public_key hs_ed25519_secret_key\n\n\n\n\u7d50\u679c\u3092 onion \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\uff0e\n\n\n\n$ time ./mkp224o -d ./onion abcd\n\n\n\n\u30d5\u30a3\u30eb\u30bf\u306f\u8907\u6570\u66f8\u3051\u307e\u3059\uff0e\n\n\n\n$ time ./mkp224o -d ./onion abcd efgh ijkl\n\n\n\n-S \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305f\u79d2\u6570\u3054\u3068\u306b\u7d71\u8a08\u4e0a\u3092\u9d5c\u3092\u51fa\u529b\u3057\u307e\u3059\uff0e\u30d5\u30a3\u30eb\u30bf\u306b\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3044\u307e\u3059\uff0e\n\n\n\n$ ./mkp224o -S 300 -d ./onion -f ./wordlist.dic\n\n\n\n\u4ee5\u4e0b\u306f\u624b\u5143\u306eNotePC\u3068Raspberry Pi 3 model B\u3067\u306e\u901f\u5ea6\u3067\u3059\uff0ePC\u306e\u65b9\u306f\u71b1\u3067\u30b9\u30ed\u30c3\u30c8\u30ea\u30f3\u30b0\u304c\u52b9\u3044\u3066\u3044\u308b\u306e\u3082\u3042\u308a\u307e\u3059\u304c\uff0c\u6848\u5916Raspberry Pi \u304c\u60aa\u304f\u306a\u3044\u6570\u5b57\u306b\u898b\u3048\u307e\u3059\uff0e\u81ea\u5206\u306e\u74b0\u5883\u306e\u5834\u5408\u96fb\u6c17\u4ee3\u7b49\u3092\u8003\u3048\u308b\u3068Raspberry Pi \u3092\u4e26\u5217\u3067\u52d5\u304b\u3057\u3066\u304a\u304f\u307b\u3046\u304c\u826f\u3055\u305d\u3046\u3067\u3059\uff0e\n\n\nIntel\u00ae Core i5-3320M\n\n>calc/sec:202602.624226, succ/sec:0.000000, rest/sec:0.000000, elapsed:300.129147sec\n>calc/sec:177378.183948, succ/sec:0.006667, rest/sec:0.006667, elapsed:600.131277sec\n>calc/sec:155232.657607, succ/sec:0.006667, rest/sec:0.006667, elapsed:900.106274sec\n>calc/sec:111928.180486, succ/sec:0.000000, rest/sec:0.000000, elapsed:1200.166338sec\n\n\n\nRaspberry Pi 3 model B(aarch64 kernel)\n\n>calc/sec:103867.893552, succ/sec:0.003333, rest/sec:0.003333, elapsed:300.130969sec\n>calc/sec:100761.039921, succ/sec:0.003333, rest/sec:0.003333, elapsed:600.155046sec\n>calc/sec:94511.877034, succ/sec:0.009999, rest/sec:0.009999, elapsed:900.194934sec\n>calc/sec:91854.274354, succ/sec:0.003334, rest/sec:0.003334, elapsed:1200.130938sec\n\n\n\n\n\nVanity Addresses \u306e\u8a2d\u5b9a\n\n\nOnion v2\n\ntorrc \u306e HiddenServiceDir \u4ee5\u4e0b\u306e hostname, hs_ed25519_public_key, hs_ed25519_secret_key \u3092\u9000\u907f\u3057\u307e\u3059\uff0e\n\u6b21\u306b private_key \u30d5\u30a1\u30a4\u30eb\u3092tor\u306e\u6a29\u9650\u3067\u4f5c\u6210\u3057\uff0c\u898b\u3064\u3051\u305fRSA\u9375\u3092\u4fdd\u5b58\u3057\u307e\u3059\uff0e\n\n\n\u305d\u306e\u5f8ctor\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u53cd\u6620\u3055\u308c\u3066 hostname \u30d5\u30a1\u30a4\u30eb\u3082\u4f5c\u6210\u3055\u308c\u307e\u3059\uff0e\n\n\n\n$ grep ^HiddenServiceDir /etc/tor/torrc\nHiddenServiceDir /var/lib/tor/other_hidden_service/\n$ sudo ls -A /var/lib/tor/other_hidden_service/\nauthorized_clients hostname hs_ed25519_public_key hs_ed25519_secret_key private_key\n$ sudo rm /var/lib/tor/other_hidden_service/hostname /var/lib/tor/other_hidden_service/hs_ed25519_public_key /var/lib/tor/other_hidden_service/hs_ed25519_secret_key\n$ sudo install -o debian-tor -g debian-tor -m 400 /dev/null /var/lib/tor/other_hidden_service/private_key\n$ echo '-----BEGIN RSA PRIVATE KEY-----\n> MIICXQIBAAKBgQDIHD5uCynAW/Y1Vmyef8KrKuyFMzavij5Gl6aHYoiaGWNkJOZ7\n> P/Xc1Z78YTZ7LtzpWCAWLax4PmIhQiwPhldsD/kVWKAi0fODxaP/Z0XoJjqIfx8f\n> CmVWIQ1L9TVp9kfp8nLtXm9CnawCT98g0VE/jvZEddBV2oaVCuq88BTsoQIEAQBz\n> 4QKBgBHzMeQAOOkyB3yCc51oYOh92jYLyXJuc511HR9yki7b/CxIhjL7miA+GVmJ\n> n4DD9nKubE5/xE6KrNnm3YZ1kmar2Yl/8fLJxBUrVoDUeGAc7i77i+tqM4d1LCr3\n> X1Ead8S7WpnnTVSmRHiLjuebaF78BWiMII4+3v9d1e6PQXbRAkEA9IJknhUNSO5b\n> 1bzEIOmybg94r3fvBdWsc9xiwm6ONMBI2WyAVwmxDZ63Spwb/AyKCEblwekcaw6h\n> NMmhBQeUmQJBANGDs597RqBQUsFqtb5BoBkQgELIVeS4xKgZXrDI9SKfnnpTxv8Z\n> ypah+g335EN3/bBgfbqy8C7zFZhjHclzFUkCQQDcoP4aDG1zPO4TFcnguwvnGv/j\n> kOBS3h0CJOVY+rLTlUaekvjD6ugVLQ0olFItL1wyyZ3IifKcDHoDWJo/OOZZAkAQ\n> 82dcvUGLOUpZObyFTdyUkU/eytiXaQZM0UdTDPnGYmrH/CBEaoSSjgRG7MEdFf2k\n> r+VVLqSnp+g6tFwp9It5AkBI4fJxCrrANt3E/CCrFW4iZXIqP3aPXHHZK5SqtQzJ\n> gBKUN8HSRxo/dURQPOLKKX0ynVJaMhg5UO4tQ3rHiJwa\n> -----END RSA PRIVATE KEY-----' | sudo -u debian-tor tee /var/lib/tor/other_hidden_service/private_key\n$ sudo service tor restart\n$ torsocks w3m `sudo -u debian-tor cat /var/lib/tor/other_hidden_service/hostname`\n\n\n\n\nOnion v3\n\ntorrc \u306e HiddenServiceDir \u4ee5\u4e0b\u306e hostname, hs_ed25519_public_key, hs_ed25519_secret_key \u3092\u9000\u907f\u3057\u307e\u3059\uff0e\n\u6b21\u306b hs_ed25519_secret_key \u30d5\u30a1\u30a4\u30eb\u3092tor\u306e\u6a29\u9650\u3067\u30b3\u30d4\u30fc\u3057\u307e\u3059\uff0e\n\n\n\u305d\u306e\u5f8ctor\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u53cd\u6620\u3055\u308c\u3066 hostname, hs_ed25519_public_key \u30d5\u30a1\u30a4\u30eb\u3082\u4f5c\u6210\u3055\u308c\u307e\u3059\uff0e\n\n\n\n$ grep ^HiddenServiceDir /etc/tor/torrc\nHiddenServiceDir /var/lib/tor/other_hidden_service/\n$ sudo ls -A /var/lib/tor/other_hidden_service/\nauthorized_clients hostname hs_ed25519_public_key hs_ed25519_secret_key private_key\n$ sudo rm /var/lib/tor/other_hidden_service/hostname /var/lib/tor/other_hidden_service/hs_ed25519_public_key /var/lib/tor/other_hidden_service/hs_ed25519_secret_key\n$ sudo install -o debian-tor -g debian-tor -m 400 ./onion/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion/hs_ed25519_secret_key /var/lib/tor/other_hidden_service/hs_ed25519_secret_key\n$ sudo service tor restart\n$ torsocks w3m `sudo -u debian-tor cat /var/lib/tor/other_hidden_service/hostname`\n\n\n\n\n\n\n\u307e\u3068\u3081\n\n\n\u3068\u3044\u3046\u611f\u3058\u30673\u65e5\u307b\u3069\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u305f\u304c matoken \u304b\u3089\u59cb\u307e\u308b\u30db\u30b9\u30c8\u540d\u30923\u3064\u307b\u3069\u6398\u308a\u5f53\u3066\u307e\u3057\u305f\uff0e\u8fd1\u3044\u3046\u3061\u306b\u30df\u30e9\u30fc\u3092\u8a2d\u5b9a\u3057\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\uff0e(v2, v3\u306e\u30a2\u30c9\u30ec\u30b9\u30921\u3064\u306etor\u30b5\u30fc\u30d3\u30b9\u3067\u30db\u30b9\u30c8\u3059\u308b\u65b9\u6cd5\u3063\u3066\u3042\u308b\u306e\u304b\u306a?)\n\u3057\u304b\u3057\u8a2d\u5b9a\u3057\u3066\u3082\u30a2\u30af\u30bb\u30b9\u306f\u307b\u307c\u7121\u3044\u3088\u3046\u306a\u6c17\u3082\u2026\u2026\uff0e\n\n\n\u3061\u306a\u307f\u306btor\u306fNAT\u8d8a\u3048\u3082\u3057\u3066\u3057\u307e\u3046\u306e\u3067sshd\u306a\u3069\u3092\u8a31\u53ef\u3059\u308b\u5834\u5408\u306f\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\uff0e\n\n\n\n$ torsocks w3m -dump http://matoken3inrzd4ks.onion/\n _ _ _ ____ _ _ _____\n| |__ | |_| |_ _ __ _ / / / __ ___ __ _| |_ ___ | | _____ _ __ |___ /\n| '_ \\| __| __| '_ (_) / / / '_ ` _ \\ / _` | __/ _ \\| |/ / _ \\ '_ \\ |_ \\\n| | | | |_| |_| |_) | / / /| | | | | | (_| | || (_) | < __/ | | |___) |\n|_| |_|\\__|\\__| .__(_)_/_/ |_| |_| |_|\\__,_|\\__\\___/|_|\\_\\___|_| |_|____/\n |_|\n _ _ _ _ _ _ __\n(_)_ __ _ __ ______| | || | | | _____ ___ _ __ (_) ___ _ __ / /\n| | '_ \\| '__|_ / _` | || |_| |/ / __| / _ \\| '_ \\| |/ _ \\| '_ \\ / /\n| | | | | | / / (_| |__ _| <\\__ \\| (_) | | | | | (_) | | | |/ /\n|_|_| |_|_| /___\\__,_| |_| |_|\\_\\___(_)___/|_| |_|_|\\___/|_| |_/_/\n\n\n\n\u74b0\u5883\n\n$ dpkg-query -W tor\ntor 0.3.5.10-1\n$ lsb_release -dr\nDescription: Debian GNU/Linux 10 (buster)\nRelease: 10\n$ uname -m\naarch64\n$ cat /proc/device-tree/model ;echo\nRaspberry Pi 3 Model B Rev 1.2", "date_published": "2020-06-12T07:10:21+09:00", "date_modified": "2020-07-28T22:43:49+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "hiddenservice", "tor", "Buster", "Linux", "Raspberry Pi OS" ] } ] }