AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-256345

Chris's questions

Martin Hope
Chris
Asked: 2016-12-01 16:34:24 +0800 CST

以前硬盘的SMART错误或需要更换?

  • 3

尽管磁盘很新鲜 Power_On_Minutes 427h+41m,但我运行得很聪明并提出了一些奇怪的错误

我很好奇,这些是以前硬盘的错误吗?

Error 1 occurred at disk power-on lifetime: 13729 hours (572 days + 1 hours)
  When the command that caused the error occurred, the device was active or idle
Error 2 occurred at disk power-on lifetime: 23300 hours (970 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

这是输出

# smartctl --all /dev/sda
    smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-51-generic] (local build)
    Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

    === START OF INFORMATION SECTION ===
    Model Family:     Toshiba 2.5" HDD MK..76GSX
    Device Model:     TOSHIBA MK2576GSX
    Serial Number:    Y1J9S0IGS
    LU WWN Device Id: 5 000039 3a5a06b8e
    Firmware Version: GS001A
    User Capacity:    250,059,350,016 bytes [250 GB]
    Sector Size:      512 bytes logical/physical
    Rotation Rate:    5400 rpm
    Form Factor:      2.5 inches
    Device is:        In smartctl database [for details use: -P show]
    ATA Version is:   ATA8-ACS (minor revision not indicated)
    SATA Version is:  SATA 2.6, 3.0 Gb/s (current: 3.0 Gb/s)
    Local Time is:    Thu Dec  1 00:28:22 2016 GMT
    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:  (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:                (  120) seconds.
    Offline data collection
    capabilities:                    (0x5b) SMART execute Offline immediate.
                                            Auto Offline data collection on/off support.
                                            Suspend Offline collection upon new
                                            command.
                                            Offline surface scan supported.
                                            Self-test supported.
                                            No 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:        (   2) minutes.
    Extended self-test routine
    recommended polling time:        (  81) minutes.
    SCT capabilities:              (0x003d) SCT Status supported.
                                            SCT Error Recovery Control supported.
                                            SCT Feature Control supported.
                                            SCT Data Table supported.

    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            0x0027   100   100   001    Pre-fail  Always       -       1229
      4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       15
      5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       0
      7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0
      8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
      9 Power_On_Minutes        0x0032   036   036   000    Old_age   Always       -       427h+41m
     10 Spin_Retry_Count        0x0033   100   100   030    Pre-fail  Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       7
    191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
    192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       1
    193 Load_Cycle_Count        0x0032   070   070   000    Old_age   Always       -       304324
    194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       27 (Min/Max 20/31)
    196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
    197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
    198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       2
    220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       109
    222 Loaded_Hours            0x0032   067   067   000    Old_age   Always       -       13230
    223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
    224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0
    226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       375
    240 Head_Flying_Hours       0x0001   100   100   001    Pre-fail  Offline      -       0

    SMART Error Log Version: 1
    ATA Error Count: 2
            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 2 occurred at disk power-on lifetime: 23300 hours (970 days + 20 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
      -- -- -- -- -- -- --
      84 51 01 1f 7a 05 e0  Error: ICRC, ABRT 1 sectors at LBA = 0x00057a1f = 358943

      Commands leading to the command that caused the error were:
      CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
      -- -- -- -- -- -- -- --  ----------------  --------------------
      35 00 00 20 76 05 e0 00   6d+01:49:26.915  WRITE DMA EXT
      35 00 00 00 72 05 e0 00   6d+01:49:26.741  WRITE DMA EXT
      35 00 08 80 0f 0c e0 00   6d+01:49:26.741  WRITE DMA EXT
      35 00 08 48 8a c4 e0 00   6d+01:49:26.741  WRITE DMA EXT
      ca 00 08 00 08 14 e9 00   6d+01:49:26.741  WRITE DMA

    Error 1 occurred at disk power-on lifetime: 13729 hours (572 days + 1 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
      -- -- -- -- -- -- --
      84 51 01 3f 8c 4e e0  Error: ICRC, ABRT 1 sectors at LBA = 0x004e8c3f = 5147711

      Commands leading to the command that caused the error were:
      CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
      -- -- -- -- -- -- -- --  ----------------  --------------------
      35 00 00 40 88 4e e0 00  12d+21:23:20.732  WRITE DMA EXT
      ca 00 08 a8 48 c8 e3 00  12d+21:23:20.731  WRITE DMA
      35 00 08 40 c1 1d e0 00  12d+21:23:20.731  WRITE DMA EXT
      35 00 08 b0 19 14 e0 00  12d+21:23:20.731  WRITE DMA EXT
      35 00 10 28 bf 13 e0 00  12d+21:23:20.731  WRITE DMA EXT

    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.

该硬盘是否可能很快出现故障并需要更换?

linux smart drive-failure
  • 2 个回答
  • 1287 Views
Martin Hope
Chris
Asked: 2015-02-25 04:02:51 +0800 CST

杀死某个进程的修改的批处理文件

  • 0

我正在寻找一个简单的批处理脚本来杀死一个侦听某个 ip 和某个端口的进程。如果与该进程的连接少于 10 个,则应将其终止。如果已建立的连接数超过 10 个,则不应终止该进程。(它可以计算来自 -ano 输出的行数,如果少于 10 行,它应该杀死它)

我目前正在使用类似的脚本,但用于不同的任务:杀死某个进程但不增加它的批处理文件应该减少连接数并在与该 ip:port 的连接少于 x 个时终止该进程。在这种情况下,连接状态无关紧要,只需计算连接数即可。

windows
  • 1 个回答
  • 547 Views
Martin Hope
Chris
Asked: 2015-02-02 14:20:43 +0800 CST

杀死某个进程的批处理文件

  • 1

我正在使用以下脚本来终止处于 CLOSE_WAIT 状态的进程,该进程侦听某个 ip 和某个端口。

FOR /F "tokens=5 delims= " %%I IN (
    'netstat -ano ^| find "127.0.0.1:5900" ^| find "CLOSE_WAIT"'
) DO (
    taskkill /PID %%I
)

该脚本完成了它的工作,但我正在寻找一个小的修改。

我希望只有当有超过 10 个连接进入 CLOSE_WAIT 状态时才终止该进程。如果假设 CLOSE_WAIT 中只有 3 个连接,则不应终止该进程。

windows
  • 1 个回答
  • 3020 Views
Martin Hope
Chris
Asked: 2014-12-20 13:32:19 +0800 CST

Windows防火墙,netsh,阻止文本文件中的所有ip

  • 4

我正在使用以下脚本阻止 ip 从文本文件进入 Windows 防火墙。

我正在使用 Windows 2008 R2

    @echo off
if "%1"=="list" (
  netsh advfirewall firewall show rule Blockit | findstr RemoteIP
  exit/b
)

:: Deleting existing block on ips
netsh advfirewall firewall delete rule name="Blockit"

:: Block new ips (while reading them from blockit.txt)
for /f %%i in (blockit.txt) do (
  netsh advfirewall firewall add rule name="Blockit" protocol=any dir=in action=block remoteip=%%i
  netsh advfirewall firewall add rule name="Blockit" protocol=any dir=out action=block remoteip=%%i
)

:: call this batch again with list to show the blocked IPs
call %0 list

问题是,此脚本为每个被阻止的 IP 创建 1 个单独的规则。

有什么方法可以创建更少的规则,在同一规则上禁止多个 ip?据我所知,每条规则最多允许 200 个被禁止的 ip。因此,当找到 201 号 IP 时,它应该创建一个新规则。这样,如果我们要阻止 1000 个 ip,它将只创建 5 个规则 x 每个规则 200 个 ip,而不是 1000 个规则。

希望有人可以帮助我。谢谢

windows
  • 2 个回答
  • 7970 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve