8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm new to unix and got struck here.Can any one help me out.My question is ..
is the command
if ;
then
echo "do some stuff"
fi
correct?
Thanks in advance
abhijeet (18 Replies)
Discussion started by: Abhijeet_Atti
18 Replies
2. Programming
Hi,
I am doing a C++ self-study and I got stuck with this problem.
I want to have a code that asks the suer to enter two numbers and then it lists the numbers between these two numbers. It has also to print a message if these two numbers are equal.
Here is what I wrote:
#include <iostream>... (11 Replies)
Discussion started by: faizlo
11 Replies
3. UNIX for Dummies Questions & Answers
1. How the Unix system identify the Other User to access for file permission?
2. What command we use to convert the extension of a file name?
3. What command use to convert other editing file to Unix based text file?
Please answer of these Question???Its necessary for me?? (3 Replies)
Discussion started by: pradipta_pks
3 Replies
4. UNIX for Dummies Questions & Answers
Hi Guys
I have a quick question
I have a file that is approx 1.5 million lines long of which most of the lines start with
INFO: some info
INFO: some more info
INFO: etc
I want to remove these lines
I was thinking along the lines of
:%s/INFO*//g
but this does not work
None... (6 Replies)
Discussion started by: grahambo2005
6 Replies
5. UNIX for Dummies Questions & Answers
I need to write a script file that will tell me the largest number in a group of numbers. ANy help is greatly appreciated (2 Replies)
Discussion started by: twan
2 Replies
6. UNIX for Advanced & Expert Users
HI,
A very good morning....
i need extensions/plugins for monitoring jboss and websphere for hobbit..
kindly if any one has the ext. or associated scripts pls send me the script or the link from where i can download the scripts(and any dependency for those scripts).
Await ur reply..
... (0 Replies)
Discussion started by: suvra
0 Replies
7. Shell Programming and Scripting
how do i write a script that'll open what i entered and scan it for a certain line of text.
for example, i enter a filename (that exists) and in that file i want to scan a certain word that'll show how much of that word appears throughout the file. (2 Replies)
Discussion started by: mrhenry
2 Replies
8. UNIX for Dummies Questions & Answers
what is the function of swap in linux why i have to create apsolutely a particion for the swap when i install (i installed lnx4win mandrake and made an automat. disk particion and the install program one of my disk partitions that was 3gb devidet in 4 one native 700mb swap 600mb and the others i... (1 Reply)
Discussion started by: user666
1 Replies
LEARN ABOUT DEBIAN
hobbit
Hobbit(3pm) User Contributed Perl Documentation Hobbit(3pm)
NAME
Hobbit.pm -- Perl module to easily write Hobbit/Xymon tests
SYNOPSIS
use Hobbit;
my $bb = new Hobbit('testname');
if (somethings_is_not_so_good) {
$bb->color_line('yellow', 'Something is not so good');
}
if (somethings_is_really_bad) {
$bb->color_line('red', 'Something is really bad');
}
$bb->send();
DESCRIPTION
Hobbit.pm is part of the Debian package hobbit-plugins and was written to gather common tasks needed when writing tests for the Xymon
monitoring system (formerly known as Hobbit).
EXPORTABLE HELPER FUNCTIONS
@regexps = file_to_list_of_regexps($file)
@globs = file_to_list_of_globs($file)
INTERNAL FUNCTIONS
$max_color = max_color($color1, $color)
Out of two colors, returns the color with the highest severity.
METHODS
Constructor: new Hobbit('testname');
Constructor: new Hobbit({ test => 'testname', ttl => 60, ...});
Creates a new Hobbit object.
Common use cases
my $bb = new Hobbit('sometest');
my $bb = new Hobbit({ test => 'testname',
color => 'green',
hostname => 'host.example.com',
text => 'Test successful',
title => 'Some Test',
ttl => 60,
type => 'status',
dont_moan => 1 });
Available parameters
color
The initial color of the test. (Default: "clear")
dont_moan
Disable moan() and croak() (see below). Needed if e.g. another used Perl module throws a lot of warnings but works fine otherwise, etc.
hostname
The hostname for which the test should report. (Default: $ENV{CLIENTHOSTNAME} || $ENV{MACHINEDOTS} || $ENV{MACHINE} || 'unknown')
test
The name of the test, i.e. the name of the column on the hobbit status web pages. (Mandatory)
text
Text which is prepended to generated report. (Default: the empty string)
title
The summary of the test. (Default: "$test OK" respectively "$test NOT ok")
ttl
How long the test result is valid before the test state is changed to purple by the hobbit daemon if no newer test results have been
received.
The default value is set on the hobbit server and is 300 seconds by default.
Values without unit are interpreted as minutes. Valid units are h for hours, d for days, and w for weeks. No space between value and
unit allowed.
type
Allows one to send messages of other types than "status", e.g. data, notify, disable, enable, etc.
May not yet work with all of these types properly. Please report bugs via the Debian Bug Tracking system.
add_color('somecolor')
Minutes that a sub test caused the given color state. Adjusts the overall resulting color accordingly.
print_line('some text')
Adds the given text to the end of the current report without changing the current color.
color_print('somecolor', 'some text')
Adds the given text to the end of the current report and minutes that a sub test caused the given color state. Adjusts the overall
resulting color accordingly.
color_line('somecolor', 'some text')
Adds the given text to the end of the current report and minutes that a sub test caused the given color state. Prepends that text with an
accordingly colored Hobbit icon and adjusts the overall resulting color accordingly.
send()
Sends the report to the hobbit server.
INTERNAL METHODS
moan()
If the check issues a Perl warning, this warning is added to the report with color state "yellow".
Set dont_moan to 1 to disable this feature.
croak()
If the check issues a Perl error, this error is added to the report with color state "red".
Set dont_moan to 1 to disable this feature.
AUTHORS AND COPYRIGHT
Copyright (C) 2008-2011 Christoph Berg <myon@debian.org>
Copyright (C) 2011 Axel Beckert <abe@debian.org>
SEE ALSO
<http://www.xymon.org/> bb(5), hobbit(1)
perl v5.14.2 2013-01-09 Hobbit(3pm)