linus@ubuntu1804:~/Applications/pt-7.1.1$ LD_LIBRARY_PATH=lib bin/PacketTracer7
bin/PacketTracer7: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
linus@ubuntu1804:~/Applications/pt-7.1.1$ LD_LIBRARY_PATH=lib ldd bin/PacketTracer7 | grep "not found" | sort | uniq
libicui18n.so.52 => not found
libicuuc.so.52 => not found
libpng12.so.0 => not found
Packet Tracer 7.1.1 を使用するにあたり、追加で必要になるライブラリは下記の通り。Kali Linux (MATE Edition) でも試したが libxslt が不足していたような気がする。
linus@ubuntu1604:~/Applications/pt-7.1.1$ LD_LIBRARY_PATH=lib ldd bin/PacketTracer7 | grep "not found" | sort | uniq
libicui18n.so.52 => not found
libicuuc.so.52 => not found
linus@ubuntu1804:~/Applications/pt-7.1.1$ LD_LIBRARY_PATH=lib ldd bin/PacketTracer7 | grep "not found" | sort | uniq
libicui18n.so.52 => not found
libicuuc.so.52 => not found
libpng12.so.0 => not found
linus@debian9:~/Applications/pt-7.1.1$ LD_LIBRARY_PATH=lib ldd bin/PacketTracer7 | grep "not found" | sort | uniq
libcrypto.so.1.0.0 => not found
libicui18n.so.52 => not found
libicuuc.so.52 => not found
libpng12.so.0 => not found
linus@ubuntu1604:~/Applications/pt-7.1.1$ apt-cache search libicu
icu-devtools - Development utilities for International Components for Unicode
libicu-dev - Development files for International Components for Unicode
libicu55 - International Components for Unicode
libicu55-dbg - International Components for Unicode
libicu4j-4.4-java - Library for Unicode support and internationalization
libicu4j-49-java - Library for Unicode support and internationalization
libicu4j-java - Library for Unicode support and internationalization
busybox ar p libicu52_52.1-8+deb8u7_amd64.deb data.tar.xz | xz -dc | tar xf - --wildcards'*/lib/x86_64-linux-gnu/*'--strip-components=2
busybox ar p libpng12-0_1.2.50-2+deb8u3_amd64.deb data.tar.xz | xz -dc | tar xf - --wildcards'./lib/x86_64-linux-gnu/*'
busybox ar p libssl1.0.0_1.0.2l-1~bpo8+1_amd64.deb data.tar.xz | xz -dc | tar xf - --wildcards'*/libcrypto.so.1.0.0'--strip-components=2
さて、いままで IoT デバイスの温度くらいしか収集していなかった Elasticsearch Service ですが、お仕事で Google Playストアの仕様を調べる機会がありまして、進めていくうちに「これ Elasticsearch に入れた面白そう」と思ったので色々とデータを突っ込んでみることにしました。
こちらはリリース時期が新し目のアプリの評価推移です(色設定するの忘れた)。9月末に配信された Nintendo のドラガリアロストが順調に評価を獲得していますね。「アトリエ オンライン ~ブレセイルの錬金術士~」や「カスタムキャスト」なんかも順調(たまに評価数が減る現象はよくわからない)。ワイルドアームズはいまいち伸び悩んでいるようです。
$ sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 7814037168 sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 720AE297-8557-4BAD-85E0-9514702E8D91
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7814037134
Partitions will be aligned on 2048-sector boundaries
Total free space is 1537101 sectors (750.5 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1953127047 931.3 GiB 8300 Linux filesystem
2 1953128448 3906253447 931.3 GiB 8300 Linux filesystem
3 3906254848 5859379847 931.3 GiB 8300 Linux filesystem
4 5859381248 7812506247 931.3 GiB 8300 Linux filesystem
$ mount -t ext4
/dev/mmcblk0p2 on / type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /media/HDCL-UT1 type ext4 (rw,noatime,data=ordered)
/dev/sdc1 on /media/ST3000DM001-1 type ext4 (rw,noatime,data=ordered)
/dev/sdc2 on /media/ST3000DM001-2 type ext4 (rw,noatime,data=ordered)
/dev/sdc3 on /media/ST3000DM001-3 type ext4 (rw,noatime,data=ordered)
/dev/sda1 on /media/ST4000DM004-1 type ext4 (rw,noatime,stripe=8191,data=ordered)
/dev/sda2 on /media/ST4000DM004-2 type ext4 (rw,noatime,stripe=8191,data=ordered)
なんで RAID stripe width付くの…。
$ tune2fs -l /dev/sda1
tune2fs 1.42.13 (17-May-2015)
Filesystem volume name: ST4000DM004-1
Last mounted on: /media/ST4000DM004-1
Filesystem UUID: 763e8fa3-1bf1-448f-b3c6-4915e144c2b2
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 61038592
Block count: 244140625
Reserved block count: 12207031
Free blocks: 162198379
Free inodes: 60786672
First block: 0
Block size: 4096
Fragment size: 4096
Group descriptor size: 64
Reserved GDT blocks: 1024
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
RAID stripe width: 8191
Flex block group size: 16
Filesystem created: Sun Oct 21 21:27:39 2018
Last mount time: Fri Feb 12 01:28:03 2016
Last write time: Fri Feb 12 01:28:03 2016
Mount count: 3
Maximum mount count: -1
Last checked: Sun Oct 21 21:27:39 2018
Check interval: 0 (<none>)
Lifetime writes: 313 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 32
Desired extra isize: 32
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: fff5cb63-86e3-4e0b-996e-78a6c3c4fbdf
Journal backup: inode blocks
Checksum: 0xffeec98a
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial universe
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
http://jp.archive.ubuntu.comで ARM バイナリのミラーを提供しているとのことなのでこちらを利用させていただく。
$ sudo gzip /etc/apt/sources.list
$ gzip -dc /etc/apt/sources.list.gz | sed '/^deb/s|ports.ubuntu.com|jp.archive.ubuntu.com|' | sudo tee /etc/apt/sources.list
差分。
--- /dev/fd/63 2018-11-10 16:59:09.349566783 +0900+++ sources.list 2018-11-10 16:58:16.946964003 +0900@@ -1,35 +1,35 @@
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
-deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted-deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted+deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial main restricted+deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
-deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted-deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted+deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates main restricted+deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
-deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe-deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial universe-deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe-deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe+deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial universe+deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial universe+deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates universe+deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates universe
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
-deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted-deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted+deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-backports main restricted+deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-backports main restricted-deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted-deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted-deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe-deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe-deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse-deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse+deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security main restricted+deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security main restricted+deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security universe+deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security universe+deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security multiverse+deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security multiverse
整形して並べるとこんな感じ。
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial main restricted
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial universe
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial universe
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates universe
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates universe
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security main restricted
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security universe
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security universe
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security multiverse
短い方が管理しやすいかな。
$ gzip /etc/apt/sources.list
$ gzip -dc /etc/apt/sources.list.gz | sed -n '/^deb/s|ports.ubuntu.com|jp.archive.ubuntu.com|p' | column -t | sudo tee /etc/apt/sources.list
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial main restricted
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial universe
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial universe
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates universe
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-updates universe
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security main restricted
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security universe
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security universe
deb http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu-ports/ xenial-security multiverse
actions:1:action: delete_indices
description: delete old logstash indexes.
options:disable_action:Falseignore_empty_list:Truefilters:- filtertype: pattern
kind: prefix
value: logstash-
- filtertype: age
source: name
direction: older
timestring:'%Y.%m.%d'unit: days
unit_count:1
テストなので --dry-runで実行。
$ curator --dry-run ~/.curator/delete_indices.yml
2018-11-21 22:20:39,436 INFO Preparing Action ID: 1, "delete_indices"
2018-11-21 22:20:39,494 INFO Trying Action ID: 1, "delete_indices": delete old logstash indexes.
2018-11-21 22:20:39,600 INFO DRY-RUN MODE. No changes will be made.
2018-11-21 22:20:39,600 INFO (CLOSED) indices may be shown that may not be acted on by action "delete_indices".
2018-11-21 22:20:39,600 INFO DRY-RUN: delete_indices: logstash-2018.11.20 with arguments: {}
2018-11-21 22:20:39,600 INFO Action ID: 1, "delete_indices" completed.
2018-11-21 22:20:39,600 INFO Job completed.
$ curator_cli show_indices
2018-11-21 20:33:05,764 ERROR Elasticsearch version 6.2.3 incompatible with this version of Curator (5.2.0)
Traceback (most recent call last):
File "/usr/bin/curator_cli", line 11, in <module>
load_entry_point('elasticsearch-curator==5.2.0', 'console_scripts', 'curator_cli')()
File "/usr/lib/python2.7/dist-packages/curator/curator_cli.py", line 5, in main
cli(obj={})
File "/usr/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/curator/singletons.py", line 531, in show_indices_singleton
client = get_client(**c_args)
File "/usr/lib/python2.7/dist-packages/curator/utils.py", line 800, in get_client
'Error: {0}'.format(e)
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: Elasticsearch version 6.2.3 incompatible with this version of Curator (5.2.0)
2018-11-21 時点の現行バージョンは 5.6.0 なのでそっちならいけるかと思い確認してみと注釈に AWS ES (which is different from installing Elasticsearch on your own EC2 instances) version 5.3 officially supports Curator.とは書いてあるが AWS ES 6.2 に関する記載は無かった。
AWS Elasticsearch Service をお試してで使ってみたけど用途に対してコスパが悪いので、余ってる Raspberry Pi 3 Model B で運用することにした。Elasticsearch と Kibana を1台の Raspberry Pi 3 Model B で稼働させるのは重いので現在は ASUS Tinker Board や PINE64 Rock64 4GB を使ったり、Kibana だけ手元の Ubuntuで実行していたりする。
#!/bin/shSCRIPT=$0# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.while [-h"$SCRIPT"] ; dols=$(ls -ld "$SCRIPT")# Drop everything prior to ->link=$(expr"$ls" : '.*-> \(.*\)$')if expr"$link" : '/.*'> /dev/null; thenSCRIPT="$link"elseSCRIPT=$(dirname "$SCRIPT")/"$link"fidoneDIR="$(dirname "${SCRIPT}")/.."NODE="${DIR}/node/bin/node"test-x"$NODE" || NODE=$(which node)if [!-x"$NODE"]; thenecho"unable to find usable node.js executable."exit1fiNODE_ENV=production exec"${NODE}"$NODE_OPTIONS--no-warnings"${DIR}/src/cli"${@}
ストアによってランキングから拾える情報が異なるため、ストア間の値の紐付けもしないといけないんだけどまだそこまでは手が回っていない。例えば Google Playにはランキングページに出版社情報が無いため、書く書籍のページも巡回しなきゃいけない、など。また、単に電子書籍で漫画と言ってもカテゴリが細かく分かれているのでその辺りの調査も必要だったりする。
Amazonはランキングの更新間隔が1時間と公表されているので毎日よく変動していて、週刊誌の発売(公開)日は特に変動が激しい。逆に Google Playは1日1回程度とあまり変動は見られない。
リモートの IP を拾っている部分があるのは APIサーバの仕様調査のため。一般に公開されている情報ではないので経験談だが、App Storeの iTunes Search APIは CDNの振り分けで「キャッシュ有り」と「キャッシュ無し」のどこに繋ぎに行くかわからず、ただ単にクローリングしただけでは正しい結果にならない可能性がある(同じ日本国内の同じタイミングでも A さんが見ているランキング結果と B さんが見ているランキング結果が異なることがあるということ)。キャッシュを回避する問い合わせ方法もあるけどそちらは多分推奨されていない。