Sponsored Content
Full Discussion: False alerts
Top Forums Shell Programming and Scripting False alerts Post 302992417 by drysdalk on Friday 24th of February 2017 02:47:08 PM
Old 02-24-2017
Hello,

On my own test system (which is running Ubuntu 16.04 LTS x86_64) this script does basically appear to work. At any rate, it certainly doesn't generate any false positives for me when run at the shell as a non-privileged user, and the values it's getting for load appear to be genuine and sensible.

So, if you could provide the full crontab entry from which the script is run, then it'll be possible to look at that as a source of the issues next.

Again though: if you do have a Nagios environment, using its own load monitoring plugins is a much, much better idea. Honestly, if you have a Nagios server and the ability to add your server to it, you're just re-inventing the wheel here for no real gain whatsoever by writing your own script.
These 2 Users Gave Thanks to drysdalk For This Post:
 

10 More Discussions You Might Find Interesting

1. Linux

bin\false

We have requirments to not allow a userid login abilities but allow users to 'su' to it. In solaris I normally set the shell in /etc/passwd to bin/false. THis does not work on Linux, any suggestions would help. (1 Reply)
Discussion started by: bryanthomas
1 Replies

2. Shell Programming and Scripting

false use of sed???

i want to delete every newline and every line which starts with "RECORD......." in a file. FILE: Record 61391 in base BROCKHAUS (Timestamp: 2008-04-09 11:38:38) UNTERTITEL : Gräfin (seit 1707 Reichsgräfin) von, * Schwerin 4. 2. 1686, + Berlin 21. 10. 1744; wurde Record 61392 in base BROCKHAUS... (4 Replies)
Discussion started by: trek
4 Replies

3. Shell Programming and Scripting

Why is it always false?

Hi, I'm new to UNIX and am trying to learn shell scripting in order to work on an interface that I inherited when a co-worker left. I need to be able to check to see whether a file exists to determine whether the FTP has taken place, but in testing, the if statement always evaluates as false,... (3 Replies)
Discussion started by: JeffR
3 Replies

4. UNIX for Advanced & Expert Users

will sftp work with /bin/false

helo helo I have create user for the group and entry for the user in /etc/passwd file is liek this bhavin:x:2014:109:test:/home/pds_RBAC:/bin/false I have keep here /bin/false now i m accesing user through sftp ow when i access that user using sftp from the another linux pc for e.g... (1 Reply)
Discussion started by: amitpansuria
1 Replies

5. Solaris

False Memory usage alarm!!

Hi Experts, I am using Solaris-10, Sun-Fire-V445. i got often the below message- "Memory Usage – Critical, Memory usage (RAM) exceeding 90% The memory utilization is exceeding 90%" in a application running on solaris. I checked with Vmstat. Everything seems to be fine. Where i should... (5 Replies)
Discussion started by: thepurple
5 Replies

6. Shell Programming and Scripting

False Condition

Hi All, I am using the below Script to enter a line in the File: #!/bin/ksh # To delete the last line if it contains the pattern Redirect permanent / Virgin Atlantic Airways - Popup echo "Enter the URL that should point to the particular microsite" read url # To delete the last line if it... (0 Replies)
Discussion started by: Shazin
0 Replies

7. IP Networking

false tcp connection

Why this happens? How to solve this? $netstat -na |grep 9325 tcp 0 0 127.0.0.1:9325 127.0.0.1:9325 ESTABLISHED When a client socket repeatedly tries to connect to an inactive(no server socket is listening on this port) local port,connect succeeds. ... (1 Reply)
Discussion started by: johnbach
1 Replies

8. AIX

Gid=0 and 7 + admin=FALSE

Checking configuration access files for an AIX server, left me wondering about this :confused:: If a user is added to system group, it gets gid=0 with some security risks because it gets some root kind of file access level. Is this insecure condition kept if the user has admin variable... (0 Replies)
Discussion started by: bkiddo
0 Replies

9. Red Hat

Nagios is sending critical false alerts about current users

Hello All, Nagios seems to be sending false alerts about few hosts, (ex: There were no users on one host and still Nagios was reporting a critical alert and says 6 users are logged in. How do I fix this one? Also, I have installed nagios and added 12 hosts as a start and monitoring few... (4 Replies)
Discussion started by: lovesaikrishna
4 Replies

10. Shell Programming and Scripting

Url check creating child process and generating false alerts

Hi All Below code is working as expected but creating too many child processes when the url is not up and every minute that process is sending false email alerts any help with the logic not to generate child process and not to send duplicate alerts app="https://url" appresult=$(wget... (2 Replies)
Discussion started by: srilinux09
2 Replies
Test::NeedsDisplay(3pm) 				User Contributed Perl Documentation				   Test::NeedsDisplay(3pm)

NAME
Test::NeedsDisplay - Ensure that tests needing a display have one SYNOPSIS
In your Makefile.PL... use inc::Module::Install; # ... or whatever else you use # Check for a display use Test::NeedsDisplay; # ... your Makefile.PL content as normal And again in each test script that loads Wx #!/usr/bin/perl use strict; use Test::NeedsDisplay; # Test content as normal... DESCRIPTION
When testing GUI applications, sometimes applications or modules absolutely insist on a display, even just to load a module without actually showing any objects. Regardless, this makes GUI applications pretty much impossible to build and test on headless or automated systems. And it fails to the point of not even running the Makefile.PL script because a dependency needs a display so it can be loaded to find a version. In these situations, what is needed is a fake display. The "Test::NeedsDisplay" module will search around and try to find a way to load some sort of display that can be used for the testing. Strategies for Finding a Display At this time, only a single method is used (and a very simple one). Debian Linux has a script called "xvfb-run" which is a wrapper for the "xvfb", a virtual X server which uses the linux frame buffer. When loaded without a viable display, the module will re-exec the same script using something like (for example) "xvfb-run test.t". As such, it should be loaded as early as possible, before anything has a chance to change script parameters. These params will be resent through to the script again. METHODS
There are no methods. You simply use the module as early as possible, probably right after "use strict;" and make sure to load it with only default params. Specifically, need must always load it before you set the test plan, otherwise the test script will report two plans, and the harness will complain about it and die. # Use it like this ... use Test::NeedsDisplay; # ... not like this ... use Test::NeedsDisplay 'anything'; # ... and not like this. use Test::NeedsDisplay (); And that's all there is to do. The module will take care of the rest. TO DO
- Find alternative ways to launch a display on different platforms SUPPORT
Bugs should be reported via the CPAN bug tracker at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-NeedsDisplay> For other issues, contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2005 - 2009 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.0 2009-01-04 Test::NeedsDisplay(3pm)
All times are GMT -4. The time now is 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy