Sponsored Content
Operating Systems Solaris unix txt files in M$: /var/adm/messages Post 302439319 by s1ckle on Thursday 22nd of July 2010 08:58:51 AM
Old 07-22-2010
unix txt files in M$: /var/adm/messages

hi
I have a script that mails me when certain event are logged in /var/adm/messages. When the mail reaches me there are no line breaks (its just one really long line) so I tried piping the output of the script to a text file which I run `unix2dos` on then mail myself that, but that didn't work.

also tried these in addition to unix2do to no avail

Code:
perl -p -e 's/\n/\r\n/' < unixfile.txt > winfile.txt
 nawk 'sub("$", "\r")' unixfile.txt > winfile.txt

any ideas?
Thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Messages in /var/adm

Just want to check with all of you out there what does the following warning means in my "messages" file in /var/adm the warning is Prevous Time Adjustment Incomplete , does it mean my hard ware is faulty if so which piece of hardware it is ? (1 Reply)
Discussion started by: owls
1 Replies

2. Solaris

/var/adm/messages- Help

Solaris 8/ sun 420R Checked /var/adm/messages file and got the following message: Dec 4 16:40:05 serverXYZ ConfigProvider: get_pkg_instdate: getdate failed for the standard C locale (7) Does anyone know what this means? Looked up getdate but do not understand.... Thanks. (1 Reply)
Discussion started by: finster
1 Replies

3. Solaris

/var/adm/messages

I'm running a Solaris 9 box with Oracle databases on it. I'm getting the following messages in my /var/adm/messages log "Jun 24 12:30:32 sundb01 bootpd: IP address not found: xxx.xxx.xxx.xxx" ...where xxx.xxx.xxx.xxx is DHCP IP addresses of Windows 2000 workstations in the organisation. ... (2 Replies)
Discussion started by: soliberus
2 Replies

4. UNIX for Dummies Questions & Answers

/var/adm/messages

Hi, No log entry is found in messages files. The file size is 0. We are using Solaris 9. Anyone knows what could be wrong. (3 Replies)
Discussion started by: FrankC
3 Replies

5. Solaris

/var/adm/messages

Hello Friends, I am geting the folowing error in /var/adm/message is it disl related problem? if yes.. how to check all the disk are perfect or not? Sep 15 06:01:12 scsi: WARNING: /pci@1f,700000/scsi@2/sd@2,0 (sd7): Sep 15 06:01:12 Error for Command: write(10) Error Level:... (5 Replies)
Discussion started by: bullz26
5 Replies

6. Solaris

/var/adm/messages

Check message file and result posted below. Can anyone tell me what this is a sign of, what does it mean? server1% more messages.0 Dec 02 09:35:06 server1 bsd-gw: Inval id protocol request (65): AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA^\\2... (6 Replies)
Discussion started by: finster
6 Replies

7. Solaris

diff b/w /var/log/syslog and /var/adm/messages

hi sirs can u tell the difference between /var/log/syslogs and /var/adm/messages in my working place i am having two servers. in one servers messages file is empty and syslog file is going on increasing.. and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

8. UNIX for Advanced & Expert Users

/var/adm/messages vs /var/log/messages

The /var/adm/messages in Solaris seem to log more system messages/errors compared to /var/log/messages in Linux. I checked the log level in Linux and they seem OK. Is there any other log file that contains the messages or is it just that Linux doesn't log great many things? (2 Replies)
Discussion started by: gomes1333
2 Replies

9. Shell Programming and Scripting

trying get the last /var/adm/messages

grep \"^`date "+%b %d %T"`\" /var/adm/messages | egrep \"emerg|alert|crit|err|warning\ but get an output like this ksh: alert: not found ksh: crit: not found ksh: err: not found ksh: warning": not found grep: can't open "19" grep: can't open "16:27:16"" (1 Reply)
Discussion started by: arch12
1 Replies

10. Solaris

Difference between /var/log/syslog and /var/adm/messages

Hi, Is the contents in /var/log/syslog and /var/adm/messages are same?? Regards (3 Replies)
Discussion started by: vks47
3 Replies
mailstats(8)						      System Manager's Manual						      mailstats(8)

NAME
mailstats - Displays statistics about mail traffic SYNOPSIS
mailstats [-o] [-C cffile [-f stfile] FLAGS
Do not display the name of the mailer in the output. Use cffile as the name of the sendmail "cf" file instead of /var/adm/sendmail/send- mail.cf. Use stfile as the input statistics file instead of /var/adm/sendmail/sendmail.st. DESCRIPTION
The mailstats command reads the information in the /var/adm/sendmail/sendmail.st file (or in the file specified with the -f flag), formats it, and writes it to standard output. Note also that you can change the location of the sendmail.st file by editing its pathname in the sendmail.cf file. EXAMPLES
The format of the information is shown in the following example, in which the first field (M) contains a number that indicates the position of that mailer in the sendmail.cf file, starting at 0 (zero). For example, the first mailer in the sendmail.cf file corresponds to the number 0 in the mailstats display, the second mailer corresponds to the number 1, and so on. Statistics from Thu Feb 17 11:20:01 2000 M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis Mailer 1 50 77K 1 3K 0 0 local 6 43 59K 58 99K 0 0 smtp ============================================================ T 93 136K 59 102K 0 0 The fields in the report have the following meanings: Indicates the position of the mailer in the sendmail.cf file. Indicates the number of messages received by the local machine from the indicated mailer. Indicates the number of bytes in the messages received by the local machine from the indicated mailer. Indicates the number of messages sent from the local machine using the indicated mailer. Indicates the number of bytes in the messages sent from the local machine using the indicated mailer. Indicates the number of rejected messages. Indicates the number of discarded messages. Indicates the name of the mailer. If sendmail transmits mail directly to a file, such as the dead.letter file or an alias target, the message and byte counts are credited to the prog mailer, as defined in the sendmail.cf file. However, mailstats will still default to var/adm/sendmail/sendmail.st. FILES
Specifies the command path Contains system statistics Contains configuration information for sendmail RELATED INFORMATION
Commands: sendmail(8) delim off mailstats(8)
All times are GMT -4. The time now is 10:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy