Sponsored Content
Full Discussion: Syslog Message Columns
Top Forums UNIX for Dummies Questions & Answers Syslog Message Columns Post 302465321 by wthomas on Friday 22nd of October 2010 06:05:56 AM
Old 10-22-2010
Hi AGN,

I'm sorry but I do not know how to put your suggestion into my script.
When I execute the following command, I get the following output.

Code:
grep %SECURITY-1-PORTSHUTDOWN messages

Oct 21 15:00:49 covlsw01.nls.jlrint.com 2010 Oct 21 14:00:49 GMT +00:00 %SECURITY-1-PORTSHUTDOWN:Port 7/28 shutdown due to security violation

Please can you tell me how to show the output so it displays the hostname and from the "%" onwards, so it looks like this:

covlsw01.nls.jlrint.com %SECURITY-1-PORTSHUTDOWN:Port 7/28 shutdown due to security violation

Wynford

PS. Do excuse my lack of knowledge, but the forum is called "UNIX for Dummies" Smilie
 

10 More Discussions You Might Find Interesting

1. Solaris

syslog message..!

I got my system sun fire 6800 hung later reboot after generating these message can any one help me on this to review these message..!! nfssrv: WARNING: nfsauth upcall failed: RPC: Operation in progress mountd: cannot accept connection: 19: error unknown (current state -1) KAVE00166-W The... (13 Replies)
Discussion started by: nicknihal
13 Replies

2. Programming

why I can't get syslog message?

I read Unix network programming by richard,in chap12.3,it say if call syslog() by using parameter LOG_USER,it should write a message in /var/adm/messages in Solaris,such as "connected from 10.1.1.2",example file inet/daytimetcpsrv2.c.I want to know which syslog file in FreeBSD7.0?I look for... (1 Reply)
Discussion started by: konvalo
1 Replies

3. AIX

Syslog - Message forwarded from

I am not a Unix / AIX admin, but am working with one that doesn't seem to know how to set up syslog to forward messages to me the way I need them. Every message they send me has "Message forwarded from <insert host name here>:" but I need it to only have the host name. In the examples below,... (2 Replies)
Discussion started by: mlbillow
2 Replies

4. UNIX for Advanced & Expert Users

Q on <user> of syslog message generated by logger command

Generally(at least on AIX5.3, Solaris9, OS X)'logger' command would create syslog messages which carry <login name> . On Solaris9, I have experienced two circumstances in which 'logname' command fails. In this circumstance I saw the 'logger' command generated syslog messages which carry... (0 Replies)
Discussion started by: masaki
0 Replies

5. UNIX for Dummies Questions & Answers

Help needed sorting syslog columns

Hi all, I need your help in sorting some columns in a syslog report. The command is: for messages in `cat syslog_message_list.txt`; do grep $messages syslog.`date +%d%m%y`.log | \ tr -s " " | cut -d" " -f4,9- | sort| uniq -c >> syslog.`date +%d%m%y`.report; done The output is: 1... (4 Replies)
Discussion started by: wthomas
4 Replies

6. Red Hat

Syslog Message

All thanks for the help in advance. I'm current have my syslog server built on RHEL5.7. I'm wondering how to I have the syslog messages categorized by hostname? Is that an option I can add to the syslog.conf? (1 Reply)
Discussion started by: aojmoj
1 Replies

7. AIX

Message redirected from syslog

Hi. recently in many of our lpars we are getting a message in errpt as "C6ACA566 0315094014 U S dtc MESSAGE REDIRECTED FROM SYSLOG". I have also checked the /etc/syslog.conf file. It doesn't point to error log. Can someone please advise about how to fix this error ? pmut3:/> errpt -aj... (4 Replies)
Discussion started by: newtoaixos
4 Replies

8. HP-UX

Generate message in syslog.log

Dear Concern, Is there any command to generate message in /var/adm/syslog/syslog.log file in HP-UX. With Best Regards, Kauser (2 Replies)
Discussion started by: makauser
2 Replies

9. UNIX for Dummies Questions & Answers

Find Null values in Columns and fail execution by displaying error message

Hi All, I am new to shell scripting. I have a requirement as part of my job to find out null/empty values in column 2 and column 3 from a CSV file and exit the further execution of script by displaying a simple error message. I have developed a script to do this by reading various articles... (7 Replies)
Discussion started by: tpk
7 Replies

10. Ubuntu

How redirect syslog message to a specified file?

Hello to everyone! I have a question about syslog. I want put the messages of log in a particular file but really i don't know how to do that or i don't get the results that I want. I do this: #include <stdio.h> #include <stdlib.h> #include <syslog.h> int main (void) { ... (4 Replies)
Discussion started by: Kovalevski
4 Replies
shutdown(1B)					     SunOS/BSD Compatibility Package Commands					      shutdown(1B)

NAME
shutdown - close down the system at a given time SYNOPSIS
/usr/ucb/shutdown [-fhknr] time [warning-message]... DESCRIPTION
shutdown provides an automated procedure to notify users when the system is to be shut down. time specifies when shutdown will bring the system down; it may be the word now (indicating an immediate shutdown), or it may specify a future time in one of two formats: +number and hour:min. The first form brings the system down in number minutes, and the second brings the system down at the time of day indicated in 24-hour notation. At intervals that get closer as the apocalypse approaches, warning messages are displayed at terminals of all logged-in users, and of users who have remote mounts on that machine. At shutdown time a message is written to the system log daemon, syslogd(1M), containing the time of shutdown, the instigator of the shut- down, and the reason. Then a terminate signal is sent to init, which brings the system down to single-user mode. OPTIONS
As an alternative to the above procedure, these options can be specified: -f Arrange, in the manner of fastboot(1B), that when the system is rebooted, the file systems will not be checked. -h Execute halt(1M). -k Simulate shutdown of the system. Do not actually shut down the system. -n Prevent the normal sync(2) before stopping. -r Execute reboot(1M). FILES
/etc/rmtab remote mounted file system table ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
fastboot(1B), login(1), halt(1M), reboot(1M), syslogd(1M), sync(2), rmtab(4), attributes(5) NOTES
Only allows you to bring the system down between now and 23:59 if you use the absolute time for shutdown. SunOS 5.11 11 Oct 1994 shutdown(1B)
All times are GMT -4. The time now is 02:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy