mmcachectl command

Displays information about files and directories in the local page pool cache.

Synopsis

mmcachectl
    show [--device Device [{--fileset Fileset | --inode-num InodeNum}]] [--show-filename] [-Y]

Availability

Available on all IBM Spectrum Scale editions.

Description

The mmcachectl command displays information about files and directories in the local page pool cache. You can display information for a single file, for the files in a fileset, or for all the files in a file system. If you issue mmcachectl show with no parameters, it displays information for all the files in all the file systems that have file data cached in the local page pool.

The command lists the following information for each file:
  • The file system name.
  • The fileset ID.
  • The inode number.
  • The snapshot ID.
  • The file type (inode type): file, directory, link, or special.
  • The number of instances of the file that are open.
  • The number of instances of the file that are open for direct I/O.
  • The file size in bytes.
  • The size of the file data that is in the page pool in bytes.
  • The cache location of the file attributes:
    F
    The file attributes are stored in the file cache.
    FD
    The file attributes are stored in the file cache and the file data is stored in the inode (data-in-inode). For information about data-in-inode, see Use of disk storage and file structure within a GPFS file system.
    C
    The file attributes are stored in the stat cache. For information about the stat cache, see Non-pinned memory.
  • The full path name of the file. For a file with multiple hard links, the command displays an asterisk (*) before the file name to indicate that it is one of the path names of the file. For more information, see the description of the --show-filename parameter later in this topic.

Parameters

--device Device
Specifies the device name of a file system for which you want to display information.
--fileset Fileset
Specifies the name of a fileset for which you want to display information.
--inode-num InodeNum
Specifies the inode number of a file for which you want to display information.
--show-filename
Causes the command to display the full path name of each file.
Note:
  • This parameter is supported only on Linux nodes with a Linux kernel of 3.10.0-0123 or later and is dependent on the path name being available in the Linux directory cache.
  • The parameter is not supported on AIX® or on the Windows operating system.
-Y
Displays the command output in a parseable format with a colon (:) as a field delimiter. Each column is described by a header.
Note: Fields that have a colon (:) are encoded to prevent confusion. For the set of characters that might be encoded, see the command documentation of mmclidecode. Use the mmclidecode command to decode the field.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

You must have root authority to run the mmcachectl command.

The node on which you enter the command must be able to execute remote shell commands on any other administration node in the cluster. It must be able to do so without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a GPFS file system.

Examples

  1. The following command lists information for all the files in all the file systems that have file data cached in the local page pool. In this example, the only file system that has data cached in the local page pool is gpfs_fs0:
    # mmcachectl show
    FSname      Fileset  Inode    SnapID   FileType     NumOpen    NumDirect  Size         Cached        Cached
                ID                                      Instances  IO         (Total)      (InPagePool)  (InFileCache)
    ------------------------------------------------------------------------------------------------------------------
    gpfs_fs0     0        40       0        special      1          0          524288       8192          F
    gpfs_fs0     0        56833    0        file         0          0          0            0             F
    gpfs_fs0     0        4        0        special      1          0          524288       524288        F
    gpfs_fs0     0        18229    0        link         0          0          14           0             FD
    gpfs_fs0     0        3        0        directory    0          0          262144       262144        F
    gpfs_fs0     0        56836    0        directory    0          0          131072       0             F
    gpfs_fs0     0        56832    0        file         0          0          166611       0             F
    gpfs_fs0     0        39       0        special      1          0          524288       8192          F
    gpfs_fs0     0        40704    0        file         0          0          10           0             FD
    gpfs_fs0     0        41       0        special      1          0          524288       8192          F
    gpfs_fs0     0        55554    0        directory    0          0          3968         0             FD
    gpfs_fs0     0        42       0        special      0          0          524288       524288        F
    gpfs_fs0     0        55552    0        file         0          0          5            0             FD
    gpfs_fs0     0        56834    0        file         0          0          8192000000   0             F
    gpfs_fs0     0        55553    0        file         0          0          13           0             FD
    gpfs_fs0     0        22016    0        file         0          0          10           0             FD
    
  2. The following command lists information for all the files in all the file systems that have file data cached in the local page pool. Because the --show-filename parameter is specified, the command also lists the full path name of each file in the last column:
    # mmcachectl show --show-filename
    FSname       Fileset  Inode    SnapID   FileType     NumOpen    NumDirect  Size         Cached         Cached          FileName 
                 ID                                      Instances  IO         (Total)      (InPagePool)   (InFileCache)
    --------------------------------------------------------------------------------------------------------------------------------
    gpfs_fs0      0        40       0        special      1          0          524288       8192           F               -
    gpfs_fs0      0        56833    0        file         0          0          0            0              F             * /gpfs_fs0/big_rand_link1
    gpfs_fs0      0        4        0        special      1          0          524288       524288         F               -
    gpfs_fs0      0        18229    0        link         0          0          14           0              FD              /gpfs_fs0/test2_soft_link
    gpfs_fs0      0        3        0        directory    0          0          262144       262144         F               /gpfs_fs0/
    gpfs_fs0      0        56836    0        directory    0          0          131072       0              F               /gpfs_fs0/temp_dir
    gpfs_fs0      0        56832    0        file         0          0          166611       0              F               /gpfs_fs0/bis_csc
    gpfs_fs0      0        39       0        special      1          0          524288       8192           F               -
    gpfs_fs0      0        40704    0        file         0          0          10           0              FD              /gpfs_fs0/test
    gpfs_fs0      0        41       0        special      1          0          524288       8192           F               -
    gpfs_fs0      0        55554    0        directory    0          0          3968         0              FD              /gpfs_fs0/dir
    gpfs_fs0      0        42       0        special      0          0          524288       524288         F               -
    gpfs_fs0      0        55552    0        file         0          0          5            0              FD              /gpfs_fs0/test1
    gpfs_fs0      0        56834    0        file         0          0          8192000000   0              F               /gpfs_fs0/big_zero
    gpfs_fs0      0        55553    0        file         0          0          13           0              FD              /gpfs_fs0/test2
    gpfs_fs0      0        22016    0        file         0          0          10           0              FD              /gpfs_fs0/test3
    

See also

Location

/usr/lpp/mmfs/bin