Sponsored Content
Full Discussion: Logging to /dev/console
Operating Systems BSD Logging to /dev/console Post 302278285 by mlalitha on Monday 19th of January 2009 11:32:04 PM
Old 01-20-2009
Java 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 "/usr/libexec/getty std.9600" unknown off
ttyd3 "/usr/libexec/getty std.9600" unknown off
# Pseudo terminals
ttyp0 none network secure
ttyp1 none network secure
ttyp2 none network secure
ttyp3 none network secure
ttyp4 none network secure
ttyp5 none network secure
ttyp6 none network secure
ttyp7 none network secure
ttyp8 none network secure
ttyp9 none network secure

If I login to m/c's console using using pty command, what would /dev/console be mapped to. If I issue a ls command, I see that it is of size zero and it is not linked to /dev/tty's. Now if I want to redirect my log messages to the console and I edit my syslog.conf file to write the log messages to /dev/console, where would the messages get redirected.

Thanks in advance,
Lalitha.M
 

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. UNIX for Dummies Questions & Answers

Logging all console activity to a file - how?

Hi all, Well I've had a bit more experience with Unix-like environments since my last post, now that I have started working on my website in earnest and am doing much of the file manipulation via the command line through SSH. The thing is, I want to be able to log all console activity,... (4 Replies)
Discussion started by: patwa
4 Replies

3. 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

4. Solaris

script hangs when outputing to /dev/console

I am running solaris 8 on a sparcs box. The system is connected to a lightwave console server. I have a script that hangs when sending output to '/dev/console'. Any ideas? -V (2 Replies)
Discussion started by: vada010
2 Replies

5. 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

6. Shell Programming and Scripting

Event logging to file and display to console | tee command is not able to log all info.

My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies

7. Emergency UNIX and Linux Support

Capturing console (/dev/ttyS1) logs

Hi, I have been trying to capture console logs from the init script. When the ramfs is mounted, i check if usb is connected , if conncted, i mount it and redirected the console logs like so: cat & /dev/ttyS1 >> /mnt/logs.txt I'm getting /bin/sh : /dev/ttyS1 :permission denied ... (8 Replies)
Discussion started by: xerox
8 Replies

8. Solaris

How can i prevent logging user1 from console?

Dear all, i have two users user1 and user2 i want force user1 to login first by user2 and then su - user1 i want to prevent logging user1 from console directly (5 Replies)
Discussion started by: maxim42
5 Replies

9. Solaris

Hang when run command with /dev/console

hi guys, I don't know why I run this command: echo a>/dev/console It is not responsed from console and hang. If I run echo a>/dev/null, it is OK. here it is the console file: mcl1101 root#ls -ltr /dev/console lrwxrwxrwx 1 root other 30 Aug 18 2009 /dev/console ->... (4 Replies)
Discussion started by: caspian
4 Replies

10. Linux

Syslog not logging successful logging while unlocking server's console

When unlocking a Linux server's console there's no event indicating successful logging Is there a way I can fix this ? I have the following in my rsyslog.conf auth.info /var/log/secure authpriv.info /var/log/secure (1 Reply)
Discussion started by: walterthered
1 Replies
TTYS(5) 						      BSD File Formats Manual							   TTYS(5)

NAME
ttys -- terminal initialization information DESCRIPTION
The file ttys contains information that is used by various routines to initialize and control the use of terminal special files. This infor- mation is read with the getttyent(3) library routines. There is one line in the ttys file per special device file. Fields are separated by tabs and/or spaces. Fields comprised of more than one word should be enclosed in double quotes (``"''). Blank lines and comments may appear anywhere in the file; comments are delimited by hash marks (``#'') and new lines. Any unspecified fields will default to null. The first field is normally the name of the terminal special file as it is found in /dev. However, it can be any arbitrary string when the associated command is not related to a tty. The second field of the file is the command to execute for the line, usually getty(8), which initializes and opens the line, setting the speed, waiting for a user name and executing the login(1) program. It can be, however, any desired command, for example the start up for a window system terminal emulator or some other daemon process, and can contain multiple words if quoted. The third field is the type of terminal usually connected to that tty line, normally the one found in the termcap(5) data base file. The environment variable TERM is initialized with the value by either getty(8) or login(1). The remaining fields set flags in the ty_status entry (see getttyent(3)), specify a window system process that launchd(8) will maintain for the terminal line. As flag values, the strings ``on'' and ``off'' specify that launchd(8) should (should not) execute the command given in the second field, while ``secure'' (if ``on'' is also specified) allows users with a uid of 0 to login on this line. The flags ``local'', ``rtscts'', ``mdm- buf'', and ``softcar'' modify the default behaviour of the terminal line, and their actions are driver dependent. The ``local'' flag causes the driver to treat the line as if it locally connected. The ``rtscts'' flag instructs the driver to use RTS/CTS hardware flow control, if possible. The ``mdmbuf'' flag instructs the driver to use DTR/DCD flow control, if possible. The ``softcar'' flag causes the driver to ignore hardware carrier on the line. These flag fields should not be quoted. The string ``window='' may be followed by a quoted command string which launchd(8) will execute before starting the command specified by the second field. FILES
/etc/ttys NUMERIC SEQUENCES
Numeric sequences of terminals can be represented in a more compact format. A matching pair of square bracket may enclose two numbers (the start and stop values), separated by a hyphen. The numbers are assumed to be decimal, unless prefixed with ``0x'', in which case they are interpreted as hexadecimal. The number of characters (not including any ``0x'') in the starting value gives the minimum width; sequence val- ues are zero padded up to this width. Thus ``tty[00-07]'' represents the eight terminals ``tty00'' through ``tty07''. EXAMPLES
# root login on console at 1200 baud console "/usr/libexec/getty std.1200" vt100 on secure # dialup at 1200 baud, no root logins ttyd0 "/usr/libexec/getty d1200" dialup on # 555-1234 # Mike's terminal: hp2621 ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on # 457 Evans # John's terminal: vt100 ttyh1 "/usr/libexec/getty std.9600" vt100 on # 459 Evans # terminal emulate/window system ttyv0 "/usr/X11/bin/xterm -display :0" xterm on window="/usr/X11/bin/X :0" # the sequence of eight terminals tty00 through tty07 tty[00-07] "/usr/libexec/getty std.9600" vt100 on # Network pseudo ttys -- don't enable getty ttyp0 none network ttyp1 none network off # All sixteen of a pseudo tty sequence ttyq[0x0-0xf] none network SEE ALSO
login(1), getttyent(3), ttyslot(3), gettytab(5), termcap(5), getty(8), launchd(8) HISTORY
A ttys file appeared in Version 6 AT&T UNIX. BSD
May 27, 2005 BSD
All times are GMT -4. The time now is 05:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy