-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linux plugin for nvidia-smi based checks
- Loading branch information
1 parent
541b4a9
commit f05ecb1
Showing
7 changed files
with
504 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2 | ||
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and | ||
# conditions defined in the file COPYING, which is part of this source code package. | ||
|
||
# Reason for this no-op: shellcheck disable=... before the first command disables the error for the | ||
# entire script. | ||
: | ||
|
||
# Disable unused variable error (needed to keep track of version) | ||
# shellcheck disable=SC2034 | ||
CMK_VERSION="2.4.0b1" | ||
|
||
# Function to replace "if type [somecmd]" idiom | ||
# 'command -v' tends to be more robust vs 'which' and 'type' based tests | ||
inpath() { | ||
command -v "${1:?No command to test}" >/dev/null 2>&1 | ||
} | ||
|
||
main() { | ||
if inpath nvidia-smi; then | ||
echo '<<<nvidia_smi:sep(9)>>>' | ||
nvidia-smi -q -x | ||
fi | ||
} | ||
|
||
[ -z "${MK_SOURCE_ONLY}" ] && main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.