Linux view hard disk usage time and other information

Source: Internet
Author: User
Tags disk usage

Many commands for viewing hard disk information require root privileges, and if normal users cannot see the information, switch to root:

1, check the hard disk usage time and other information

Hard disk usage time is very important, hard drive theory life is more than 30,000 hours

$ sudo smartctl-a/dev/sda
Smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-431.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

= = = START of READ SMART DATA section = = =
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 0x002f 108 099 006 Pre-fail Always-19969376
3 spin_up_time 0x0023 097 097 pre-fail Always-0
4 Start_stop_count 0x0032 020 old_age Always-101
5 reallocated_sector_ct 0x0033 010 pre-fail Always-0
7 seek_error_rate 0x002f 081 060 030 Pre-fail Always-4421191835
9 power_on_hours 0x0032 092 092 old_age Always-7111
Ten Spin_retry_count 0x0033 097 pre-fail Always-0
Power_cycle_count 0x0032 020 old_age Always-98
Unused_rsvd_blk_cnt_tot 0x002a Old_age Always-667245796
183 Runtime_bad_block 0x0032 Old_age Always-0
184 end-to-end_error 0x0033 097 pre-fail Always-0
187 Reported_uncorrect 0x0032 Old_age Always-0
188 command_timeout 0x0032 099 old_age Always-2
189 high_fly_writes 0x003a 097 097 old_age Always-3
Airflow_temperature_cel 0x0022 066 059 045 old_age Always-34 (Min/max 25/37)
191 g-sense_error_rate 0x0032 Old_age Always-0
192 Power-off_retract_count 0x0032 Old_age Always-18
193 Load_cycle_count 0x0032 095 095 old_age Always-11308
194 Temperature_celsius 0x0022 034 041 old_age Always-34 (0 16 0 0 0)
196 Reallocated_event_count 0x0032 036 old_age Always-0
197 Current_pending_sector 0x0032 Old_age Always-0
198 offline_uncorrectable 0x0030 Old_age Offline-0
199 Udma_crc_error_count 0x0032 Old_age Always-0

2. See if the hard drive has bad path

Wrote Badblocks-v/DEV/SDA
Checking for blocks from 0 to 156290903
Checking for Bad blocks (read-only test): Complete
Pass completed, 0 bad blocks found.

3. View hard disk partition

Wrote Fdisk-l

disk/dev/sda:160.0 GB, 160041885696 bytes
255 heads, Sectors/track, 19457 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x81728172

Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 204800 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 4870 38912000 Linux
/dev/sda3 4870 5132 2097152, Linux Swap/solaris
/DEV/SDA4 5132 19458 115075072-up Linux

4. Viewing the usage of suspended partitions

Wrote Df-h
File system capacity has been used with available percent mount points
/dev/sda2 37G 4.8G 30G 14%/
Tmpfs 466M 552K 466M 1%/DEV/SHM
/DEV/SDA1 194M 28M 156M 16%/boot
/DEV/SDA4 109G 13G 91G 13%/Home

Linux view hard disk usage time and other information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.