Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

writelog(8) [redhat man page]

WRITELOG(8)						      System Manager's Manual						       WRITELOG(8)

NAME
writelog - add a entry to an INN log file. SYNOPSIS
writelog name text... DESCRIPTION
The writelog script is used to write a log entry or send it as mail. The name parameter specifies the name of the log file where the entry should be written. If it is the word ``mail'' then the entry is mailed to the news administrator, <USER specified with --with-news-mas- ter at configure>. The data that is written or sent consists of the text given on the command line, followed by standard input indented by four spaces. Shlock(1) is used to avoid simultaneous updates to a single log file. HISTORY
Written by Landon Curt Noll <chongo@toad.com> and Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.4, dated 1998/12/09. SEE ALSO
innd(8), innstat(8), news.daily(8), newslog(5), nnrpd(8), scanlogs(8). WRITELOG(8)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

getting text out of a file

Hi all, I have a script which tails the last line of a log - works fine, what i would like todo is take some of the text out of this line and then put into a string, i.e 1234544 sesslogged : 1234 : here so want to 'get' 1234 , then add to 'operators currently working 1234 Hope that... (3 Replies)
Discussion started by: stevebrodie
3 Replies

2. Shell Programming and Scripting

How to read multiple line from log file

I have errors in the log that span multiple lines and I can find say the 2nd line in the log of this error using an unique word. However, this only gets me the line that the word appears in not the full error which may be 3 or four line long. So if there way to display say the line before a match... (4 Replies)
Discussion started by: vishal_vsh1
4 Replies

3. Shell Programming and Scripting

Monitoring log file

Hi, I ned to monitor the tomcat log file called "catalina.out" for "Out of memory" error. the script should monitor this file and send us the mail as soon as it finds the string "Out of memory" in the file. can ypu suggest me which is the best way to do this? (4 Replies)
Discussion started by: shivanete
4 Replies

4. UNIX for Dummies Questions & Answers

Search for multiple strings and mail accordingly

Hi, I need to find if there is any error in the last few lines of the log file and send a mail accordingly.For example, Following errors can be logged in the log file. ERR_1="DB Connection not established" ERR_2="Server Unloading" I need to find if these errors are found in the log file and... (3 Replies)
Discussion started by: AnneAnne
3 Replies

5. Shell Programming and Scripting

Problem with IF - CAT - GREP in simple shell script

Hi all, Here is my requirement I have to search 'ORA' word in out.log file,if it is present then i need to send that file (out.log) content to some mail id.If 'ORA' word is not in that file then i need to send 'load succesful' message to some mail id. The below the shell script is not... (5 Replies)
Discussion started by: mak_boop
5 Replies

6. UNIX for Dummies Questions & Answers

How to log transform a text file?

How can I log transform (log 2) a text file which is a single column of numbers? (4 Replies)
Discussion started by: evelibertine
4 Replies

7. Shell Programming and Scripting

[Solved] Problem with mail commands & format

1. I generated a log for the script. log: abc def ghi ijk If I use general (plain text) format for mail sending, it was displaying correctly with new lines where I have. Eg: abc def ghi ijk But I tried with HTML format using the code: (8 Replies)
Discussion started by: karumudi7
8 Replies

8. Shell Programming and Scripting

Problems with an if statement

Hey guys/gals, I am feeling extremely rusty today and having a problem with a monitoring script I am writing. I am trying to write a monitor using a entry in a line in log file. I can get the entry extracted from the file to a temp file. But when I try and do the if statement for the greater... (3 Replies)
Discussion started by: scottzx7rr
3 Replies

9. Shell Programming and Scripting

If Less than a given value.To send mail.

If value Less than 60% .To send mail. log file is gen every 1 min. 2013-01-24 12:42 mrt_bkk 420 374(89.0%) 46(10.9%) 0.9 (20) 2013-01-24 12:43 mrt_bkk 361 323(89.4%) 38(10.5%) 0.7 (20) 2013-01-24 12:44 mrt_bkk 312 280(89.7%) 32(10.2%) 0.6 (20) 2013-01-24 12:45 mrt_bkk 375 343(91.4%)... (8 Replies)
Discussion started by: ooilinlove
8 Replies

10. UNIX for Advanced & Expert Users

Error details in mail

Hi, I have a application that writes log details to a file in a folder. I am trying to write script to send mail to the user whenever the log is appended with "Error" string and details. The user should receive error and error details in mail whenever there is a error in the file. The... (4 Replies)
Discussion started by: maddy26615
4 Replies

11. Shell Programming and Scripting

How to write this script:- check output word and send a mail?

Hi Guys, I am not Good at scripting. I need to write a script such that if output of command shows the particular word in output then send mail to abc@compay.com -bash-3.2$ ps -ef | grep bpbkar root 6040 1 0 13:05:19 ? 0:00 bpbkar -r 2678400 -ru root -dt 47395 -to 0... (20 Replies)
Discussion started by: manalisharmabe
20 Replies

12. Shell Programming and Scripting

Grep behaves diffrent upon printf or echo output

Hello I want to check whether certain arguments were passed to the script, and when those are, not doing a log entry. If those arguments are not passed, always do a log entry (*new call*). What currently i have is this: echo "${@}"|grep -q \\- || \ tui-log -e "$LOG" "\r---- New call $$... (4 Replies)
Discussion started by: sea
4 Replies

13. UNIX for Dummies Questions & Answers

Check file size and mail

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

14. Shell Programming and Scripting

Exclude string

I would like to write a script to check the log , if any line in the log have the string in include_list.txt but do not have the string in exclude_list.txt , then send alert mail to administrator , as below example , the line 1 have the string "string 4" ( which is in include_list.txt ) but do not... (7 Replies)
Discussion started by: ust3
7 Replies

15. Shell Programming and Scripting

Selecting latest entry in the log file

Hi there I am trying to write a script where I will need to look for a specific word in the log file and I am aware this can be done by grep for example. As there will be multiple entries for this I want to grep the last one to enter the log... how would I go about this - would I have to use... (5 Replies)
Discussion started by: simpsa27
5 Replies