10-06-2003
You still have specified what errors you are looking to monitor. I'll guess that you want to monitor /var/adm/messages for anything.
From your thread in the Linux forum, I gather that you are writing in C++. You can use fstat() or stat() to see if the file has been changed. But you must repeatedly invoke fstat(). Let's say that you want your program to notice a new error message in less than a millisecond. Then 1000 times each second you must fstat() that file. That is quite a load for the box. Even HP's fastest cpu will spend a high percentage of it's time doing that. Most realtime applications can tolerate a millisecond delay so I'm guessing that this would be enough. Now suppose that you can tolerate a one second delay between the arrivial of the error message and your program noticing it. That would reduce the load on the box by a factor of 1000. At this point the cpu can do some other things. Most of us will actually tolerate 2 or 3 minutes in a situation like this. Some of us would even go as high as 5 minutes. But it's your box, you can loop as fast as you want.
5 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hi all :confused:
i am wondering if there is a way to convert from EPOCH time to the standard tim, may be using a script or some thing else???????
thanks............................ (5 Replies)
Discussion started by: TheEngineer
5 Replies
2. UNIX for Dummies Questions & Answers
Newbie question:
I wrote korn shell script that lets me connect to a cisco switch thru telnet from sun server. I'm wodering if or what command i would use to capture info that is being sent to standard output when the script is running. Putting part of my script below and results.
#!/bin/ksh... (2 Replies)
Discussion started by: wisher115
2 Replies
3. Shell Programming and Scripting
Hi All,
we need to have 2 scripts in place for the following:.
1) One which will verify if archive log sequence in Production is getting replicated in DR or not. If there is difference, we should receive an email.
2)If there are any errors in DR site like in alert log, mail should be sent to... (1 Reply)
Discussion started by: a1_win
1 Replies
4. Shell Programming and Scripting
Dear experts,
I have an epoch time input file such as : -
1302451209564
1302483698948
1302485231072
1302490805383
1302519244700
1302492787481
1302505299145
1302506557022
1302532112140
1302501033105
1302511536485
1302512669550
I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies
5. Shell Programming and Scripting
# date +%s -d "Mon Feb 11 02:26:04"
1360567564
# perl -e 'print scalar localtime(1360567564), "\n";'
Mon Feb 11 02:26:04 2013
the epoch conversion is working fine. but one of my application needs 13 digit epoch time as input
1359453135154
rather than 10 digit epoch time 1360567564... (3 Replies)
Discussion started by: vivek d r
3 Replies
LEARN ABOUT DEBIAN
imager::transform
Imager::Transform(3pm) User Contributed Perl Documentation Imager::Transform(3pm)
NAME
Imager::Transform - a library of register machine image transformations
SYNOPSIS
# get a list of transformations
my @funcs = Imager::Transform->list;
# create a transformation object
my $tran = Imager::Transform->new($name);
# describe it
print $tran->describe;
# a list of constant names
my @constants = $tran->constants;
# information about some of the constants
my @info = $tran->constants(@constants);
DESCRIPTION
This module provides a library of transformations that use the Imager transform2() function.
The aim is to provide a place to collect these transformations.
At some point there might be an interface to add new functions, but there's not a whole lot of point to that.
The interface is a little sparse as yet.
METHODS
my @names = Imager::Transform->list
Returns a list of the transformations.
my $desc = Imager::Transform->describe($name);
my $desc = $tran->describe()
Describes a transformation specified either by name (as a class method) or by reference (as an instance method).
The class method returns undef if there is no such transformation.
my $tran = Imager::Transform->new($name)
Create a new transformation object. Returns undef if there is no such transformation.
my @inputs = $tran->inputs;
my $inputs = $tran->inputs;
Returns a list of input image descriptions, or the number of them, depending on content.
The list contains hash references, which current contain only one member, "desc", a description of the use of the input image.
$tran->constants
Returns a list of names of constants that can be set for the transformation.
$tran->constants($name, $name, ...)
Returns a hashref for each named constant, which contains the default in key "default" and a description in key "desc".
my $out = $tran->transform(\%opts, \%constants, @imgs)
Perform the image transformation.
Returns the new image on success, or undef on failure, in which case you can use $tran->errstr to get an error message.
$tran->errstr
The error message, if any from the last image transformation.
BUGS
Needs more transformations.
SEE ALSO
Imager(3), transform.perl
perl v5.14.2 2011-06-06 Imager::Transform(3pm)