{ "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/tag/xz/feed/json/ -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/xz/", "feed_url": "https://matoken.org/blog/tag/xz/feed/json/", "language": "ja", "title": "xz – 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=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=2176", "url": "https://matoken.org/blog/2018/10/11/mysqldump-limit-by-pv/", "title": "mysqldump \u3092 pv \u3067\u5236\u9650", "content_html": "
\n

mysqldump \u52d5\u3044\u3066\u308b\u6642\u9593\u306b\u540c\u30b5\u30fc\u30d0\u3067 GNU social \u3068\u304b Nextcloud \u3068\u304b\u306e mysql \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u91cd\u304f\u3066\u4f7f\u3044\u7269\u306b\u306a\u3089\u306a\u3044\u3067\u3059\uff0enice + ionice \u306f\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u304c\u52b9\u3044\u3066\u306a\u3044\u611f\u3058\uff0e
\ndump \u3057\u305f sql \u3092\u5727\u7e2e\u3057\u3066\u3044\u308b xz \u30b3\u30de\u30f3\u30c9\u304c cpu \u30921 core \u4f7f\u3044\u6f70\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\u3053\u306e\u30de\u30b7\u30f3\u306f2 core \u3042\u308b\u306e\u3067\u3059\u304c\uff0c\u3082\u30461\u3064\u306e core \u3082\u305d\u306e\u4ed6\u306e\u51e6\u7406\u3067\u307b\u307c\u4f7f\u3044\u5207\u3063\u3066\u5f85\u3061\u304c\u51fa\u3066\u3044\u308b\u3088\u3046\u306a\u611f\u3058\uff0e

\n
\n
\n
\n
$ vmstat 1 10\r\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\r\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st\r\n 2  0 328212 264788 212260 5628192    1    2    35   160    2   15 35  9 44 12  0\r\n 1  1 328212 259136 212264 5628192    0    0     0   191 1497 3132 63  6 19 12  0\r\n 1  1 328212 252492 212264 5628192    0    0     0    88  959 1716 81  6  7  6  0\r\n 2  1 328212 248264 212264 5628196    0    0     0   114  973 1887 85  3  7  5  0\r\n 2  0 328212 242572 212264 5628196    0    0     0    85  972 1967 74  5 15  5  0\r\n 4  0 328212 241664 212100 5624380    0    0     0    97 1106 4226 91  7  2  2  0\r\n 2  1 328212 234268 212100 5624384    0    0     0   140 1013 1815 70  5 19  7  0\r\n 3  0 328212 235760 211944 5620076    0    0     0  2461 1289 4063 94  4  1  0  0\r\n 1  0 328212 229656 211944 5620080    0    0     0   110  953 1685 61  6 18 15  0\r\n 1  0 328212 224616 211952 5620072    0    0     0   151  983 1683 84  2  8  6  0
\n
\n
\n
\n

pv -L \u3067\u5e2f\u57df\u7d5e\u3063\u3066\u307f\u307e\u3057\u305f\uff0e
\ncpu \u306e\u69d8\u5b50\u3092\u898b\u306a\u304c\u3089\u3060\u3093\u3060\u3093\u7d5e\u3063\u3066\u3044\u3063\u3066 128k \u8fc4\u7d5e\u3063\u3066\u3084\u3063\u3068 xz \u306e cpu 25\u301c40% \u4f4d\u306b\u306a\u308a\u307e\u3057\u305f\uff0e\u3053\u306e\u72b6\u614b\u3060\u3068\u666e\u901a\u306b\u4f7f\u3048\u308b\u611f\u3058\u3067\u3059\uff0e
\n\u3057\u3070\u3089\u304f\u3053\u308c\u3067\u8a66\u3057\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n
pv \u3067\u5e2f\u57df\u5236\u9650
\n
\n
$ time sh -c \"nice -n 19 ionice -c 3 mysqldump --defaults-file=/backup/micro/.my-backup.cnf --single-transaction --quick\r\n--all-databases --events | pv -L 128k 2>/dev/null | nice -n 19 ionice -c 3 xz -9 > /dev/null\"\r\n\r\nreal 127m16.113s\r\nuser 34m30.508s\r\nsys 0m23.428s
\n
\n
\n
\n
cron\u3067\u306e\u5b9f\u884c
\n
\n
$ sudo -u backup crontab -l | grep mysqldump\r\n14 3 * * *     umask 0266 && nice -n 19 ionice -c 3 /usr/bin/mysqldump --defaults-file=/mnt/backup/micro/.my-backup.cnf --single-transaction --quick --all-databases --events | pv -L 128k 2>/dev/null | nice -n 19 ionice -c 3 /usr/bin/xz -9 > /mnt/backup/micro/`date +\\%F_\\%T_$$`.sql.xz
\n
\n
\n
\n
\u74b0\u5883
\n
\n
$ dpkg-query -W mysql-client-5.7 pv xz-utils\r\nmysql-client-5.7        5.7.23-0ubuntu0.16.04.1\r\npv      1.6.0-1\r\nxz-utils        5.1.1alpha+20120614-2ubuntu2\r\n$ lsb_release -d\r\nDescription:    Ubuntu 16.04.5 LTS\r\n$ uname -m\r\nx86_64\r\n$ grep -m1 model\\ name /proc/cpuinfo\r\nmodel name      : AMD Athlon(tm) II Neo N36L Dual-Core Processor
\n
\n
\n", "content_text": "mysqldump \u52d5\u3044\u3066\u308b\u6642\u9593\u306b\u540c\u30b5\u30fc\u30d0\u3067 GNU social \u3068\u304b Nextcloud \u3068\u304b\u306e mysql \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u91cd\u304f\u3066\u4f7f\u3044\u7269\u306b\u306a\u3089\u306a\u3044\u3067\u3059\uff0enice + ionice \u306f\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u304c\u52b9\u3044\u3066\u306a\u3044\u611f\u3058\uff0e\ndump \u3057\u305f sql \u3092\u5727\u7e2e\u3057\u3066\u3044\u308b xz \u30b3\u30de\u30f3\u30c9\u304c cpu \u30921 core \u4f7f\u3044\u6f70\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e\u3053\u306e\u30de\u30b7\u30f3\u306f2 core \u3042\u308b\u306e\u3067\u3059\u304c\uff0c\u3082\u30461\u3064\u306e core \u3082\u305d\u306e\u4ed6\u306e\u51e6\u7406\u3067\u307b\u307c\u4f7f\u3044\u5207\u3063\u3066\u5f85\u3061\u304c\u51fa\u3066\u3044\u308b\u3088\u3046\u306a\u611f\u3058\uff0e\n\n\n\n$ vmstat 1 10\r\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\r\n r b swpd free buff cache si so bi bo in cs us sy id wa st\r\n 2 0 328212 264788 212260 5628192 1 2 35 160 2 15 35 9 44 12 0\r\n 1 1 328212 259136 212264 5628192 0 0 0 191 1497 3132 63 6 19 12 0\r\n 1 1 328212 252492 212264 5628192 0 0 0 88 959 1716 81 6 7 6 0\r\n 2 1 328212 248264 212264 5628196 0 0 0 114 973 1887 85 3 7 5 0\r\n 2 0 328212 242572 212264 5628196 0 0 0 85 972 1967 74 5 15 5 0\r\n 4 0 328212 241664 212100 5624380 0 0 0 97 1106 4226 91 7 2 2 0\r\n 2 1 328212 234268 212100 5624384 0 0 0 140 1013 1815 70 5 19 7 0\r\n 3 0 328212 235760 211944 5620076 0 0 0 2461 1289 4063 94 4 1 0 0\r\n 1 0 328212 229656 211944 5620080 0 0 0 110 953 1685 61 6 18 15 0\r\n 1 0 328212 224616 211952 5620072 0 0 0 151 983 1683 84 2 8 6 0\n\n\n\npv -L \u3067\u5e2f\u57df\u7d5e\u3063\u3066\u307f\u307e\u3057\u305f\uff0e\ncpu \u306e\u69d8\u5b50\u3092\u898b\u306a\u304c\u3089\u3060\u3093\u3060\u3093\u7d5e\u3063\u3066\u3044\u3063\u3066 128k \u8fc4\u7d5e\u3063\u3066\u3084\u3063\u3068 xz \u306e cpu 25\u301c40% \u4f4d\u306b\u306a\u308a\u307e\u3057\u305f\uff0e\u3053\u306e\u72b6\u614b\u3060\u3068\u666e\u901a\u306b\u4f7f\u3048\u308b\u611f\u3058\u3067\u3059\uff0e\n\u3057\u3070\u3089\u304f\u3053\u308c\u3067\u8a66\u3057\u3066\u307f\u307e\u3059\uff0e\n\n\npv \u3067\u5e2f\u57df\u5236\u9650\n\n$ time sh -c \"nice -n 19 ionice -c 3 mysqldump --defaults-file=/backup/micro/.my-backup.cnf --single-transaction --quick\r\n--all-databases --events | pv -L 128k 2>/dev/null | nice -n 19 ionice -c 3 xz -9 > /dev/null\"\r\n\r\nreal 127m16.113s\r\nuser 34m30.508s\r\nsys 0m23.428s\n\n\n\ncron\u3067\u306e\u5b9f\u884c\n\n$ sudo -u backup crontab -l | grep mysqldump\r\n14 3 * * * umask 0266 && nice -n 19 ionice -c 3 /usr/bin/mysqldump --defaults-file=/mnt/backup/micro/.my-backup.cnf --single-transaction --quick --all-databases --events | pv -L 128k 2>/dev/null | nice -n 19 ionice -c 3 /usr/bin/xz -9 > /mnt/backup/micro/`date +\\%F_\\%T_$$`.sql.xz\n\n\n\n\u74b0\u5883\n\n$ dpkg-query -W mysql-client-5.7 pv xz-utils\r\nmysql-client-5.7 5.7.23-0ubuntu0.16.04.1\r\npv 1.6.0-1\r\nxz-utils 5.1.1alpha+20120614-2ubuntu2\r\n$ lsb_release -d\r\nDescription: Ubuntu 16.04.5 LTS\r\n$ uname -m\r\nx86_64\r\n$ grep -m1 model\\ name /proc/cpuinfo\r\nmodel name : AMD Athlon(tm) II Neo N36L Dual-Core Processor", "date_published": "2018-10-11T06:40:22+09:00", "date_modified": "2018-10-11T06:40:22+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": [ "mysql", "mysqldump", "pv", "xz", "Linux", "Ubuntu", "xenial(16.04)" ] } ] }