github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/internal/disk/disk.go (about)

     1  // Copyright (c) 2015-2021 MinIO, Inc.
     2  //
     3  // This file is part of MinIO Object Storage stack
     4  //
     5  // This program is free software: you can redistribute it and/or modify
     6  // it under the terms of the GNU Affero General Public License as published by
     7  // the Free Software Foundation, either version 3 of the License, or
     8  // (at your option) any later version.
     9  //
    10  // This program is distributed in the hope that it will be useful
    11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  // GNU Affero General Public License for more details.
    14  //
    15  // You should have received a copy of the GNU Affero General Public License
    16  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  
    18  package disk
    19  
    20  // Info stat fs struct is container which holds following values
    21  // Total - total size of the volume / disk
    22  // Free - free size of the volume / disk
    23  // Files - total inodes available
    24  // Ffree - free inodes available
    25  // FSType - file system type
    26  // Major - major dev id
    27  // Minor - minor dev id
    28  // Devname - device name
    29  type Info struct {
    30  	Total      uint64
    31  	Free       uint64
    32  	Used       uint64
    33  	Files      uint64
    34  	Ffree      uint64
    35  	FSType     string
    36  	Major      uint32
    37  	Minor      uint32
    38  	Name       string
    39  	Rotational *bool
    40  	NRRequests uint64
    41  }
    42  
    43  // IOStats contains stats of a single drive
    44  type IOStats struct {
    45  	ReadIOs        uint64
    46  	ReadMerges     uint64
    47  	ReadSectors    uint64
    48  	ReadTicks      uint64
    49  	WriteIOs       uint64
    50  	WriteMerges    uint64
    51  	WriteSectors   uint64
    52  	WriteTicks     uint64
    53  	CurrentIOs     uint64
    54  	TotalTicks     uint64
    55  	ReqTicks       uint64
    56  	DiscardIOs     uint64
    57  	DiscardMerges  uint64
    58  	DiscardSectors uint64
    59  	DiscardTicks   uint64
    60  	FlushIOs       uint64
    61  	FlushTicks     uint64
    62  }