1SG_BG_CTL(8)                       SG3_UTILS                      SG_BG_CTL(8)
2
3
4

NAME

6       sg_bg_ctl - send SCSI BACKGROUND CONTROL command
7

SYNOPSIS

9       sg_bg_ctl  [--ctl=CTL]  [--help]  [--time=TN]  [--verbose]  [--version]
10       DEVICE
11

DESCRIPTION

13       Sends a SCSI BACKGROUND CONTROL command to the DEVICE. This command was
14       first  found  in  the SBC-4 draft standard revision 8 (sbc4r08.pdf). It
15       can be used to start and stop 'advanced background operations'  on  the
16       DEVICE.  Only resource or thin provisioned devices (logical units which
17       are typically (solid state) disks) support this command. Those advanced
18       background  operations often include garbage collection type operations
19       which may degrade the disk's performance  while  they  are  being  per‐
20       formed.
21

OPTIONS

23       Arguments to long options are mandatory for short options as well.
24
25       -c, --ctl=CTL
26              CTL  is  the  value placed in the BO_CTL field of the BACKGROUND
27              CONTROL command (cdb). It is a two bit field so has 4  variants:
28              0  does not change the host initiated advanced background opera‐
29              tions; 1 starts these operations; 2 stops these operations and 3
30              is reserved. The default value is 0.
31
32       -h, --help
33              output the usage message then exit.
34
35       -t, --time=TN
36              TN is a maximum time (with a unit of 100 ms or 1/10 second) that
37              advanced background operations can occur. This value is  ignored
38              if  the  CTL  argument  is  other than 1. The default value is 0
39              which means there is no maximum time limit. Only values 0 to 255
40              (which is 25.5 seconds) can be given. This value is place in the
41              BO_TIME field of the BACKGROUND CONTROL command.
42
43       -v, --verbose
44              increase the level of verbosity, (i.e. debug output).
45
46       -V, --version
47              print the version string and then exit.
48

NOTES

50       According to T10, support for 'background control operations' is  indi‐
51       cated by the BOCS bit being set in the Block device characteristics VPD
52       page [0xb1].  The setting of the BOCS  bit  can  be  checked  with  the
53       sg_vpd  and  sdparm  utilities  (and it is read only). There is a Back‐
54       ground operations control mode page [0xa, 0x6] with a BO_MODE field for
55       modifying  the  action  of  this  operation.  The  BO_MODE field can be
56       accessed and possibly modified with the sdparm utility.  The  BO_STATUS
57       field can be found in the Background operation log page [0x15, 0x2] and
58       that can be viewed with the sg_logs utility.
59
60       The  current  draft  describing  this  area  is   SBC-4   revision   10
61       (sbc4r10.pdf) in clause 4.33 . That contains the following example of a
62       background operation: "Advanced background operation may  include  NAND
63       block  erase  operations, media read operations, and media write opera‐
64       tions (e.g., garbage collection), which may impact  response  time  for
65       normal read requests or write requests from the application client."
66

EXIT STATUS

68       The  exit status of sg_bg_ctl is 0 when it is successful. Otherwise see
69       the sg3_utils(8) man page.
70

AUTHORS

72       Written by Douglas Gilbert.
73

REPORTING BUGS

75       Report bugs to <dgilbert at interlog dot com>.
76
78       Copyright © 2016 Douglas Gilbert
79       This software is distributed under a FreeBSD license. There is NO  war‐
80       ranty;  not  even  for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
81       POSE.
82

SEE ALSO

84       sg_vpd,sg_logs(sg3_utils); sdparm(sdparm)
85
86
87
88sg3_utils-1.43                     May 2016                       SG_BG_CTL(8)
Impressum