smartmontools SVN Rev 5640
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Enumerations | Functions | Variables
os_linux Namespace Reference

Classes

class  linux_aacraid_device
 PMC AacRAID support. More...
 
class  linux_areca_ata_device
 Areca RAID support. More...
 
class  linux_areca_scsi_device
 
class  linux_ata_device
 Linux ATA support. More...
 
class  linux_escalade_device
 CCISS RAID support. More...
 
class  linux_highpoint_device
 Highpoint RAID support. More...
 
class  linux_marvell_device
 Marvell support. More...
 
class  linux_megaraid_device
 LSI MegaRAID support. More...
 
class  linux_nvme_device
 NVMe support. More...
 
class  linux_scsi_device
 Standard SCSI support. More...
 
class  linux_smart_device
 Shared open/close routines. More...
 
class  linux_smart_interface
 Linux interface. More...
 
class  linux_sssraid_device
 3SNIC RAID support More...
 

Enumerations

enum  lk_sg_io_ifc_t { SG_IO_USE_DETECT = 0 , SG_IO_UNSUPP = 1 , SG_IO_USE_V3 = 3 , SG_IO_USE_V4 = 4 }
 

Functions

static int sg_io_cmnd_io (int dev_fd, struct scsi_cmnd_io *iop, int report, enum lk_sg_io_ifc_t sg_io_ifc)
 
static int do_normal_scsi_cmnd_io (int dev_fd, struct scsi_cmnd_io *iop, int report)
 
static int setup_3ware_nodes (const char *nodename, const char *driver_name)
 
static int find_areca_in_proc ()
 
static bool read_id (const std::string &path, unsigned short &id)
 
static bool get_usb_id (const char *name, unsigned short &vendor_id, unsigned short &product_id, unsigned short &version)
 
static unsigned get_kernel_release ()
 
static bool is_hpsa_in_raid_mode (const char *name)
 

Variables

static const char smartctl_examples []
 
static enum lk_sg_io_ifc_t sg_io_interface = SG_IO_USE_DETECT
 

Enumeration Type Documentation

◆ lk_sg_io_ifc_t

Enumerator
SG_IO_USE_DETECT 
SG_IO_UNSUPP 
SG_IO_USE_V3 
SG_IO_USE_V4 

Definition at line 501 of file os_linux.cpp.

Function Documentation

◆ do_normal_scsi_cmnd_io()

static int os_linux::do_normal_scsi_cmnd_io ( int  dev_fd,
struct scsi_cmnd_io iop,
int  report 
)
static

Definition at line 746 of file os_linux.cpp.

◆ find_areca_in_proc()

static int os_linux::find_areca_in_proc ( )
static

Definition at line 2037 of file os_linux.cpp.

◆ get_kernel_release()

static unsigned os_linux::get_kernel_release ( )
static

Definition at line 3359 of file os_linux.cpp.

◆ get_usb_id()

static bool os_linux::get_usb_id ( const char *  name,
unsigned short &  vendor_id,
unsigned short &  product_id,
unsigned short &  version 
)
static

Definition at line 2772 of file os_linux.cpp.

◆ is_hpsa_in_raid_mode()

static bool os_linux::is_hpsa_in_raid_mode ( const char *  name)
static

Definition at line 3372 of file os_linux.cpp.

◆ read_id()

static bool os_linux::read_id ( const std::string &  path,
unsigned short &  id 
)
static

Definition at line 2760 of file os_linux.cpp.

◆ setup_3ware_nodes()

static int os_linux::setup_3ware_nodes ( const char *  nodename,
const char *  driver_name 
)
static

Definition at line 1602 of file os_linux.cpp.

◆ sg_io_cmnd_io()

static int os_linux::sg_io_cmnd_io ( int  dev_fd,
struct scsi_cmnd_io iop,
int  report,
enum lk_sg_io_ifc_t  sg_io_ifc 
)
static

Definition at line 515 of file os_linux.cpp.

Variable Documentation

◆ sg_io_interface

enum lk_sg_io_ifc_t os_linux::sg_io_interface = SG_IO_USE_DETECT
static

Definition at line 508 of file os_linux.cpp.

◆ smartctl_examples

const char os_linux::smartctl_examples[]
static
Initial value:
=
"=================================================== SMARTCTL EXAMPLES =====\n\n"
" smartctl --all /dev/sda (Prints all SMART information)\n\n"
" smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda\n"
" (Enables SMART on first disk)\n\n"
" smartctl --test=long /dev/sda (Executes extended disk self-test)\n\n"
" smartctl --attributes --log=selftest --quietmode=errorsonly /dev/sda\n"
" (Prints Self-Test & Attribute errors)\n"
" smartctl --all --device=3ware,2 /dev/sda\n"
" smartctl --all --device=3ware,2 /dev/twe0\n"
" smartctl --all --device=3ware,2 /dev/twa0\n"
" smartctl --all --device=3ware,2 /dev/twl0\n"
" (Prints all SMART info for 3rd ATA disk on 3ware RAID controller)\n"
" smartctl --all --device=hpt,1/1/3 /dev/sda\n"
" (Prints all SMART info for the SATA disk attached to the 3rd PMPort\n"
" of the 1st channel on the 1st HighPoint RAID controller)\n"
" smartctl --all --device=areca,3/1 /dev/sg2\n"
" (Prints all SMART info for 3rd ATA disk of the 1st enclosure\n"
" on Areca RAID controller)\n"

Definition at line 186 of file os_linux.cpp.