Linux From Scratch (LFS) のスクリプトですが、tarball にしたものを、sourceforge にアップしました
お疲れさまです、私です。
Linux From Scratch (LFS) のスクリプトですが、tarball にしたものを、sourceforge にアップしました。
ファイルは、Version-8.1-systemd.tar.gz です。
これで、カーネルの直前までは行けると思います。
皆さんもやってみてくださいね。
何かあればお知らせください。
Linux From Scratch (LFS) のスクリプトですが、PART3 まで移設しました
こんにちは、私 です。
Linux From Scratch (LFS) のスクリプトですが、PART3 まで移設しました。
各パッケージの面倒なビルドを、学習効果を損うことなく、半自動化したつもりです。
Grub の設定とカーネルのビルドはご自身で実行してください。
なにかあればお知らせください。
Linux From Scratch のスクリプトを github に移設中です
お疲れさまです、私です。
sourceforge に置いてあった、LFS 用のスクリプトを、github に移設中です。
sourceforge には、バージョン 7.9 用のものを置いていましたが、今回は、8.1 のものに書き直しています。
今のところ、PART2 まで作っています。
PART3 については、できたらまたお知らせします。
何かありましたら、お知らせください。
私 でした。
次回をお楽しみに。
CentOS 7.3 を CR (Continuous Release) を使って7.4 相当にアップグレード
こんにちは、私です。
以下を参考に、CentOS7.3 を CR(Continuous Release) を使ってアップグレードしてみました。
https://wiki.centos.org/AdditionalResources/Repositories/CR
CentOS 5,6,7 でやり方が異なる。
CentOS 7 の場合、
現在のバージョンを確認する。
# cat /etc/centos-release
CentOS Linux release 7.3.1611 (Core)
まず、すべてをアップデートする。
# yum update
# yum-config-manager --enable cr
# yum repolist
(表示例です)
base
cr
extras
updates
cr/7/x86_64/primary_db
Determining fastest mirrors
* base: ftp.nara.wide.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,363
cr/7/x86_64 CentOS-7 - cr 3,838
extras/7/x86_64 CentOS-7 - Extras 451
updates/7/x86_64 CentOS-7 - Updates 2,146
repolist: 15,798 CentOS-7 - Updates 2,146
となっていればよい。こちらでも確認する。
# cat /etc/yum.repos.d/CentOS-CR.repo
enabled=1
となっていればよい。
では、CentOS7.4 に CR をつかってアップデートする。
# yum update
現在のバージョンを確認する。
# cat /etc/centos-release
CentOS Linux release 7.3.1611 (Core)
7.3 のままだけど、CR としては 7.4 になったということか。
お疲れさまです、私でした。
次回をお楽しみに。
SHIRASAGI-hardening のさらなる修正
SHIRASAGI-hardening インストーラーですが、1度実行していて、2度目に実行しても変にならないように直しました。
その他、さらなる関数化等、取り組んでみました。
何かありましたら、お知らせください。
CentOS7.3 への VBoxLinuxAdditionsインストール
お疲れさまです、私 です。
VirtualBox 上のマシンに、SHIRASAGI-hardening のインストーラーで、shirasagi をインストールしたんですが、画面の解像度がイマイチでした。
VBOXADDITIONS のCDマークが出ているので、持ってこなくてもいいのですが、インストールに失敗していました。
cd /var/run/media/xxxx/VBOXADDITIONS_5.1.26_117224/
# ./VBoxLinuxAdditions.run
結果は失敗でした。ログを見ると、KERN_DIR=<kernel> としろと。
# less /var/log/vboxadd-install.log
# yum install kernel-devel
# export KERN_DIR=/usr/src/kernels/3.10.0-514.26.2.el7.x86_64
# ./VBoxLinuxAdditions.run
成功しました。
以上、私 でした。次回をお楽しみに。
SHIRASAGI-hardening の修正
お疲れさまです。私 です。
SHIRASAGI-hardening のインストーラーですが、多少直しました。
コマンドが失敗したら、そこで止まるようにはすでに何ヵ所かしていたのですが、それをもっと増やしてみました。
というのも、あるところでエラーになっていたのに、そのまま先に進んでいるところがあったからです。
イケてないところがまだあるかとは思いますので、何かあれば教えてください。
お疲れさまです、私 でした。
dbus を使ってみる(その4)
dbus を使ってみる(その3)
こんにちは、私です。
DBus を使ってみる実験ですけど、C言語でやることは、けっこう大変みたいです。色んな言語のバインディングがあるみたいですが、最近ちょっと慣れた Python のバインディングがいいかな、と思いました。
どんなバインディングがあるのかは、以下のリンクを参考にしてください。
翻訳してもいいんですが、怒られそうなので、やめときます。
https://www.freedesktop.org/wiki/Software/DBusBindings/
さて、上記リンクをざっと読んだら、早速具体的に試してみたいところです。
また、いいチュートリアルがあるかなと、探してみたところ、以下のリンクを発見しました。まとめ直してもいいんですけど、怒られそうなので、やめときます。
さて、ここで紹介されているコードを実際に動かしてみたところ、d-feet でキャッチする事ができました。例示されているコードには、作者の名前が埋め込まれているので、これを適宜変えれば、自分のコードとして使えるかもしれません。投げるコードと受けるコードがありますが、投げるコードを投げないと、受けるコードで systrace が出ちゃいます。
これ、みっともないな、と思って調べていたところ、以下のリンクを発見しました。
上記リンクの指示に従ったら、systrace は表示されなくなりました。
このへんをまとめようかと思いましたけど、怒られそうなのでやめときます。
ということで、やりたいことが、見えてきた感じです。
お疲れさまです、本日の実験は終了です。
私でした、次回をお楽しみに。
dbus を使ってみる(その2)
こんにちは、私です。
今日は、ここを見てみました。
http://pkpkbook.eha03.biz/?page_id=3976
さて、自分の端末で、コマンドを叩いてみます。
====
存在するパスの一覧を、配列で取得するコマンドです。
system bus について確認してみます。
$ dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames
(Fedora26 での表示結果です)
method return time=1503147498.801389 sender=org.freedesktop.DBus -> destination=:1.128 serial=3 reply_serial=2
array [
string "org.freedesktop.DBus"
string ":1.128"
string ":1.7"
string ":1.9"
string "org.freedesktop.systemd1"
string "org.fedoraproject.FirewallD1"
string "org.freedesktop.ModemManager1"
string "org.freedesktop.NetworkManager"
string "com.redhat.ifcfgrh1"
string "org.freedesktop.RealtimeKit1"
string "org.freedesktop.Accounts"
string ":1.40"
string ":1.41"
string ":1.64"
string "org.freedesktop.PolicyKit1"
string ":1.43"
string "org.bluez"
string ":1.44"
string ":1.46"
string ":1.24"
string ":1.69"
string ":1.26"
string "fi.epitest.hostap.WPASupplicant"
string "org.freedesktop.Avahi"
string "org.freedesktop.UDisks2"
string "org.fedoraproject.SetroubleshootFixit"
string "fi.w1.wpa_supplicant1"
string "org.freedesktop.login1"
string "org.freedesktop.ColorManager"
string ":1.72"
string ":1.50"
string ":1.73"
string ":1.51"
string "org.freedesktop.DisplayManager"
string ":1.30"
string ":1.31"
string ":1.98"
string "org.freedesktop.problems.daemon"
string ":1.10"
string ":1.32"
string ":1.99"
string ":1.11"
string ":1.33"
string "org.freedesktop.UPower"
string ":1.0"
string ":1.35"
string ":1.1"
string ":1.14"
string ":1.36"
string ":1.37"
string ":1.2"
string ":1.15"
string "org.freedesktop.problems"
string ":1.38"
string ":1.3"
string ":1.16"
string ":1.39"
string ":1.4"
string ":1.17"
string ":1.5"
string ":1.18"
string ":1.6"
string ":1.19"
]
session bus について確認してみます。
$ dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames
(Fedora26 での表示結果です)
method return time=1503147450.719214 sender=org.freedesktop.DBus -> destination=:1.119 serial=3 reply_serial=2
array [
string "org.freedesktop.DBus"
string "org.freedesktop.PowerManagement"
string "org.freedesktop.network-manager-applet"
string "org.freedesktop.systemd1"
string "org.xfce.Terminal5"
string "org.xfce.Xfconf"
string "org.gtk.vfs.mountpoint_2756"
string "org.gtk.vfs.Daemon"
string "org.pulseaudio.Server"
string "org.freedesktop.problems.applet"
string ":1.81"
string "org.xfce.Panel"
string ":1.60"
string ":1.61"
string ":1.62"
string "org.gnome.GConf"
string ":1.63"
string "org.a11y.Bus"
string ":1.41"
string "org.gtk.vfs.UDisks2VolumeMonitor"
string ":1.64"
string ":1.20"
string ":1.42"
string ":1.21"
string ":1.43"
string ":1.66"
string ":1.22"
string ":1.44"
string ":1.23"
string ":1.45"
string ":1.46"
string ":1.69"
string ":1.25"
string "org.xfce.xfdesktop"
string ":1.47"
string ":1.26"
string ":1.48"
string ":1.49"
string ":1.27"
string "org.xfce.PowerManager"
string "org.xfce.FileManager"
string ":1.28"
string "com.redhat.imsettings"
string ":1.29"
string "ca.desrt.dconf"
string "org.freedesktop.ReserveDevice1.Audio0"
string ":1.119"
string "org.PulseAudio1"
string "org.xfce.SessionManager"
string "org.gnome.d-feet"
string ":1.70"
string ":1.71"
string "org.xfce.Thunar"
string "org.blueman.Applet"
string ":1.50"
string ":1.51"
string ":1.74"
string "org.gtk.vfs.Metadata"
string ":1.52"
string ":1.75"
string ":1.53"
string ":1.31"
string ":1.76"
string ":1.32"
string ":1.55"
string ":1.56"
string ":1.57"
string ":1.0"
string ":1.58"
string ":1.36"
string ":1.59"
string "org.xfce.SettingsDaemon"
string ":1.38"
string ":1.4"
string ":1.5"
string "org.freedesktop.IBus"
string ":1.19"
]
====
D-Busの仕様にある標準インターフェースを得る方法です。特定のオブジェクトのインターフェースがXML形式で返却されました。
system bus の検索結果です。
$ dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect
(Fedora26 での表示結果です)
method return time=1503147306.197404 sender=org.freedesktop.DBus -> destination=:1.127 serial=3 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus">
<method name="Hello">
<arg direction="out" type="s"/>
</method>
<method name="RequestName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="ReleaseName">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="StartServiceByName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="UpdateActivationEnvironment">
<arg direction="in" type="a{ss}"/>
</method>
<method name="NameHasOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="b"/>
</method>
<method name="ListNames">
<arg direction="out" type="as"/>
</method>
<method name="ListActivatableNames">
<arg direction="out" type="as"/>
</method>
<method name="AddMatch">
<arg direction="in" type="s"/>
</method>
<method name="RemoveMatch">
<arg direction="in" type="s"/>
</method>
<method name="GetNameOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="s"/>
</method>
<method name="ListQueuedOwners">
<arg direction="in" type="s"/>
<arg direction="out" type="as"/>
</method>
<method name="GetConnectionUnixUser">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetConnectionUnixProcessID">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetAdtAuditSessionData">
<arg direction="in" type="s"/>
<arg direction="out" type="ay"/>
</method>
<method name="GetConnectionSELinuxSecurityContext">
<arg direction="in" type="s"/>
<arg direction="out" type="ay"/>
</method>
<method name="ReloadConfig">
</method>
<method name="GetId">
<arg direction="out" type="s"/>
</method>
<method name="GetConnectionCredentials">
<arg direction="in" type="s"/>
<arg direction="out" type="a{sv}"/>
</method>
<property name="Features" type="as" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
</property>
<property name="Interfaces" type="as" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
</property>
<signal name="NameOwnerChanged">
<arg type="s"/>
<arg type="s"/>
<arg type="s"/>
</signal>
<signal name="NameLost">
<arg type="s"/>
</signal>
<signal name="NameAcquired">
<arg type="s"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg direction="in" type="s"/>
<arg direction="in" type="s"/>
<arg direction="out" type="v"/>
</method>
<method name="GetAll">
<arg direction="in" type="s"/>
<arg direction="out" type="a{sv}"/>
</method>
<method name="Set">
<arg direction="in" type="s"/>
<arg direction="in" type="s"/>
<arg direction="in" type="v"/>
</method>
<signal name="PropertiesChanged">
<arg type="s" name="interface_name"/>
<arg type="a{sv}" name="changed_properties"/>
<arg type="as" name="invalidated_properties"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg direction="out" type="s"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Monitoring">
<method name="BecomeMonitor">
<arg direction="in" type="as"/>
<arg direction="in" type="u"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Debug.Stats">
<method name="GetStats">
<arg direction="out" type="a{sv}"/>
</method>
<method name="GetConnectionStats">
<arg direction="in" type="s"/>
<arg direction="out" type="a{sv}"/>
</method>
<method name="GetAllMatchRules">
<arg direction="out" type="a{sas}"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="GetMachineId">
<arg direction="out" type="s"/>
</method>
<method name="Ping">
</method>
</interface>
</node>
"
session bus の検索結果です。
$ dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect
(Fedora26の表示結果です)
method return time=1503147700.526298 sender=org.freedesktop.DBus -> destination=:1.120 serial=3 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus">
<method name="Hello">
<arg direction="out" type="s"/>
</method>
<method name="RequestName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="ReleaseName">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="StartServiceByName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="UpdateActivationEnvironment">
<arg direction="in" type="a{ss}"/>
</method>
<method name="NameHasOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="b"/>
</method>
<method name="ListNames">
<arg direction="out" type="as"/>
</method>
<method name="ListActivatableNames">
<arg direction="out" type="as"/>
</method>
<method name="AddMatch">
<arg direction="in" type="s"/>
</method>
<method name="RemoveMatch">
<arg direction="in" type="s"/>
</method>
<method name="GetNameOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="s"/>
</method>
<method name="ListQueuedOwners">
<arg direction="in" type="s"/>
<arg direction="out" type="as"/>
</method>
<method name="GetConnectionUnixUser">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetConnectionUnixProcessID">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetAdtAuditSessionData">
<arg direction="in" type="s"/>
<arg direction="out" type="ay"/>
</method>
<method name="GetConnectionSELinuxSecurityContext">
<arg direction="in" type="s"/>
<arg direction="out" type="ay"/>
</method>
<method name="ReloadConfig">
</method>
<method name="GetId">
<arg direction="out" type="s"/>
</method>
<method name="GetConnectionCredentials">
<arg direction="in" type="s"/>
<arg direction="out" type="a{sv}"/>
</method>
<property name="Features" type="as" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
</property>
<property name="Interfaces" type="as" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
</property>
<signal name="NameOwnerChanged">
<arg type="s"/>
<arg type="s"/>
<arg type="s"/>
</signal>
<signal name="NameLost">
<arg type="s"/>
</signal>
<signal name="NameAcquired">
<arg type="s"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg direction="in" type="s"/>
<arg direction="in" type="s"/>
<arg direction="out" type="v"/>
</method>
<method name="GetAll">
<arg direction="in" type="s"/>
<arg direction="out" type="a{sv}"/>
</method>
<method name="Set">
<arg direction="in" type="s"/>
<arg direction="in" type="s"/>
<arg direction="in" type="v"/>
</method>
<signal name="PropertiesChanged">
<arg type="s" name="interface_name"/>
<arg type="a{sv}" name="changed_properties"/>
<arg type="as" name="invalidated_properties"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg direction="out" type="s"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Monitoring">
<method name="BecomeMonitor">
<arg direction="in" type="as"/>
<arg direction="in" type="u"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Debug.Stats">
<method name="GetStats">
<arg direction="out" type="a{sv}"/>
</method>
<method name="GetConnectionStats">
<arg direction="in" type="s"/>
<arg direction="out" type="a{sv}"/>
</method>
<method name="GetAllMatchRules">
<arg direction="out" type="a{sas}"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="GetMachineId">
<arg direction="out" type="s"/>
</method>
<method name="Ping">
</method>
</interface>
</node>
"
お疲れさまです。私、でした。
次回をお楽しみに。
dbus を使ってみる(その1)
お疲れさまです、私です。
segatex-ng に何をさせようかと考えていたんですが、dbus に流れている何かのデータをどうにかする、ってのを考えました。
まず、d-feet をインストールしました。
Fedora26 では、簡単にインストールできました。
d-feet を立ち上げて、どんなものがあるのかを、確認しました。
org.freedesktop.Notifications というのがありました。
なんだか分かりませんが、これな何を流しているのか、確認してみようと思いました。
ネットで検索したところ、いいチュートリアルがありました。
cheesehead-techblog.blogspot.jp
ここのサイトをなんとなく翻訳すると、怒られそうで、やらないです。皆さんの方で、じっくり読んんでみてくださいね。
では、やってみます。
やりかたは、d-feet の表示画面であたりをつけて、コマンドを打ってみるやり方です。
org.freedesktop.Notifications が、何かを notify していそうなので、man dbus-send と、紹介したチュートリアルを読んで、自分なりに文法に則り構文を組み立ててみました。
以下のようなコマンドを発行して、このような値が返却されたようです。
$ dbus-send --session --print-reply --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.GetServerInformation
(結果)
method return time=1503141720.720741 sender=:1.100 -> destination=:1.112 serial=21 reply_serial=2
string "Xfce Notify Daemon"
string "Xfce"
string "0.3.6"
string "0.9"
なるほど、なんとなくおもしろそうですね。
お疲れさまです。私、でした。
次回をお楽しみに。
shirasagi-hardening
shirasagi-hardening will make pages alive and secure !
https://github.com/intrajp/shirasagi-hardening
smartctl で test を実行してみた
こんにちは、私です。
smartctl を、自分のコンピュータで実行してみました。
# smartctl --test=short /dev/sda
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.11.10-300.fc26.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 1 minutes for test to complete.
Test will complete after Sun Jul 23 10:40:42 2017
Use smartctl -X to abort test.
sort テストを実行したのですが、「Please wait 1 minutes」 ということなので、数分待って、
以下のコマンドを実行しました。
# smartctl -a /dev/sda
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.11.10-300.fc26.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: KINGSTON RBU-SNS8152S3256GG2
Serial Number: 50026B726B05B77B
Firmware Version: SAFM01.R
User Capacity: 256,060,514,304 bytes [256 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: M.2
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Jul 23 10:40:18 2017 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 241) Self-test routine in progress...
10% of test remaining.
Total time to complete Offline
data collection: ( 30) seconds.
Offline data collection
capabilities: (0x79) SMART execute Offline immediate.
No Auto Offline data collection support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 2) minutes.
Conveyance self-test routine
recommended polling time: ( 3) minutes.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Spin_Up_Time 0x0007 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0013 100 100 050 Pre-fail Always - 0
7 Unknown_SSD_Attribute 0x000b 100 100 050 Pre-fail Always - 0
8 Unknown_SSD_Attribute 0x0005 100 100 050 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 2781
12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 199
168 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0
170 Unknown_Attribute 0x0003 100 100 010 Pre-fail Always - 333
173 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 1769543
175 Program_Fail_Count_Chip 0x0013 100 100 050 Pre-fail Always - 0
187 Reported_Uncorrect 0x0012 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0012 100 100 000 Old_age Always - 34
194 Temperature_Celsius 0x0023 041 030 030 Pre-fail Always In_the_past 59 (Min/Max 18/70)
196 Reallocated_Event_Count 0x0002 100 100 010 Old_age Always - 0
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x000b 100 100 050 Pre-fail Always - 0
218 Unknown_Attribute 0x000b 100 100 050 Pre-fail Always - 0
231 Temperature_Celsius 0x0013 100 100 000 Pre-fail Always - 100
233 Media_Wearout_Indicator 0x000b 100 100 000 Pre-fail Always - 977
240 Unknown_SSD_Attribute 0x0013 100 100 000 Pre-fail Always - 0
241 Total_LBAs_Written 0x0012 100 100 000 Old_age Always - 6665
242 Total_LBAs_Read 0x0012 100 100 000 Old_age Always - 1824
244 Unknown_Attribute 0x0002 100 100 000 Old_age Always - 27
245 Unknown_Attribute 0x0002 100 100 000 Old_age Always - 71
246 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 1886464
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
[root@localhost fujiwara]# smartctl -a /dev/sda
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.11.10-300.fc26.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: KINGSTON RBU-SNS8152S3256GG2
Serial Number: 50026B726B05B77B
Firmware Version: SAFM01.R
User Capacity: 256,060,514,304 bytes [256 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: M.2
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Jul 23 10:40:33 2017 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 30) seconds.
Offline data collection
capabilities: (0x79) SMART execute Offline immediate.
No Auto Offline data collection support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 2) minutes.
Conveyance self-test routine
recommended polling time: ( 3) minutes.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Spin_Up_Time 0x0007 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0013 100 100 050 Pre-fail Always - 0
7 Unknown_SSD_Attribute 0x000b 100 100 050 Pre-fail Always - 0
8 Unknown_SSD_Attribute 0x0005 100 100 050 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 2781
12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 199
168 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0
170 Unknown_Attribute 0x0003 100 100 010 Pre-fail Always - 333
173 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 1769543
175 Program_Fail_Count_Chip 0x0013 100 100 050 Pre-fail Always - 0
187 Reported_Uncorrect 0x0012 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0012 100 100 000 Old_age Always - 34
194 Temperature_Celsius 0x0023 040 030 030 Pre-fail Always In_the_past 60 (Min/Max 18/70)
196 Reallocated_Event_Count 0x0002 100 100 010 Old_age Always - 0
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x000b 100 100 050 Pre-fail Always - 0
218 Unknown_Attribute 0x000b 100 100 050 Pre-fail Always - 0
231 Temperature_Celsius 0x0013 100 100 000 Pre-fail Always - 100
233 Media_Wearout_Indicator 0x000b 100 100 000 Pre-fail Always - 977
240 Unknown_SSD_Attribute 0x0013 100 100 000 Pre-fail Always - 0
241 Total_LBAs_Written 0x0012 100 100 000 Old_age Always - 6665
242 Total_LBAs_Read 0x0012 100 100 000 Old_age Always - 1824
244 Unknown_Attribute 0x0002 100 100 000 Old_age Always - 27
245 Unknown_Attribute 0x0002 100 100 000 Old_age Always - 71
246 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 1886464
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 2781 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
(参考)
man 8 smartctl