04-25-2017
Need in for a script that should check for errors in multiple log file (approx 2500) and should mail
hello everyone,
I am new to linux and got this deliverable to write a script that should check for error in multiple log file (count is approx 2500 log files on single server) and once error is found, it should mail that error
My logic says:
we can put all log files path/location in one FILE and we can implement for loop to read single file from FILE and search for error and if error is found , will append in different output file and iterating for loop to read every log file in FILE and once all files are searched, then mailx output file
Could you please help me in implementing above idea or if you have any convenient way, please share.
Looking for help from scriptors
Thanks in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'd like to somehow schedule a task on my webserver, such that my account's mail is checked every 10-15 minutes and:
a) any new e-mails received from a particular address are POST-ed to a PHP webpage on my server.
b) any new e-mails received from a different particular address are... (2 Replies)
Discussion started by: stujones
2 Replies
2. Shell Programming and Scripting
hi,
i want to write the script to list atleast one file inside that directory
eg:
/home/Log/amp01
/home/log/amp02
.
.
.
/home/log/amp..N
want to see atleast one file inside the /home/log/amp01 .... amp(N)
if it not there.. need to give that no file exists inside... (3 Replies)
Discussion started by: mail2sant
3 Replies
3. Shell Programming and Scripting
I have a script like this, which calls other scripts from that script:
#!/usr/ksh
moveFiles.sh
extract.sh
readfile=/home/sample.txt
cat $readfile | while read line
do
file= `echo $line|awk '{print $4}'`
if ;
then mv $file /home/temp_stage
fi (4 Replies)
Discussion started by: ss3944
4 Replies
4. Shell Programming and Scripting
I am hoping to get some help with a script to pull certain fields from a log file.
User update (xx6xxx P) rpt (yy6yyy B) 2010/01/20 21:36:01.298
Remote client forward start streamid 85af 2010/01/20 21:36:01.307
rpt2 (ZZ6ZZZ G) rpt1 (YY6YYY B) urcall (CQCQCQ ) mycall (W1AW)
user... (5 Replies)
Discussion started by: TedSD
5 Replies
5. Shell Programming and Scripting
Hi ,
I am trying to create shell script which will help me to compare file name in two folder.
There is a multiple file store in 2 folder.I want to compare that with the name.
If all the file are same then send a mail that "all date is same"
if not then create one log file which contain... (4 Replies)
Discussion started by: san_dy123
4 Replies
6. Shell Programming and Scripting
I want to check if any file with testing*.txt exists but my script fails if more than 1 file exists. It works fine for a single file
if
then
echo "TEST21"
fi
--------------
bash:
How do I fix this?
Thanks
Please use code tags next time for your code and data. (8 Replies)
Discussion started by: sumang24
8 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am trying to write a script which will check if the filesize is grather than 0 KB, compress the file and send to the email list else if the file size is zero KB don't send a mail update the log
if
then
echo "Validate the file" | mailx -s " There are errors : " ${EMAIL_LIST}
else... (5 Replies)
Discussion started by: mora
5 Replies
8. Shell Programming and Scripting
Hi
I have a shell script like that
Main() {
DAY=$(date +"%d-%m-%Y")
TIME=$(date +"%T")
Command 1
Command 2
...
Command n
}
I would like to catch errors from all commands in Main() and write these errors into a file , something likes this:
Main
if < error >
then
echo... (3 Replies)
Discussion started by: bobochacha29
3 Replies
9. Shell Programming and Scripting
Hi All,
I am new in scripting and working in a project where we have RSyslog servers over CentOS v7 and more than 200 network devices are sending logs to each RSyslog servers. For each network devices individual folders create on the name of the each network devices IP addresses.The main... (7 Replies)
Discussion started by: Pinaki
7 Replies
10. Shell Programming and Scripting
I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script.
I need to check the file is present ="/home/Rvtools/test.csv"
if this file not found after the time retry send mail file not found
If the file exit run the... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
LEARN ABOUT DEBIAN
config::model::models::approx
Config::Model::models::Approx(3pm) User Contributed Perl Documentation Config::Model::models::Approx(3pm)
NAME
Config::Model::models::Approx - Configuration class Approx
DESCRIPTION
Configuration classes used by Config::Model
Configuration model to edit "/etc/approc/approx.conf". This file can be edited with the following command:
config-edit -application approx
Elements
cache - approx cache directory
Specifies the location of the approx cache directory (default: /var/cache/approx). It and all its subdirectories must be owned by the
approx server (see also the $user and $group parameters, below.)Optional. Type uniline. upstream_default: '/var/cache/approx'.
interval - file cache expiration in minutes
Specifies the time in minutes after which a cached file will be considered too old to deliver without first checking with the remote
repository for a newer version. Optional. Type integer. upstream_default: '720'.
max_rate - maximum download rate from remote repositories
Specifies the maximum download rate from remote repositories, in bytes per second (default: unlimited). The value may be sufaXX fixed with
"K", "M", or "G" to indicate kilobytes, megabytes, or gigabytes per second, respectively.Optional. Type uniline.
max_redirects - maximum number of HTTP redirections
Specifies the maximum number of HTTP redirections that will be followed when downloading a remote file. Optional. Type integer.
upstream_default: '5'.
user - user that owns the files in the approx cache
Optional. Type uniline. upstream_default: 'approx'.
group - group that owns the files in the approx cache
Optional. Type uniline. upstream_default: 'approx'.
syslog - syslog(3) facility to use when logging
Optional. Type uniline. upstream_default: 'daemon'.
pdiffs - support IndexFile diffs
Optional. Type boolean. upstream_default: '1'.
offline - use cached files when offline
Specifies whether to deliver (possibly out-of-date) cached files when they cannot be downloaded from remote repositories. Optional. Type
boolean. upstream_default: '0'.
max_wait - max wait for concurrent file download
Specifies how many seconds an approx(8) process will wait for a concurrent download of a file to complete, before attempting to download
the file itself. Optional. Type integer. upstream_default: '10'.
verbose
Specifies whether informational messages should be printed in the log. Optional. Type boolean. upstream_default: '0'.
debug
Specifies whether debug messages should be printed in the log. Optional. Type boolean. upstream_default: '0'.
distributions - remote repositories
The other name/value pairs are used to map distribution names to remote repositories. For example,
debian => http://ftp.debian.org/debian
security => http://security.debian.org/debian-security
Use the distribution name as the key of the hash element and the URL as the value . Optional. Type hash of uniline.
SEE ALSO
o config-edit
AUTHOR
Dominique Dumont
COPYRIGHT
2011, Dominique Dumont
LICENSE
LGPL-2.1+
perl v5.12.3 2011-06-30 Config::Model::models::Approx(3pm)