zoukankan      html  css  js  c++  java
  • 获取主机硬件资源 函数


    1、

    NAME
           statfs, fstatfs - get file system statistics


    SYNOPSIS
           #include <sys/vfs.h>    /* or <sys/statfs.h> */


           int statfs(const char *path, struct statfs *buf);
           int fstatfs(int fd, struct statfs *buf);


    DESCRIPTION
           The  function statfs() returns information about a mounted file system.
           path is the pathname of any file within the mounted filesystem.  buf is
           a pointer to a statfs structure defined approximately as follows:


                  struct statfs {
                     long    f_type;     /* type of filesystem (see below) */
                     long    f_bsize;    /* optimal transfer block size */
                     long    f_blocks;   /* total data blocks in file system */  ////  总量
                     long    f_bfree;    /* free blocks in fs */                              ///  余量

                     long    f_bavail;   /* free blocks avail to non-superuser */
                     long    f_files;    /* total file nodes in file system */
                     long    f_ffree;    /* free file nodes in fs */
                     fsid_t  f_fsid;     /* file system id */
                     long    f_namelen;  /* maximum length of filenames */
                  };


                  File system types:


                     ADFS_SUPER_MAGIC      0xadf5
                     AFFS_SUPER_MAGIC      0xADFF
                     BEFS_SUPER_MAGIC      0x42465331
                     BFS_MAGIC             0x1BADFACE
                     CIFS_MAGIC_NUMBER     0xFF534D42
                     CODA_SUPER_MAGIC      0x73757245
                     COH_SUPER_MAGIC       0x012FF7B7
                     CRAMFS_MAGIC          0x28cd3d45



  • 相关阅读:
    pydev 下Django 1.7 undefined variables from import问题的解决
    前端CDN公共库整理
    BugFix:URL or HTTP headers are too long (IP=127.0.0.1)
    目前最好用的软件下载网站
    mysql数据库优化之表的设计和慢查询定位
    Hadoop-08-Hive本地独立式安装
    AspNetPager真假分页对照实例
    Android从无知到有知——NO.6
    Xpath—解决这个问题的良药
    C# Json反序列化 数据协定类型 无法反序列化 由于未找到必需的数据成员
  • 原文地址:https://www.cnblogs.com/roger0212/p/4436635.html
Copyright © 2011-2022 走看看