summaryrefslogtreecommitdiffstats
path: root/plugins/check_swap.c
AgeCommit message (Collapse)AuthorFilesLines
2024-11-10check_swap: change threshold handling againLorenz Kästle1-15/+20
2024-11-10check_swap: stricter error handlingLorenz Kästle1-0/+6
2024-11-10check_swap: Make check_swap work without thresholdsLorenz Kästle1-9/+2
2024-11-10check_swap: Small improvementsLorenz Kästle1-8/+6
2024-11-02Small fixes to check_swap stuffLorenz Kästle1-3/+6
2024-11-02Merge branch 'master' into check_swap_againLorenz Kästle1-95/+96
2024-04-12Allow single thresholdNapsty1-8/+2
2024-04-12Possibility to run check_swap without thresholdsNapsty1-28/+31
2024-03-23check_swap: replace another fake boolen and small improvements (#1996)Lorenz Kästle1-10/+10
* check_swap: Change another fake boolen to a real one * check_swap: Rename type since *_t is reserved for C standard types * check_swap: Update copyright
2023-12-20check_swap: refactor to improve readabilityRincewindsHat1-376/+4
2023-12-20check_swap: Hopefully fix stuff on BSDRincewindsHat1-7/+21
2023-12-20check_swap: hopefully fix SRV4 stuffRincewindsHat1-11/+23
2023-12-20Update copyrightRincewindsHat1-2/+2
2023-12-20check_swap: clang-format + minor cosmetics/debugging/etcRincewindsHat1-303/+330
2023-12-20check_swap: Return byte number (in linux) and simplify code after thatRincewindsHat1-34/+42
2023-12-20check_swap: Heavily refactored linux partRincewindsHat1-363/+395
2023-12-20check_swap: Rename type since *_t is reserved for C standard typesRincewindsHat1-3/+3
2023-12-20check_swap: Change another fake boolen to a real oneRincewindsHat1-5/+5
2023-10-18check_swap: Use C99 booleansRincewindsHat1-6/+6
2023-04-26Changing remaining sscanf format specifier to unsigned longLorenz Kästle1-3/+3
2023-04-14Fix a lot of typos reported by codespellJan Wagner1-1/+1
2023-03-16check_swap: Remove unnecessary and problematic includesRincewindsHat1-3/+0
2022-09-11Check swap compiler warnings (#1756)Lorenz1-6/+3
* Fix compiler warnings * Fix superfluous whitespaces
2022-07-25check_swap: Fix unit for total in perfdata (#1779)Lorenz1-11/+11
* check_swap: Fix unit for total in perfdata * Remove trailing whitespaces
2022-07-25fix parsing swap values (#1780)Sven Nierlein1-1/+1
tmp_KB changed from float to uint64, so change the sscanf format accordingly.
2022-01-03Rename tmp variable to get even with masterLorenz Kästle1-4/+4
2022-01-03Merge branch 'master' into masterLorenz1-118/+157
2021-11-24More wrong printf formattingRincewindsHat1-1/+1
2021-11-24Fix CodeQL checksRincewindsHat1-1/+1
2021-11-19Small fix to threshold validation and style (indentation) fixesRincewindsHat1-20/+23
2021-10-02Revert to poor man's logicRincewindsHat1-7/+6
2021-10-02Change all to comments to old comment styleRincewindsHat1-3/+4
2021-09-26Fix comparing logicRincewindsHat1-2/+2
2021-09-25check_swap: Fix perfdata und thresholds for big values and simplify coderincewind1-102/+137
The original problem was https://github.com/monitoring-plugins/monitoring-plugins/pull/1705 where the performance data output of check_swap did not conform to the parser logic of a monitoring system (which decided to go for "correct" SI or IEC units. The PR was accompanied by a change to byte values in the performance data which broke the _perfdata_ helper function which could not handle values of this size. The fix for this, was to use _fperfdata_ which could, but would use float values. I didn't like that (since all values here are discreet) and this is my proposal for a fix for the problem. It introduces some helper functions which do now explicitely work with (u)int64_t, including a special version of the _perfdata_ helper. In the process of introducing this to check_swap, I stumbled over several sections of the check_swap code which I found problematic. Therefore I tried to simplify the code and make it more readable and less redundant. I am kinda sorry about this, but sincerely hope my changes can be helpful.
2020-08-18check_swap: Handle cached swapmdavranche1-2/+5
2017-05-31repaired "-n" behaviour. If run with "-n ok" a host which ranChristopher Odenbach1-8/+8
completely out of swap space would return "ok" which is not desired. It should only return "ok" if there is no swap space configured at all.
2015-10-04use unknown exit code for help/version in pluginsSven Nierlein1-2/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-10-19Improving output when swap space has zero sizeJan Wagner1-0/+1
2014-10-19check_swap - fix commentDavide Madrisan1-1/+1
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-02-20check_swap: Fix the plugin name that appears in the commentDavide Madrisan1-1/+1
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-01-29Update check_swap usageThomas Guyot-Sionnest1-3/+4
2014-01-29check_swap: add supports for a configurable state when there is no swapThomas Guyot-Sionnest1-2/+13
Check_swap used to allow no swap when thresholds were only specified in percent. This is no longer the case and the state now must be specified explicitly. The default is to always return CRITICAL when the swap is absent regardless of thresholds.
2014-01-29Fix check_swap returning OK on & thresholds and no swapThomas Guyot-Sionnest1-1/+1
Return 0% free instead of 100% free when total swap is 0
2014-01-20Capitalize "Monitoring" when it's the first wordHolger Weiss1-1/+1
2014-01-19Project rename initial commit.Monitoring Plugins Development Team1-3/+3
This is an initial take at renaming the project to Monitoring Plugins. It's not expected to be fully complete, and it is expected to break things (The perl module for instance). More testing will be required before this goes mainline.
2012-06-29Die when asprintf failsAnders Kaseorg1-8/+8
Fixes many instances of warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2010-04-22Add newline after "Usage:" in --helpThomas Guyot-Sionnest1-1/+1
2010-04-21Standardize the extra-opts notesThomas Guyot-Sionnest1-5/+0
2010-04-14Fix translations when extra-opts aren't enabledThomas Guyot-Sionnest1-5/+5
Bug #2832884 reported problem with translations outputting pot file headers. This is caused by "" matching the header of the translation files. This patch moves gettext macros inside utils macros and update some french translations.
2008-11-23Removing CVS/SVN tags and replacing with git-based versioningThomas Guyot-Sionnest1-6/+2
For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c