fc_host test

    0

    0

    Gogo-scc

    This code tests a storage controller's connection to a host. The code loops indefinitely, waiting 5 seconds between each test. The code prints the current date and time, as well as the system's uptime. It then tests each statistic file in /sys/class/fc_host/host*/statistics/, counting the number of files that have been read since the last test. If the file exists, it prints the contents of the file.

    #Test HBA connect
    #! /bin/sh
    hostname
    while true
    do
      echo '#' $(date +%F) $(uptime)
      for f in /sys/class/fc_host/host*/statistics/{error_frames,invalid_*}
      do
        [ -f $f ] && echo $f $(cat $f)
      done
      sleep 5
    done
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.