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. Pseudo-ter- minals (see pts(4)) are not listed. This information 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 unspeci- fied 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 init(8) will maintain for the terminal line, optionally determine the type of tty (whether dialin, network or otherwise), or specify a tty group name that allows the login class database (see login.conf(5)) to refer to many ttys as a group, to selectively allow or deny access or enable or disable accounting facilities for ttys as a group. As flag values, the strings ``on'' and ``off'' specify that init(8) should (should not) execute the command given in the second field. ``onifconsole'' will cause this line to be enabled if and only if it is an active kernel console device (it is equivalent to ``on'' in this case). The flag ``secure'' (if the console is enabled) allows users with a uid of 0 to login on this line. The flag ``dialin'' indicates that a tty entry describes a dialin line, and ``network'' is obsolete and does nothing. Either of these strings may also be specified in the terminal type field. The string ``window='' may be followed by a quoted command string which init(8) will execute before starting the com- mand specified by the second field. The string ``group='' may be followed by a group name comprised of alphanumeric characters that can be used by login.conf(5) to refer to many tty lines as a group to enable or disable access and accounting facilities. If no group is specified, then the tty becomes a member of the group "none". For backwards compatibility, the ``group='' should appear last on the line, immediately before the optional comment. Both the second field and any command specified with ``window='' will be split into words and executed using execve(2). Words are separated by any combinations of tabs and spaces. Arguments containing whitespace should be enclosed in single quotes ('). Note that no shell-style globbing or other variable substitution occurs. FILES
/etc/ttys 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 group=dialup # 555-1234 # Mike's terminal: hp2621 ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on group=dialup # 457 Evans # John's terminal: vt100 ttyh1 "/usr/libexec/getty std.9600" vt100 on group=dialup # 459 Evans # terminal emulate/window system ttyv0 "/usr/local/bin/xterm -display :0" xterm on window="/usr/local/bin/X :0" SEE ALSO
login(1), getttyent(3), gettytab(5), login.conf(5), termcap(5), getty(8), init(8) HISTORY
A ttys file appeared in Version 6 AT&T UNIX. BSD
March 9, 2014 BSD
All times are GMT -4. The time now is 08:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy