Skip to main content
fixed formatting
Source Link
Daniele Santi
  • 4.2k
  • 2
  • 32
  • 30

I am using ttyS0 as a serial console to connect to a redhat linux  , which is setup using /etc/init/ttyS0.conf /etc/init/ttyS0.conf. When

When I am connected to serial console  , could not find agettyagetty process however sees a bashbash shell on ttyS0ttyS0. Whereas with SSH, I could see agettyagetty process in process listing. How this work, does bash kill agetty and get itself on ttyS0 when connecting over console.

/etc/init/ttyS0.conf

# /etc/init/ttyS0.conf

#
 stop on runlevel [S016]
 start on runlevel [23]
#
 respawn
instance /dev/ttyS0
 exec agetty -h -L -w /dev/ttyS0 115200 vt102
#

no agettyagetty process when connecting over console, however I see bashbash process with ttyS0

virsh # console --domain 1
Connected to domain LMS
Escape character is ^]
login: root
Password:
Last login: Fri Nov  9 03:33:11 from 192.168.122.1
[root@lmm ~]# ps -eaf | grep -i agetty
root      8397  8376  0 03:37 ttyS0    00:00:00 grep -i agetty
[root@lmm ~]#

[root@lmm ~]# ps -eaf | grep -i ttyS0
root      8376  5585  0 03:37 ttyS0    00:00:00 -bash

agettyagetty process when connecting over SSH to machine

[root@lmm ~]# ps -eaf | grep -i agetty
root      5585     1  0 03:32 ttyS0    00:00:00 agetty -h -L -w /dev/ttyS0 115200 vt102

I am using ttyS0 as a serial console to connect to a redhat linux  , which is setup using /etc/init/ttyS0.conf . When I am connected to serial console  , could not find agetty process however sees a bash shell on ttyS0. Whereas with SSH, I could see agetty process in process listing. How this work, does bash kill agetty and get itself on ttyS0 when connecting over console.

/etc/init/ttyS0.conf

#
 stop on runlevel [S016]
 start on runlevel [23]
#
 respawn
instance /dev/ttyS0
 exec agetty -h -L -w /dev/ttyS0 115200 vt102
#

no agetty process when connecting over console, however I see bash process with ttyS0

virsh # console --domain 1
Connected to domain LMS
Escape character is ^]
login: root
Password:
Last login: Fri Nov  9 03:33:11 from 192.168.122.1
[root@lmm ~]# ps -eaf | grep -i agetty
root      8397  8376  0 03:37 ttyS0    00:00:00 grep -i agetty
[root@lmm ~]#

[root@lmm ~]# ps -eaf | grep -i ttyS0
root      8376  5585  0 03:37 ttyS0    00:00:00 -bash

agetty process when connecting over SSH to machine

[root@lmm ~]# ps -eaf | grep -i agetty
root      5585     1  0 03:32 ttyS0    00:00:00 agetty -h -L -w /dev/ttyS0 115200 vt102

I am using ttyS0 as a serial console to connect to a redhat linux, which is setup using /etc/init/ttyS0.conf.

When I am connected to serial console, could not find agetty process however sees a bash shell on ttyS0. Whereas with SSH, I could see agetty process in process listing. How this work, does bash kill agetty and get itself on ttyS0 when connecting over console.

# /etc/init/ttyS0.conf

#
 stop on runlevel [S016]
 start on runlevel [23]
#
 respawn
instance /dev/ttyS0
 exec agetty -h -L -w /dev/ttyS0 115200 vt102
#

no agetty process when connecting over console, however I see bash process with ttyS0

virsh # console --domain 1
Connected to domain LMS
Escape character is ^]
login: root
Password:
Last login: Fri Nov  9 03:33:11 from 192.168.122.1
[root@lmm ~]# ps -eaf | grep -i agetty
root      8397  8376  0 03:37 ttyS0    00:00:00 grep -i agetty
[root@lmm ~]#

[root@lmm ~]# ps -eaf | grep -i ttyS0
root      8376  5585  0 03:37 ttyS0    00:00:00 -bash

agetty process when connecting over SSH to machine

[root@lmm ~]# ps -eaf | grep -i agetty
root      5585     1  0 03:32 ttyS0    00:00:00 agetty -h -L -w /dev/ttyS0 115200 vt102
Source Link
Bharat
  • 814
  • 1
  • 8
  • 17

Unable to see agetty ttyS0 in process list when connected with serial console

I am using ttyS0 as a serial console to connect to a redhat linux , which is setup using /etc/init/ttyS0.conf . When I am connected to serial console , could not find agetty process however sees a bash shell on ttyS0. Whereas with SSH, I could see agetty process in process listing. How this work, does bash kill agetty and get itself on ttyS0 when connecting over console.

/etc/init/ttyS0.conf

#
 stop on runlevel [S016]
 start on runlevel [23]
#
 respawn
instance /dev/ttyS0
 exec agetty -h -L -w /dev/ttyS0 115200 vt102
#

no agetty process when connecting over console, however I see bash process with ttyS0

virsh # console --domain 1
Connected to domain LMS
Escape character is ^]
login: root
Password:
Last login: Fri Nov  9 03:33:11 from 192.168.122.1
[root@lmm ~]# ps -eaf | grep -i agetty
root      8397  8376  0 03:37 ttyS0    00:00:00 grep -i agetty
[root@lmm ~]#

[root@lmm ~]# ps -eaf | grep -i ttyS0
root      8376  5585  0 03:37 ttyS0    00:00:00 -bash

agetty process when connecting over SSH to machine

[root@lmm ~]# ps -eaf | grep -i agetty
root      5585     1  0 03:32 ttyS0    00:00:00 agetty -h -L -w /dev/ttyS0 115200 vt102