最小化安装的 主要查看硬盘使用时间
需要安装
- smartmontools 这个
- [root@localhost ~]# yum install -y smartmontools
- 已加载插件:fastestmirror
- base | 3.6 kB 00:00
- extras | 3.4 kB 00:00
- updates | 3.4 kB 00:00
- (1/2): extras/7/x86_64/primary_db | 42 kB 00:00
- (2/2): updates/7/x86_64/primary_db | 6.0 MB 00:02
- Loading mirror speeds from cached hostfile
- * base: mirrors.yun-idc.com
- * extras: mirrors.yun-idc.com
- * updates: mirrors.yun-idc.com
- 正在解决依赖关系
- --> 正在检查事务
- ---> 软件包 smartmontools.x86_64.1.6.2-4.el7 将被 安装
- --> 正在处理依赖关系 mailx,它被软件包 1:smartmontools-6.2-4.el7.x86_64 需要
- --> 正在检查事务
- ---> 软件包 mailx.x86_64.0.12.5-12.el7_0 将被 安装
- --> 解决依赖关系完成
- 依赖关系解决
- ================================================================================
- Package 架构 版本 源 大小
- ================================================================================
- 正在安装:
- smartmontools x86_64 1:6.2-4.el7 base 403 k
- 为依赖而安装:
- mailx x86_64 12.5-12.el7_0 updates 244 k
- 事务概要
- ================================================================================
- 安装 1 软件包 (+1 依赖软件包)
- 总下载量:647 k
- 安装大小:1.9 M
- Downloading packages:
- (1/2): mailx-12.5-12.el7_0.x86_64.rpm | 244 kB 00:00
- (2/2): smartmontools-6.2-4.el7.x86_64.rpm | 403 kB 00:00
- --------------------------------------------------------------------------------
- 总计 780 kB/s | 647 kB 00:00
- Running transaction check
- Running transaction test
- Transaction test succeeded
- Running transaction
- 正在安装 : mailx-12.5-12.el7_0.x86_64 1/2
- 正在安装 : 1:smartmontools-6.2-4.el7.x86_64 2/2
- 验证中 : 1:smartmontools-6.2-4.el7.x86_64 1/2
- 验证中 : mailx-12.5-12.el7_0.x86_64 2/2
- 已安装:
- smartmontools.x86_64 1:6.2-4.el7
- 作为依赖被安装:
- mailx.x86_64 0:12.5-12.el7_0
- 完毕!
- [root@localhost ~]#
查看下硬盘
- [root@localhost ~]# df
- 文件系统 1K-块 已用 可用 已用% 挂载点
- /dev/sda3 51175000 52896 51122104 1% /
- devtmpfs 1918536 0 1918536 0% /dev
- tmpfs 1924208 0 1924208 0% /dev/shm
- tmpfs 1924208 25016 1899192 2% /run
- tmpfs 1924208 0 1924208 0% /sys/fs/cgroup
- /dev/sda5 51175000 816060 50358940 2% /usr
- /dev/sda8 102309060 32928 102276132 1% /home
- /dev/sda6 30705000 198424 30506576 1% /var
- /dev/sda2 508588 81632 426956 17% /boot
smartctl 帮助
- [root@localhost ~]# smartctl -h
- smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-123.el7.x86_64] (local build)
- Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
- Usage: smartctl [options] device
- ============================================ SHOW INFORMATION OPTIONS =====
- -h, --help, --usage
- Display this help and exit
- -V, --version, --copyright, --license
- Print license, copyright, and version information and exit
- -i, --info
- Show identity information for device
- --identify[=[w][nvb]]
- Show words and bits from IDENTIFY DEVICE data (ATA)
- -g NAME, --get=NAME
- Get device setting: all, aam, apm, lookahead, security, wcache, rcache, wcreorder
- -a, --all
- Show all SMART information for device
- -x, --xall
- Show all information for device
- --scan
- Scan for devices
- --scan-open
- Scan for devices and try to open each device
- ================================== SMARTCTL RUN-TIME BEHAVIOR OPTIONS =====
- -q TYPE, --quietmode=TYPE (ATA)
- Set smartctl quiet mode to one of: errorsonly, silent, noserial
- -d TYPE, --device=TYPE
- Specify device type to one of: ata, scsi, sat[,auto][,N][+TYPE], usbcypress[,X], usbjmicron[,p][,x][,N], usbsunplus, marvell, areca,N/E, 3ware,N, hpt,L/M/N, megaraid,N, cciss,N, auto, test
- -T TYPE, --tolerance=TYPE (ATA)
- Tolerance: normal, conservative, permissive, verypermissive
- -b TYPE, --badsum=TYPE (ATA)
- Set action on bad checksum to one of: warn, exit, ignore
- -r TYPE, --report=TYPE
- Report transactions (see man page)
- -n MODE, --nocheck=MODE (ATA)
- No check if: never, sleep, standby, idle (see man page)
- ============================== DEVICE FEATURE ENABLE/DISABLE COMMANDS =====
- -s VALUE, --smart=VALUE
- Enable/disable SMART on device (on/off)
- -o VALUE, --offlineauto=VALUE (ATA)
- Enable/disable automatic offline testing on device (on/off)
- -S VALUE, --saveauto=VALUE (ATA)
- Enable/disable Attribute autosave on device (on/off)
- -s NAME[,VALUE], --set=NAME[,VALUE]
- Enable/disable/change device setting: aam,[N|off], apm,[N|off],
- lookahead,[on|off], security-freeze, standby,[N|off|now],
- wcache,[on|off], rcache,[on|off], wcreorder,[on|off]
- ======================================= READ AND DISPLAY DATA OPTIONS =====
- -H, --health
- Show device SMART health status
- -c, --capabilities (ATA)
- Show device SMART capabilities
- -A, --attributes
- Show device SMART vendor-specific Attributes and values
- -f FORMAT, --format=FORMAT (ATA)
- Set output format for attributes: old, brief, hex[,id|val]
- -l TYPE, --log=TYPE
- Show device log. TYPE: error, selftest, selective, directory[,g|s],
- xerror[,N][,error], xselftest[,N][,selftest],
- background, sasphy[,reset], sataphy[,reset],
- scttemp[sts,hist], scttempint,N[,p],
- scterc[,N,M], devstat[,N], ssd,
- gplog,N[,RANGE], smartlog,N[,RANGE]
- -v N,OPTION , --vendorattribute=N,OPTION (ATA)
- Set display OPTION for vendor Attribute N (see man page)
- -F TYPE, --firmwarebug=TYPE (ATA)
- Use firmware bug workaround:
- none, nologdir, samsung, samsung2, samsung3, xerrorlba, swapid
- -P TYPE, --presets=TYPE (ATA)
- Drive-specific presets: use, ignore, show, showall
- -B [+]FILE, --drivedb=[+]FILE (ATA)
- Read and replace [add] drive database from FILE
- [default is +/etc/smartmontools/smart_drivedb.h
- and then /usr/share/smartmontools/drivedb.h]
- ============================================ DEVICE SELF-TEST OPTIONS =====
- -t TEST, --test=TEST
- Run test. TEST: offline, short, long, conveyance, force, vendor,N,
- select,M-N, pending,N, afterselect,[on|off]
- -C, --captive
- Do test in captive mode (along with -t)
- -X, --abort
- Abort any non-captive test on device
- =================================================== SMARTCTL EXAMPLES =====
- smartctl --all /dev/hda (Prints all SMART information)
- smartctl --smart=on --offlineauto=on --saveauto=on /dev/hda
- (Enables SMART on first disk)
- smartctl --test=long /dev/hda (Executes extended disk self-test)
- smartctl --attributes --log=selftest --quietmode=errorsonly /dev/hda
- (Prints Self-Test & Attribute errors)
- smartctl --all --device=3ware,2 /dev/sda
- smartctl --all --device=3ware,2 /dev/twe0
- smartctl --all --device=3ware,2 /dev/twa0
- smartctl --all --device=3ware,2 /dev/twl0
- (Prints all SMART info for 3rd ATA disk on 3ware RAID controller)
- smartctl --all --device=hpt,1/1/3 /dev/sda
- (Prints all SMART info for the SATA disk attached to the 3rd PMPort
- of the 1st channel on the 1st HighPoint RAID controller)
- smartctl --all --device=areca,3/1 /dev/sg2
- (Prints all SMART info for 3rd ATA disk of the 1st enclosure
- on Areca RAID controller)
- [root@localhost ~]#
先扫描一下
- [root@localhost ~]# smartctl --scan
- /dev/sda -d scsi # /dev/sda, SCSI device
然后显示信息
- [root@localhost ~]# smartctl -a /dev/sda
- smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-123.el7.x86_64] (local build)
- Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
- === START OF INFORMATION SECTION ===
- Model Family: Seagate SV35.5
- Device Model: ST3250311SV
- Serial Number: 9VY2FF0C
- LU WWN Device Id: 5 000c50 009e091cd
- Firmware Version: CV12
- User Capacity: 250,059,350,016 bytes [250 GB]
- Sector Size: 512 bytes logical/physical
- Rotation Rate: 7200 rpm
- Device is: In smartctl database [for details use: -P show]
- ATA Version is: ATA8-ACS T13/1699-D revision 4
- SATA Version is: SATA 2.6, 3.0 Gb/s (current: 3.0 Gb/s)
- Local Time is: Mon Dec 22 09:52:57 2014 CST
- 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
- General SMART Values:
- Offline data collection status: (0x82) Offline data collection activity
- was completed without error.
- Auto Offline Data Collection: Enabled.
- 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: ( 592) seconds.
- Offline data collection
- capabilities: (0x7b) SMART execute Offline immediate.
- Auto Offline data collection on/off 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: ( 42) minutes.
- Conveyance self-test routine
- recommended polling time: ( 2) minutes.
- SCT capabilities: (0x10bb) SCT Status supported.
- SCT Error Recovery Control supported.
- SCT Feature Control supported.
- SCT Data Table supported.
- SMART Attributes Data Structure revision number: 10
- Vendor Specific SMART Attributes with Thresholds:
- ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
- 1 Raw_Read_Error_Rate 0x000f 114 082 006 Pre-fail Always - 81184867
- 3 Spin_Up_Time 0x0003 097 097 000 Pre-fail Always - 0
- 4 Start_Stop_Count 0x0032 099 099 020 Old_age Always - 1454
- 5 Reallocated_Sector_Ct 0x0033 098 098 036 Pre-fail Always - 93
- 7 Seek_Error_Rate 0x000f 078 060 030 Pre-fail Always - 78905713
- 9 Power_On_Hours 0x0032 095 095 000 Old_age Always - 4716
- 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
- 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 760
- 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
- 187 Reported_Uncorrect 0x0032 001 001 000 Old_age Always - 6520
- 188 Command_Timeout 0x0032 100 092 000 Old_age Always - 111670855328
- 189 High_Fly_Writes 0x003a 051 051 000 Old_age Always - 49
- 190 Airflow_Temperature_Cel 0x0022 074 061 045 Old_age Always - 26 (Min/Max 15/34)
- 194 Temperature_Celsius 0x0022 026 040 000 Old_age Always - 26 (0 8 0 0 0)
- 195 Hardware_ECC_Recovered 0x001a 052 040 000 Old_age Always - 81184867
- 197 Current_Pending_Sector 0x0012 100 098 000 Old_age Always - 0
- 198 Offline_Uncorrectable 0x0010 100 098 000 Old_age Offline - 0
- 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 6
- SMART Error Log Version: 1
- ATA Error Count: 6687 (device log contains only the most recent five errors)
- CR = Command Register [HEX]
- FR = Features Register [HEX]
- SC = Sector Count Register [HEX]
- SN = Sector Number Register [HEX]
- CL = Cylinder Low Register [HEX]
- CH = Cylinder High Register [HEX]
- DH = Device/Head Register [HEX]
- DC = Device Command Register [HEX]
- ER = Error register [HEX]
- ST = Status register [HEX]
- Powered_Up_Time is measured from power on, and printed as
- DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
- SS=sec, and sss=millisec. It "wraps" after 49.710 days.
- Error 6687 occurred at disk power-on lifetime: 4492 hours (187 days + 4 hours)
- When the command that caused the error occurred, the device was active or idle.
- After command completion occurred, registers were:
- ER ST SC SN CL CH DH
- -- -- -- -- -- -- --
- 40 51 00 34 97 e8 00 Error: UNC at LBA = 0x00e89734 = 15243060
- Commands leading to the command that caused the error were:
- CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
- -- -- -- -- -- -- -- -- ---------------- --------------------
- 42 00 ff 80 96 e8 40 00 14:38:21.748 READ VERIFY SECTOR(S) EXT
- 42 ff ff 01 1c e2 e0 00 14:38:19.940 READ VERIFY SECTOR(S) EXT
- 42 00 ff 02 1b e2 40 00 14:38:19.890 READ VERIFY SECTOR(S) EXT
- 42 ff ff 1c 01 e2 e0 00 14:38:19.866 READ VERIFY SECTOR(S) EXT
- 42 00 ff 1d 00 e2 40 00 14:38:19.815 READ VERIFY SECTOR(S) EXT
- Error 6686 occurred at disk power-on lifetime: 4453 hours (185 days + 13 hours)
- When the command that caused the error occurred, the device was active or idle.
- After command completion occurred, registers were:
- ER ST SC SN CL CH DH
- -- -- -- -- -- -- --
- 40 51 00 ab 7a 94 0d Error: UNC at LBA = 0x0d947aab = 227834539
- Commands leading to the command that caused the error were:
- CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
- -- -- -- -- -- -- -- -- ---------------- --------------------
- 60 00 00 ba 79 94 4d 00 01:45:18.075 READ FPDMA QUEUED
- 00 00 00 00 00 00 00 04 01:45:17.543 NOP [Abort queued commands]
- 60 00 00 ba 6d 94 4d 00 01:45:16.445 READ FPDMA QUEUED
- 60 00 00 ba 6c 94 4d 00 01:45:16.435 READ FPDMA QUEUED
- 60 00 00 ba 6b 94 4d 00 01:45:16.435 READ FPDMA QUEUED
- Error 6685 occurred at disk power-on lifetime: 4453 hours (185 days + 13 hours)
- When the command that caused the error occurred, the device was active or idle.
- After command completion occurred, registers were:
- ER ST SC SN CL CH DH
- -- -- -- -- -- -- --
- 40 51 00 ab 7a 94 0d Error: UNC at LBA = 0x0d947aab = 227834539
- Commands leading to the command that caused the error were:
- CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
- -- -- -- -- -- -- -- -- ---------------- --------------------
- 60 00 00 ba 6d 94 4d 00 01:45:16.445 READ FPDMA QUEUED
- 60 00 00 ba 6c 94 4d 00 01:45:16.435 READ FPDMA QUEUED
- 60 00 00 ba 6b 94 4d 00 01:45:16.435 READ FPDMA QUEUED
- 60 00 00 ba 6a 94 4d 00 01:45:16.434 READ FPDMA QUEUED
- 60 00 00 ba 69 94 4d 00 01:45:16.433 READ FPDMA QUEUED
- Error 6684 occurred at disk power-on lifetime: 4452 hours (185 days + 12 hours)
- When the command that caused the error occurred, the device was active or idle.
- After command completion occurred, registers were:
- ER ST SC SN CL CH DH
- -- -- -- -- -- -- --
- 40 51 00 48 3a 1e 03 Error: UNC at LBA = 0x031e3a48 = 52312648
- Commands leading to the command that caused the error were:
- CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
- -- -- -- -- -- -- -- -- ---------------- --------------------
- 60 00 00 00 3a 1e 43 00 00:20:57.203 READ FPDMA QUEUED
- 00 00 00 00 00 00 00 04 00:20:56.672 NOP [Abort queued commands]
- 60 00 00 00 25 1e 43 00 00:20:55.533 READ FPDMA QUEUED
- 60 00 00 00 24 1e 43 00 00:20:55.526 READ FPDMA QUEUED
- 60 00 00 00 23 1e 43 00 00:20:55.526 READ FPDMA QUEUED
- Error 6683 occurred at disk power-on lifetime: 4452 hours (185 days + 12 hours)
- When the command that caused the error occurred, the device was active or idle.
- After command completion occurred, registers were:
- ER ST SC SN CL CH DH
- -- -- -- -- -- -- --
- 40 51 00 48 3a 1e 03 Error: UNC at LBA = 0x031e3a48 = 52312648
- Commands leading to the command that caused the error were:
- CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
- -- -- -- -- -- -- -- -- ---------------- --------------------
- 60 00 00 00 25 1e 43 00 00:20:55.533 READ FPDMA QUEUED
- 60 00 00 00 24 1e 43 00 00:20:55.526 READ FPDMA QUEUED
- 60 00 00 00 23 1e 43 00 00:20:55.526 READ FPDMA QUEUED
- 60 00 00 00 22 1e 43 00 00:20:55.525 READ FPDMA QUEUED
- 60 00 00 00 21 1e 43 00 00:20:55.524 READ FPDMA QUEUED
- 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.
以上就是centos 7.0 安装的详细内容,更多关于centos 7.0 安装的资料请关注九品源码其它相关文章!