System call sent warnings to stderr: error: unsupported option (BSD syntax)
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
When we run the Nagios check_procs module in redhat7 os, we are facing below error. By googling we found that we need to reinstall procps package. We also reinstalled procps package but the module is working for first attempt and then its getting failed.
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
nagios
add a comment |
up vote
2
down vote
favorite
When we run the Nagios check_procs module in redhat7 os, we are facing below error. By googling we found that we need to reinstall procps package. We also reinstalled procps package but the module is working for first attempt and then its getting failed.
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
nagios
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
When we run the Nagios check_procs module in redhat7 os, we are facing below error. By googling we found that we need to reinstall procps package. We also reinstalled procps package but the module is working for first attempt and then its getting failed.
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
nagios
When we run the Nagios check_procs module in redhat7 os, we are facing below error. By googling we found that we need to reinstall procps package. We also reinstalled procps package but the module is working for first attempt and then its getting failed.
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
nagios
nagios
edited Nov 20 at 22:44
Rui F Ribeiro
38.2k1475125
38.2k1475125
asked Dec 22 '15 at 10:33
pravin09
242312
242312
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
4
down vote
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
The problem is that there's a mis-match between the check_procs
plug-in and your operating system's ps
command.
Nagios' check_procs
plug-in spawns the ps
command to check processes, applying a scanf()
-style format string to the command's output to find out what it needs to know about running processes. Given the wide variance in ps
commands across operating systems, it has to tailor this to each operating system's ps
command.
This it does when the check_procs
plug-in is compiled from source to binary. There's a 400-odd-line configuration script that laboriously checks each known combination of ps
arguments+options and scanning format string in turn, until one works. This combination is then hardwired into the compiled plug-in.
If the combination turns out to be wrong for the actual system where check_procs
is run, ps
either generates output in the wrong format (witness MacPorts bug #28801 and monitoring-plugins issue #1328) or generates error messages to standard error (witness Debian Bug #296003) which are picked up by the plug-in and alerted on. The latter is what is happening here.
This has various consequences:
- If you are building the plug-in from source, you need to build it with the same
ps
command installed as will be installed on the eventual production machine. - If you are using a pre-built binary, that binary needs to have been built on a system whose
ps
command matches the one on your machine where you are running the plug-in. If you didn't build the binary yourself, you need to talk to the person who did, or at the very least to the package maintainer if you are using a packaged-up pre-built binary.
But the check_procs script is working once we reinstall the procps-ng package but it is working only for few minutes. Then same error existing. Please provide a solution for this. i have Redhat 7.1 version installed.
– pravin09
Dec 23 '15 at 11:16
add a comment |
up vote
0
down vote
We have done a script for total check process, which solves the Error: System call sent warnings to stderr: error: unsupported option (BSD syntax) issue.
Please find the script below.
#!/bin/bash
#
# Script to check Process usage on Linux. Ignores Process used by disk cache.
#
# Requires the bc command
# $1 $2 $3 $4
# ./check_Process -w 85 -c 95
print_help()
echo "Usage:"
echo "[-w] Warning level as a percentage"
echo "[-c] Critical level as a percentage"
exit 0
while test -n "$1"; do
case "$1" in
--help|-h)
print_help
exit 0
;;
-w)
warn_level=$2
shift
;;
-c)
critical_level=$2
shift
;;
*)
echo "Unknown Argument: $1"
print_help
exit 3
;;
esac
shift
done
if [ "$warn_level" == "" ]; then
echo "No Warning Level Specified"
print_help
exit 3;
fi
if [ "$critical_level" == "" ]; then
echo "No Critical Level Specified"
print_help
exit 3;
fi
count=`ps -ef | wc -l`
###################
if [ "$count" -lt "$warn_level" ]; then
echo "Process OK:$count | 'Process' =$count;$warn_level;$critical_level"
exit 0;
elif [ "$count" -ge "$warn_level" ] && [ "$count" -le "$critical_level" ]; then
echo "Process WARNING: $count | 'Process'=$count;$warn_level;$critical_level"
exit 1;
elif [ "$count" -gt "$critical_level" ]; then
echo "Process CRITICAL: $count | 'Process'=$count;$warn_level;$critical_level"
exit 2;
fi
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
The problem is that there's a mis-match between the check_procs
plug-in and your operating system's ps
command.
Nagios' check_procs
plug-in spawns the ps
command to check processes, applying a scanf()
-style format string to the command's output to find out what it needs to know about running processes. Given the wide variance in ps
commands across operating systems, it has to tailor this to each operating system's ps
command.
This it does when the check_procs
plug-in is compiled from source to binary. There's a 400-odd-line configuration script that laboriously checks each known combination of ps
arguments+options and scanning format string in turn, until one works. This combination is then hardwired into the compiled plug-in.
If the combination turns out to be wrong for the actual system where check_procs
is run, ps
either generates output in the wrong format (witness MacPorts bug #28801 and monitoring-plugins issue #1328) or generates error messages to standard error (witness Debian Bug #296003) which are picked up by the plug-in and alerted on. The latter is what is happening here.
This has various consequences:
- If you are building the plug-in from source, you need to build it with the same
ps
command installed as will be installed on the eventual production machine. - If you are using a pre-built binary, that binary needs to have been built on a system whose
ps
command matches the one on your machine where you are running the plug-in. If you didn't build the binary yourself, you need to talk to the person who did, or at the very least to the package maintainer if you are using a packaged-up pre-built binary.
But the check_procs script is working once we reinstall the procps-ng package but it is working only for few minutes. Then same error existing. Please provide a solution for this. i have Redhat 7.1 version installed.
– pravin09
Dec 23 '15 at 11:16
add a comment |
up vote
4
down vote
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
The problem is that there's a mis-match between the check_procs
plug-in and your operating system's ps
command.
Nagios' check_procs
plug-in spawns the ps
command to check processes, applying a scanf()
-style format string to the command's output to find out what it needs to know about running processes. Given the wide variance in ps
commands across operating systems, it has to tailor this to each operating system's ps
command.
This it does when the check_procs
plug-in is compiled from source to binary. There's a 400-odd-line configuration script that laboriously checks each known combination of ps
arguments+options and scanning format string in turn, until one works. This combination is then hardwired into the compiled plug-in.
If the combination turns out to be wrong for the actual system where check_procs
is run, ps
either generates output in the wrong format (witness MacPorts bug #28801 and monitoring-plugins issue #1328) or generates error messages to standard error (witness Debian Bug #296003) which are picked up by the plug-in and alerted on. The latter is what is happening here.
This has various consequences:
- If you are building the plug-in from source, you need to build it with the same
ps
command installed as will be installed on the eventual production machine. - If you are using a pre-built binary, that binary needs to have been built on a system whose
ps
command matches the one on your machine where you are running the plug-in. If you didn't build the binary yourself, you need to talk to the person who did, or at the very least to the package maintainer if you are using a packaged-up pre-built binary.
But the check_procs script is working once we reinstall the procps-ng package but it is working only for few minutes. Then same error existing. Please provide a solution for this. i have Redhat 7.1 version installed.
– pravin09
Dec 23 '15 at 11:16
add a comment |
up vote
4
down vote
up vote
4
down vote
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
The problem is that there's a mis-match between the check_procs
plug-in and your operating system's ps
command.
Nagios' check_procs
plug-in spawns the ps
command to check processes, applying a scanf()
-style format string to the command's output to find out what it needs to know about running processes. Given the wide variance in ps
commands across operating systems, it has to tailor this to each operating system's ps
command.
This it does when the check_procs
plug-in is compiled from source to binary. There's a 400-odd-line configuration script that laboriously checks each known combination of ps
arguments+options and scanning format string in turn, until one works. This combination is then hardwired into the compiled plug-in.
If the combination turns out to be wrong for the actual system where check_procs
is run, ps
either generates output in the wrong format (witness MacPorts bug #28801 and monitoring-plugins issue #1328) or generates error messages to standard error (witness Debian Bug #296003) which are picked up by the plug-in and alerted on. The latter is what is happening here.
This has various consequences:
- If you are building the plug-in from source, you need to build it with the same
ps
command installed as will be installed on the eventual production machine. - If you are using a pre-built binary, that binary needs to have been built on a system whose
ps
command matches the one on your machine where you are running the plug-in. If you didn't build the binary yourself, you need to talk to the person who did, or at the very least to the package maintainer if you are using a packaged-up pre-built binary.
Error: System call sent warnings to stderr: error: unsupported option (BSD syntax)
The problem is that there's a mis-match between the check_procs
plug-in and your operating system's ps
command.
Nagios' check_procs
plug-in spawns the ps
command to check processes, applying a scanf()
-style format string to the command's output to find out what it needs to know about running processes. Given the wide variance in ps
commands across operating systems, it has to tailor this to each operating system's ps
command.
This it does when the check_procs
plug-in is compiled from source to binary. There's a 400-odd-line configuration script that laboriously checks each known combination of ps
arguments+options and scanning format string in turn, until one works. This combination is then hardwired into the compiled plug-in.
If the combination turns out to be wrong for the actual system where check_procs
is run, ps
either generates output in the wrong format (witness MacPorts bug #28801 and monitoring-plugins issue #1328) or generates error messages to standard error (witness Debian Bug #296003) which are picked up by the plug-in and alerted on. The latter is what is happening here.
This has various consequences:
- If you are building the plug-in from source, you need to build it with the same
ps
command installed as will be installed on the eventual production machine. - If you are using a pre-built binary, that binary needs to have been built on a system whose
ps
command matches the one on your machine where you are running the plug-in. If you didn't build the binary yourself, you need to talk to the person who did, or at the very least to the package maintainer if you are using a packaged-up pre-built binary.
answered Dec 22 '15 at 13:48
JdeBP
31.8k467148
31.8k467148
But the check_procs script is working once we reinstall the procps-ng package but it is working only for few minutes. Then same error existing. Please provide a solution for this. i have Redhat 7.1 version installed.
– pravin09
Dec 23 '15 at 11:16
add a comment |
But the check_procs script is working once we reinstall the procps-ng package but it is working only for few minutes. Then same error existing. Please provide a solution for this. i have Redhat 7.1 version installed.
– pravin09
Dec 23 '15 at 11:16
But the check_procs script is working once we reinstall the procps-ng package but it is working only for few minutes. Then same error existing. Please provide a solution for this. i have Redhat 7.1 version installed.
– pravin09
Dec 23 '15 at 11:16
But the check_procs script is working once we reinstall the procps-ng package but it is working only for few minutes. Then same error existing. Please provide a solution for this. i have Redhat 7.1 version installed.
– pravin09
Dec 23 '15 at 11:16
add a comment |
up vote
0
down vote
We have done a script for total check process, which solves the Error: System call sent warnings to stderr: error: unsupported option (BSD syntax) issue.
Please find the script below.
#!/bin/bash
#
# Script to check Process usage on Linux. Ignores Process used by disk cache.
#
# Requires the bc command
# $1 $2 $3 $4
# ./check_Process -w 85 -c 95
print_help()
echo "Usage:"
echo "[-w] Warning level as a percentage"
echo "[-c] Critical level as a percentage"
exit 0
while test -n "$1"; do
case "$1" in
--help|-h)
print_help
exit 0
;;
-w)
warn_level=$2
shift
;;
-c)
critical_level=$2
shift
;;
*)
echo "Unknown Argument: $1"
print_help
exit 3
;;
esac
shift
done
if [ "$warn_level" == "" ]; then
echo "No Warning Level Specified"
print_help
exit 3;
fi
if [ "$critical_level" == "" ]; then
echo "No Critical Level Specified"
print_help
exit 3;
fi
count=`ps -ef | wc -l`
###################
if [ "$count" -lt "$warn_level" ]; then
echo "Process OK:$count | 'Process' =$count;$warn_level;$critical_level"
exit 0;
elif [ "$count" -ge "$warn_level" ] && [ "$count" -le "$critical_level" ]; then
echo "Process WARNING: $count | 'Process'=$count;$warn_level;$critical_level"
exit 1;
elif [ "$count" -gt "$critical_level" ]; then
echo "Process CRITICAL: $count | 'Process'=$count;$warn_level;$critical_level"
exit 2;
fi
add a comment |
up vote
0
down vote
We have done a script for total check process, which solves the Error: System call sent warnings to stderr: error: unsupported option (BSD syntax) issue.
Please find the script below.
#!/bin/bash
#
# Script to check Process usage on Linux. Ignores Process used by disk cache.
#
# Requires the bc command
# $1 $2 $3 $4
# ./check_Process -w 85 -c 95
print_help()
echo "Usage:"
echo "[-w] Warning level as a percentage"
echo "[-c] Critical level as a percentage"
exit 0
while test -n "$1"; do
case "$1" in
--help|-h)
print_help
exit 0
;;
-w)
warn_level=$2
shift
;;
-c)
critical_level=$2
shift
;;
*)
echo "Unknown Argument: $1"
print_help
exit 3
;;
esac
shift
done
if [ "$warn_level" == "" ]; then
echo "No Warning Level Specified"
print_help
exit 3;
fi
if [ "$critical_level" == "" ]; then
echo "No Critical Level Specified"
print_help
exit 3;
fi
count=`ps -ef | wc -l`
###################
if [ "$count" -lt "$warn_level" ]; then
echo "Process OK:$count | 'Process' =$count;$warn_level;$critical_level"
exit 0;
elif [ "$count" -ge "$warn_level" ] && [ "$count" -le "$critical_level" ]; then
echo "Process WARNING: $count | 'Process'=$count;$warn_level;$critical_level"
exit 1;
elif [ "$count" -gt "$critical_level" ]; then
echo "Process CRITICAL: $count | 'Process'=$count;$warn_level;$critical_level"
exit 2;
fi
add a comment |
up vote
0
down vote
up vote
0
down vote
We have done a script for total check process, which solves the Error: System call sent warnings to stderr: error: unsupported option (BSD syntax) issue.
Please find the script below.
#!/bin/bash
#
# Script to check Process usage on Linux. Ignores Process used by disk cache.
#
# Requires the bc command
# $1 $2 $3 $4
# ./check_Process -w 85 -c 95
print_help()
echo "Usage:"
echo "[-w] Warning level as a percentage"
echo "[-c] Critical level as a percentage"
exit 0
while test -n "$1"; do
case "$1" in
--help|-h)
print_help
exit 0
;;
-w)
warn_level=$2
shift
;;
-c)
critical_level=$2
shift
;;
*)
echo "Unknown Argument: $1"
print_help
exit 3
;;
esac
shift
done
if [ "$warn_level" == "" ]; then
echo "No Warning Level Specified"
print_help
exit 3;
fi
if [ "$critical_level" == "" ]; then
echo "No Critical Level Specified"
print_help
exit 3;
fi
count=`ps -ef | wc -l`
###################
if [ "$count" -lt "$warn_level" ]; then
echo "Process OK:$count | 'Process' =$count;$warn_level;$critical_level"
exit 0;
elif [ "$count" -ge "$warn_level" ] && [ "$count" -le "$critical_level" ]; then
echo "Process WARNING: $count | 'Process'=$count;$warn_level;$critical_level"
exit 1;
elif [ "$count" -gt "$critical_level" ]; then
echo "Process CRITICAL: $count | 'Process'=$count;$warn_level;$critical_level"
exit 2;
fi
We have done a script for total check process, which solves the Error: System call sent warnings to stderr: error: unsupported option (BSD syntax) issue.
Please find the script below.
#!/bin/bash
#
# Script to check Process usage on Linux. Ignores Process used by disk cache.
#
# Requires the bc command
# $1 $2 $3 $4
# ./check_Process -w 85 -c 95
print_help()
echo "Usage:"
echo "[-w] Warning level as a percentage"
echo "[-c] Critical level as a percentage"
exit 0
while test -n "$1"; do
case "$1" in
--help|-h)
print_help
exit 0
;;
-w)
warn_level=$2
shift
;;
-c)
critical_level=$2
shift
;;
*)
echo "Unknown Argument: $1"
print_help
exit 3
;;
esac
shift
done
if [ "$warn_level" == "" ]; then
echo "No Warning Level Specified"
print_help
exit 3;
fi
if [ "$critical_level" == "" ]; then
echo "No Critical Level Specified"
print_help
exit 3;
fi
count=`ps -ef | wc -l`
###################
if [ "$count" -lt "$warn_level" ]; then
echo "Process OK:$count | 'Process' =$count;$warn_level;$critical_level"
exit 0;
elif [ "$count" -ge "$warn_level" ] && [ "$count" -le "$critical_level" ]; then
echo "Process WARNING: $count | 'Process'=$count;$warn_level;$critical_level"
exit 1;
elif [ "$count" -gt "$critical_level" ]; then
echo "Process CRITICAL: $count | 'Process'=$count;$warn_level;$critical_level"
exit 2;
fi
answered Dec 24 '15 at 14:55
pravin09
242312
242312
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f250883%2fsystem-call-sent-warnings-to-stderr-error-unsupported-option-bsd-syntax%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown