Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Capturing console (/dev/ttyS1) logs Post 302640637 by otheus on Tuesday 15th of May 2012 07:24:16 AM
Old 05-15-2012
setterm is packaged with util-linux for RHEL, in case you need to track down the source.

I'm not sure this will meet your needs in the long-term, since that command will do only 1-time snapshots. So in the long-term, in your rc/init files, replace "echo" with "logger -s". You could implement this with a function that's included by every rc file:
Code:
echo() {
  /bin/logger -s -f /var/log/rc-init-messages -p local0.info -t "$0" -- "$*"
}

But the file must exist first, so "touch /var/log/rc-init-messages" at the top of this include file.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/dev/console file

Hello, I am fairly new to UNIX. I ran command tty on my shell prompt and it return me /dev/console. I was reading in the book that normally output of tty command is tty01 , tty02 or so on. My question is this is the file for my monitor? UNIX called it Terminal or Workstation? What is this... (4 Replies)
Discussion started by: malikabid
4 Replies

2. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

3. BSD

Logging to /dev/console

Hi, The output of the cat ttys on a free BSD m/c console none unknown off secure # # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. ttyd0 "/usr/libexec/getty std.9600" unknown on secure ttyd1 "/usr/libexec/getty std.9600" dialup off ttyd2... (0 Replies)
Discussion started by: mlalitha
0 Replies

4. UNIX for Advanced & Expert Users

console /dev/console get image

We are using software (Pegasys) which runs on SunOS 5.8 and reads images from a Philips nuclear camera. The software is designed to run from the console. I need to be able to capture the images it produces on the display. The caveat is that I cannot use the X Windows display because the X Server... (3 Replies)
Discussion started by: sreyes27
3 Replies

5. Shell Programming and Scripting

Capturing FTP logs

Hi Guys, I am trying to capture the FTP Logs in a log file. I am using the below code. ftp -d -n -v $Remote_Host << EOD > $Ftp_LOG; Since iam running the script in debug mode, i am able to see that the ftp is done and the file has been transferred. But the log file does not have... (7 Replies)
Discussion started by: mac4rfree
7 Replies

6. Shell Programming and Scripting

Capturing the killed process logs

I have two set of questions. 1) To skip killing some process automatically. 2) To kill other process and capture their log. I have set of process, some needs to be killed gracefully and others should be skipped. Listed are the process. adm 1522... (1 Reply)
Discussion started by: murali1687
1 Replies

7. Shell Programming and Scripting

Simply question about capturing output to /dev/tty

Suppose another person wrote the following one-line shell script: echo $RANDOM > /dev/tty QUESTION #1: How can the random number, which is output to the terminal by this script, be captured in a variable? QUESTION #2: How can this be done in a cron job? Specific code, whether in ksh or... (1 Reply)
Discussion started by: Paul R
1 Replies

8. Shell Programming and Scripting

Help in capturing Time from Autosys Logs

Hi Guys, I'm very new to Shell scripting and have to design a code which I'm not able to find a way to. I will try to explain the aim in detail and shall be obliged if anyone could help me with the coding snippet. I have an input file who's every row has a few details about an autosys Job. I shall... (0 Replies)
Discussion started by: Crusnik02
0 Replies

9. UNIX for Beginners Questions & Answers

Help with Capturing time from Autosys logs

Hi Guys, I'm very new to Shell scripting and have to design a code which I'm not able to find a way to. I will try to explain the aim in detail and shall be obliged if anyone could help me with the coding snippet. I have an input file who's every row has a few details about an autosys Job. I shall... (1 Reply)
Discussion started by: Crusnik02
1 Replies

10. Shell Programming and Scripting

Shell script for capturing FTP logs

I have a script #!/bin/bash HOST=ftp.example.com USER=ftpuser PASSWORD=P@ssw0rd ftp -inv $HOST <<EOF user $USER $PASSWORD cd /path/to/file mput *.html bye EOF the script executes sucessfully I need to capture the FTP logs to a logfile should contain FTP Login successful ... (1 Reply)
Discussion started by: rajeshas83
1 Replies
logger::utils(n)					 Object Oriented logging facility					  logger::utils(n)

__________________________________________________________________________________________________________________________________________________

NAME
logger::utils - Utilities for logger SYNOPSIS
package require Tcl 8.4 package require logger::utils ?1.3? ::logger::utils::createFormatCmd formatString ::logger::utils::createLogProc -procName procName ?options...? ::logger::utils::applyAppender -appender appenderType ?options...? ::logger::utils::autoApplyAppender command command-string log op args... _________________________________________________________________ DESCRIPTION
This package adds template based appenders. ::logger::utils::createFormatCmd formatString This command translates formatString into an expandable command string. The following strings are the known substitutions (from log4perl) allowed to occur in the formatString: %c Category of the logging event %C Fully qualified name of logging event %d Current date in yyyy/MM/dd hh:mm:ss %H Hostname %m Message to be logged %M Method where logging event was issued %p Priority of logging event %P Pid of current process ::logger::utils::createLogProc -procName procName ?options...? This command ... -procName procName The name of the procedure to create. -conversionPattern pattern See ::logger::utils::createFormatCmd for the substitutions allowed in the pattern. -category category The category (service). -priority priority The priority (level). -outputChannel channel channel to output on (default stdout) ::logger::utils::applyAppender -appender appenderType ?options...? This command will create an appender for the specified logger services. If no service is specified then the appender will be added as the default appender for the specified levels. If no levels are specified, then all levels are assumed. -service loggerservices -serviceCmd loggerserviceCmds Name of the logger instance to modify. -serviceCmd takes as input the return of logger::init. -appender appenderType Type of the appender to use. One of console, colorConsole. -conversionPattern pattern See ::logger::utils::createFormatCmd for the format of the pattern. If this option is not provided the default pattern [%d] [%c] [%M] [%p] %m is used. -levels levelList The list of levels to apply this appender to. If not specified all levels are assumed. Example of usage: % set log [logger::init testLog] ::logger::tree::testLog % logger::utils::applyAppender -appender console -serviceCmd $log % ${log}::error "this is an error" [2005/08/22 10:14:13] [testLog] [global] [error] this is an error ::logger::utils::autoApplyAppender command command-string log op args... This command is designed to be added via trace leave to calls of logger::init. It will look at preconfigured state (via ::log- ger::utils::applyAppender) to autocreate appenders for newly created logger instances. It will return its argument log. Example of usage: logger::utils::applyAppender -appender console set log [logger::init applyAppender-3] ${log}::error "this is an error" BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category logger of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
appender, logger COPYRIGHT
Copyright (c) 2005 Aamer Akhter <aakhter@cisco.com> log 1.3 logger::utils(n)
All times are GMT -4. The time now is 12:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy