03-08-2010
first of all thanks to check the code ....
This is written by a senior who has left ....so i dnt have any manual or help.
I want to send emails for some particular alert and both email and sms for some critical alert.
Please help to modify such that the above condition is matches.
At present the code sends both email and sms for all type of alert .
Thnks
10 More Discussions You Might Find Interesting
1. Programming
I would like to know if i can monitor if a process is running.
I have one program wich is running all the time, called oliba, but sometimes it goes down, and I have to launch it again.
Is there a way to monitor the pid of the program, and if the program goes down, to lauch it again?
Can you give... (3 Replies)
Discussion started by: Pedro Tavares
3 Replies
2. Shell Programming and Scripting
We've been having some problems with a specific program in our nightly processing, so I whipped up a little script to run to monitor it, and send an e-mail when it's complete (failure or not). My primary problem is that I cannot modify the binary or the script that calls it, since the developers... (7 Replies)
Discussion started by: LivinFree
7 Replies
3. Shell Programming and Scripting
hi all
I am running a script monitor using source command.
the shell script monitor is used to execute a pl/sql procedure.
when i do
source monitor
and then
ps -ef | grep <procedure name>
i do not get any info
but when i do
sh monitor
and then
ps -ef | grep <procedure name>
i... (8 Replies)
Discussion started by: infyanurag
8 Replies
4. Shell Programming and Scripting
Hello all,
I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted.
Thanks in advance
Regards,
pradeep kulkarni.
:mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I need to monitor the memory usage of a particular process continuously. As of now I am using the following command:
ps -fu <user name> -o pid,comm,vsz | grep <process_name> | grep -v grep
The output of this command gives me what i need except i want the output to keep getting updated... (3 Replies)
Discussion started by: archana485
3 Replies
6. Shell Programming and Scripting
Gurus,
I am writing a shell script that will be used to automate cold backup of an Oracle Database. The database size is around 300G and will take around 5-6 hours to copy.
I have finished the script till the copy of the datafiles. Now, I am stuck at the point where I need to monitor the... (4 Replies)
Discussion started by: sunpraveen
4 Replies
7. Shell Programming and Scripting
get email notification from from system when a process from XXXX user takes longer than 15 min run.Let me know the time estimation for the same.
hi ,any one please tell me , how to write a script to get email notification from system when a process from as mentioned above a xxxx user takes... (1 Reply)
Discussion started by: kirankrishna3
1 Replies
8. Shell Programming and Scripting
Hi Guys,
I'm looking for a script( preferably perl script) which should monitor a application service and alert me when it goes down. application is installed in windows NT.
Scenario: I have remedy ARS 6.1 installed in windows platform and need some script to monitor its service and alert me... (2 Replies)
Discussion started by: user__user3110
2 Replies
9. Shell Programming and Scripting
Hi,
I need help to monitoring a process using the shell script
The same output is below
oracle 32578 32577 0 Feb27 ? 00:06:47 java -cp .:lib/ant.jar:lib/ojdbc5.jar:lib/log4j-1.2.17.jar:/ORACLE_HOME/server/lib/wlfullclient.jar:/ORACLE _HOME/server/lib/weblogic.jar:Alerts.jar... (9 Replies)
Discussion started by: ajothi
9 Replies
10. Shell Programming and Scripting
Hi,
I need to grep a pattern in the log file of a process and send a mail if pattern found.But I am not able to figure out how do I detect when the process comes UP,it is started several times a day and each time it is started I need to perform this action. Please suggest something. (3 Replies)
Discussion started by: vishal bhargava
3 Replies
LEARN ABOUT DEBIAN
device::gsm::sms
Device::Gsm::Sms(3pm) User Contributed Perl Documentation Device::Gsm::Sms(3pm)
NAME
Device::Gsm::Sms - SMS message internal class that represents a single text SMS message
SYNOPSIS
# A list of Device::Gsm::Sms messages is returned by
# Device::Gsm messages() method.
use Device::Gsm;
...
@sms = $gsm->messages();
if( @sms ) {
foreach( @sms ) {
print $msg->storage() , "
";
print $msg->recipient() , "
";
print $msg->sender() , "
";
print $msg->content() , "
";
print $msg->time() , "
";
print $msg->type() , "
";
}
}
# Or you can instance a sms message from raw PDU data
my $msg = new Device::Gsm::Sms(
header => '+CMGL: ...',
pdu => `[encoded pdu data]',
storage=> 'ME', # or 'SC'
);
if( defined $msg ) {
print $msg->recipient() , "
";
print $msg->sender() , "
";
print $msg->content() , "
"; # or $msg->text()
print $msg->time() , "
";
print $msg->type() , "
";
}
$msg->delete();
DESCRIPTION
"Device::Gsm::Sms" class implements very basic SMS message object, that can be used to decode "+CMGL" GSM command response to build a more
friendly high-level object.
METHODS
The following is a list of methods applicable to "Device::Gsm::Sms" objects.
content()
See text() method.
decode()
Starts the decoding process of pdu binary data. If decoding process ends in success, return value is true and sms object is filled with all
proper values.
If decoding process has errors or pdu data is not provided, return value is 0 (zero).
delete()
Delete the current SMS message from sim card. Example:
$gsm = Device::Gsm->new();
...
my @msg = $gsm->messages();
$msg[0] && $msg[0]->delete();
new()
Basic constructor. You can build a new "Device::Gsm::Sms" object from the raw +CMGL header and PDU data. Those data is then decoded and a
new sms object is instanced and all information filled, to be available for subsequent method calls.
The allowed parameters to new() method are:
header
This is the raw +CMGL header string as modem outputs when you issue a +CMGL command
pdu Binary encoded sms data
storage
Tells which storage to delete the message from. Check the documentation of your phone to know valid storage values. Default values are:
"ME"
Deletes messages from gsm phone memory.
"SC"
Deletes messages from sim card.
index()
Returns the sms message index number, that is the position of message in the internal device memory or sim card. This number is used for
example to delete the message.
my $gsm = Device::Gsm->new(port=>'/dev/ttyS0');
...
my @messages = $gsm->messages();
...
# Delete the first returned message
my $msg = shift @messages;
$gsm->delete_sms( $msg->index() );
recipient()
Returns the sms recipient number (destination address = DA) as string (ex.: +39012345678).
sender()
Returns the sms sender number (originating address = OA) as string.
status()
Status of the message can be one value from the following list:
storage()
Returns the storage where SMS has been read from.
text()
Returns the textual content of sms message.
token()
Returns the given PDU token of the decoded message (internal usage).
type()
SMS messages can be of two types: SMS_SUBMIT and SMS_DELIVER, that are defined by two constants with those names. type() method returns one
of these two values.
Example:
if( $sms->type() == Device::Gsm::Sms::SMS_DELIVER ) {
# ...
}
elsif( $sms->type() == Device::Gsm::Sms::SMS_SUBMIT ) {
# ...
}
REQUIRES
o Device::Gsm
EXPORTS
None
TODO
o Complete and proof-read documentation and examples
COPYRIGHT
Device::Gsm::Sms - SMS message simple class that represents a text SMS message
Copyright (C) 2002-2009 Cosimo Streppone, cosimo@cpan.org
This program is free software; you can redistribute it and/or modify it only under the terms of Perl itself.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Perl licensing terms for details.
AUTHOR
Cosimo Streppone, cosimo@cpan.org
SEE ALSO
Device::Gsm, perl(1)
perl v5.14.2 2012-03-08 Device::Gsm::Sms(3pm)