Lorenz Kästle
811da10fda
More refactoring
2025-09-15 15:49:26 +02:00
Lorenz Kästle
802e46f8ea
Run clang-format again
2025-09-15 12:59:37 +02:00
Lorenz Kästle
351b104894
check_load some number type fixes
2025-07-06 22:46:41 +02:00
Lorenz Kästle
b002a6870b
check_load: Add top x functionality to output
2025-07-06 21:58:55 +02:00
Lorenz Kästle
4ef8af0d9a
check_load: remove useless code and do some formatting
2025-07-06 21:46:54 +02:00
Lorenz Kästle
5eaeadbb3a
check_load: Actually allow output format configuring
2025-03-14 00:04:02 +01:00
Lorenz Kästle
fedff97c96
improved includes and some comments
2025-03-13 23:51:51 +01:00
Lorenz Kästle
08a475a14f
Refactor check_load + new ouput
2025-03-13 23:41:12 +01:00
Lorenz Kästle
f2900e0ccf
check_load: clang-format
2025-03-13 15:36:36 +01:00
Lorenz Kästle
7da6286995
check_load: remove unused code ( #1998 )
...
adaugherity noticed in issue #1965 , that HAVE_PROC_LOADAVG is never
defined since the symbol was removed from configure quite some time ago.
This commit removes the dead code which would be used when the symbol
would have been defined.
2024-04-07 02:51:58 +02:00
Jan Wagner
0f3703e641
Fix a lot of typos reported by codespell
2023-04-14 18:35:00 +00:00
Lorenz
b90a5757f7
Display total and scaled load values if check_load scales the values by number of CPUs ( #1778 )
...
* Renew copyright
* Display more verbose output, if scaled load values are used
* Actually use scaled value for determining status and print the fitting perfdata depending on input parameters
* Add test cases for scaled mode
2022-09-19 10:23:49 +02:00
Lorenz
a9cdbc8959
Check load compiler warnings ( #1759 )
...
* Fix compiler warnings due to implizit conversion and formats
* Make includes more specific and complement them
* Formatting fixes
2022-09-11 06:29:36 +02:00
Harald Jenny
a08215368e
Create check_load.c
...
just a cosmetic fix so the load plugin display a LOAD prefix before check results
2021-10-25 16:28:15 +02:00
Marc Sánchez
c03e1ad081
Only turn on ordering procs by CPU usage if PS_USES_PROCPCPU
...
Disable sorting of procs by CPU usage on check_load if procpcpu is not present on PS_VARLIST
2017-09-07 22:25:09 +02:00
Marc Sánchez
015a40e1b5
Using PS_COMMAND constant and ordering output by procpcpu
2017-09-07 20:55:34 +02:00
Marc Sánchez
0625fbb53d
Making show top consuming processes option less complicated
2017-09-07 13:55:19 +02:00
Marc Sánchez
1410ffff28
Adding print top consuming processes option to check_load
...
-W, --print-top-warning
Print top consuming processes on WARNING status
-C, --print-top-critical
Print top consuming processes on CRITICAL status
-n, --procs-to-show=NUMBER_OF_PROCS
Number of processes to show when printing top consuming
processes. Not useful without -W or -C. Default value is 5
2017-09-07 13:31:01 +02:00
Sven Nierlein
0dc6537612
fix superfluous argument to printf (#fixes 1308)
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07 23:39:04 +01:00
Sven Nierlein
edca257e20
use unknown exit code for help/version in plugins
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Holger Weiss
c3e756a855
Capitalize "Monitoring" when it's the first word
2014-01-20 03:12:50 +01:00
Monitoring Plugins Development Team
63734f52ab
Project rename initial commit.
...
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.
2014-01-19 14:18:47 -05:00
Sven Nierlein
c7d6730255
check_load: add alternative uptime syntax
...
check_load parses load from the uptime command if no proc filesystem is available. Seems
like there are at least 2 different uptime outputs.
linux:
20:44:34 up 25 days, 2:07, 13 users, load average: 0.13, 0.17, 0.22
freebsd 8:
8:44PM up 4:29, 1 user, load averages: 0.00, 0.00, 0.00
2013-09-14 20:44:54 +02:00
Anders Kaseorg
028d50d6f9
Die when asprintf fails
...
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>
2012-06-29 13:39:11 +02:00
Thomas Guyot-Sionnest
eaf3cb27f4
Add newline after "Usage:" in --help
2010-04-22 08:57:14 -04:00
Thomas Guyot-Sionnest
884aee0667
Standardize the extra-opts notes
2010-04-21 23:29:18 -04:00
Thomas Guyot-Sionnest
25d1ee331d
Fix translations when extra-opts aren't enabled
...
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.
2010-04-14 08:33:06 -04:00
Thomas Guyot-Sionnest
6fbd14fea5
Removing CVS/SVN tags and replacing with git-based versioning
...
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
2008-11-23 05:38:47 +00:00
Thomas Guyot-Sionnest
44f8455b2c
Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07 10:02:42 +00:00
Thomas Guyot-Sionnest
ed62784a0b
--help output cleanup (plus removal of spaces on blank lines)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-27 14:35:26 +00:00
Thomas Guyot-Sionnest
fa4efcdf6d
Bump plugins/ to GPLv3 (check_apt to check_nwstat)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1916 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-30 10:53:47 +00:00
Matthias Eble
3bb4b6b336
Fixed check_load argument handling when passing non triplet thresholds. Thanks to Jonathan Kamens (bug #1831890 )
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1851 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-10 00:19:27 +00:00
Ton Voon
d47be7a9e4
check_load can optionally divide by number of cpus
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1700 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-25 22:10:13 +00:00
Holger Weiss
fd329a1e91
Don't try to print `optarg' (which will be a NULL pointer) if an unknown
...
command line option was used, as this leads to a segfault on some
systems. The unknown option will be printed by getopt(3) anyway. So,
simply call print_usage() and exit UNKNOWN via the new usage5() instead.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28 21:46:41 +00:00
Benoit Mortier
082cfc29e3
first pass at cleaning localization for new release
...
first pass at making all the headre be the same licence, plugin, etc...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1499 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19 00:25:16 +00:00
Benoit Mortier
e5324624ca
cleaning help and usage
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1432 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-15 12:52:25 +00:00
Ton Voon
20d0154211
Fix to parsing of uptime (Ronald Tin - 1254656)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1218 f882894a-f735-0410-b71e-b25c423dba1c
2005-09-14 09:53:49 +00:00
M. Sean Finney
2f904659dc
set LC_NUMERIC to POSIX in check_load (1164325)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1195 f882894a-f735-0410-b71e-b25c423dba1c
2005-06-28 02:26:18 +00:00
M. Sean Finney
3f520e56e7
bugfixes to check_load thanks to andreas
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1186 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-28 01:21:54 +00:00
Benoit Mortier
e9ccc6b21a
various fixes for localization
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-25 23:17:46 +00:00
Benoit Mortier
30a4266a3a
reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorry
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@998 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 23:55:29 +00:00
Benoit Mortier
edf60f6dce
remove UT_HLP_VRS from print_usage
...
this was not a good idea ;-)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@994 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 20:28:53 +00:00
Benoit Mortier
c1af46b890
correcting parenthesis error
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@991 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 17:15:27 +00:00
Benoit Mortier
2ad398d2e0
fixes for internationalization
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@990 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 16:56:27 +00:00
Benoit Mortier
fa002886e3
internationalization fixes and help fixes
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@989 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 11:45:10 +00:00
Benoit Mortier
016d33230e
bump copyright year
...
initialize result to STATE_UNKNOW in place of STATE_OK
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@982 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 00:55:28 +00:00
Benoit Mortier
234481163f
More internationalization work
...
new usage4 function to permit localisation of think like check_ssh: xxxxx
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@979 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02 16:51:25 +00:00
Benoit Mortier
df1bd0c89f
return of process_arguments() is TRUE not OK !
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@978 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02 14:54:36 +00:00
Benoit Mortier
230d67e18a
changed Error: by CRITICAL -
...
more localization fixes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@971 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02 01:11:01 +00:00
Benoit Mortier
d19edd4043
standardize localization string
...
standardize unknow arguments
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-01 23:54:51 +00:00