- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Restarting a process from inittab file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 07:56 AM
12-05-2001 07:56 AM
I have a tty process that is listed in my /etc/inittab file that I would like to restart manually. Can anyone tell me the process for doing so. The device file is called ttyd2a2 connected on the 2nd port of a 16port mux.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 08:02 AM
12-05-2001 08:02 AM
Re: Restarting a process from inittab file
man init
Re-examine the inittab entries without changing the run level.
<\SNIP>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 08:02 AM
12-05-2001 08:02 AM
Re: Restarting a process from inittab file
Does the tty commmand have 'respawn' set as an option in 'inittab'? is it not respawning?
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 08:05 AM
12-05-2001 08:05 AM
SolutionClay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 08:06 AM
12-05-2001 08:06 AM
Re: Restarting a process from inittab file
If the line /etc/inittab shows 'respawn' then change it to 'off'
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 08:07 AM
12-05-2001 08:07 AM
Re: Restarting a process from inittab file
There's no reason to init -q to restart a session if inittab hasn't changed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 08:36 AM
12-05-2001 08:36 AM
Re: Restarting a process from inittab file
just uncomment one of the following.
every time you logout, the login will return once the respawn is there.
init q
to reread the inittab if you made a change.
If it's not a terminal, you may have to modify /etc/uucp/Devices
See the instructions in the file.
ie:
#ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
ttp2:234:respawn:/usr/sbin/getty -h tty2p2 9600
#ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
#ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
#ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 09:50 AM
12-05-2001 09:50 AM
Re: Restarting a process from inittab file
To stop getty on a particular port, edit the /etc/inittab file and change respawn to off for that port in the file, Save the file and exit. Do a "init q" to let the system reread the inittab file. It will now stop the getty process for the port for which you changed respawn to off.
Now to do the reverse, edit the file again, change off to respawn and then save the file and exit. Do a "init q" so that the system rereads the file and the system will now start the getty for the port for which you chaged off to respawn.
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 10:07 AM
12-05-2001 10:07 AM
Re: Restarting a process from inittab file
I am not so certain wether I undersdtand your question...
But in case you want to have a serial login on MUX2/Port2 you need the following setup:
1) /etc/inittab: enter a line like this:
ttp2:234:respawn:/usr/sbin/getty -t 300 tty2p2 port2 vt100 # port2
2) /etc/gettydefs: enter a line or paragraph like this:
port2 # B9600 SANE CLOCAL CS8 IXON IXOFF TAB3 HUPCL # B9600 SANE CLOCAL CS8 IXON IXOFF TAB3 HUPCL #Serial Login: #port2
3) command line: init q
And what it is about:
1) "init" will start a process "getty" and remember its process id. When it exits "init" will start it again.
The parameters are:
-t 300 # timeout 300s
tty2p2 # MUX2 Port2
port2 # reference info "/etc/gettydefs"
vt100 # the login dialog will start with a clear-screen sequence for VT100 terminals
2) The line/paragraph is split into 5 areas by hash-signs (#).
The first is the name and is used by "getty" to find the line/paragraph.
The second are the "Initial Flags" (man stty) to setup serial communication.
The third are the "Final Flags" for the communication (after login).
The forth is the login dialog.
The fifth is the "next" paragraph to be used - in case the user trying to log in presses the
When "getty" starts, it tries to open the device "/dev/" followed by its first parameter and set it to the "initial flags" in the paragraph addresses with the second parameter. Then it dispays the text from tha forth field and wait for the login name. Then it sets the "final flags" and uses "exec(2)" to execute the program "login" (which which ask for the password).
3) After this command is executed, process #1 (init) will re-read its config file (/etc/inittab) and hence start the new "getty" command.
BTW: Be certain to match the serial communicatio parameters of your terminal with the paragraph used in "/etc/gettydefs"!
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2001 10:14 AM
12-05-2001 10:14 AM
Re: Restarting a process from inittab file
Each of your answers helped a great deal. It's nice to know and deal with such professionals.