Back to index

nagios-plugins  1.4.16
fsusage.h
Go to the documentation of this file.
00001 /* fsusage.h -- declarations for file system space usage info
00002 
00003    Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2010 Free Software
00004    Foundation, Inc.
00005 
00006    This program is free software: you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 /* Space usage statistics for a file system.  Blocks are 512-byte. */
00020 
00021 #if !defined FSUSAGE_H_
00022 # define FSUSAGE_H_
00023 
00024 # include <stdint.h>
00025 # include <stdbool.h>
00026 
00027 struct fs_usage
00028 {
00029   uintmax_t fsu_blocksize;      /* Size of a block.  */
00030   uintmax_t fsu_blocks;         /* Total blocks. */
00031   uintmax_t fsu_bfree;          /* Free blocks available to superuser. */
00032   uintmax_t fsu_bavail;         /* Free blocks available to non-superuser. */
00033   bool fsu_bavail_top_bit_set;  /* 1 if fsu_bavail represents a value < 0.  */
00034   uintmax_t fsu_files;          /* Total file nodes. */
00035   uintmax_t fsu_ffree;          /* Free file nodes. */
00036 };
00037 
00038 int get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp);
00039 
00040 #endif