Re: init process in 2.2.19
On 0, Jesse Pollard <[EMAIL PROTECTED]> wrote: > Subba Rao <[EMAIL PROTECTED]>: > > I am trying to add a process which is to be managed by init. I have added the > > following entry to /etc/inittab > > > > SV:2345:respawn:env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service > dev/console > > > > After saving, I execute the following command: > > > > # kill -HUP 1 > > > > This does not start the process I have added. The process that I have added > > only starts when I do: > > > > # init u > > or > > # telinit u > > > > PS - The process will not start even after a reboot. I have to manually do one > > of the above commands as root. > > > > My kernel version is : 2.2.19 > > Distro : Slackware > > GCC : gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) > > > > Any help appreciated. > > I'm using Slackware 7.1, so one of the following possible solutions may work: > Forgot to mention that I am using Slackware 7.1 too > A second possibility (try this first - its easer: > I see that the daemon is to run in modes "2345". There is a possiblity > that you have this entry near the beginning of the inittab. If so, try > putting it at the end. I believe that init runs each line of the > inittab for a given run level in the same order that it appears in the > file. Putting the entry last should allow it to be started AFTER > all file systems are mounted - the entry for multiuser mode is: > > # Script to run when going multi user. > rc:2345:wait:/etc/rc.d/rc.M > > > Thank you for replying! I have tried those methods and they did not work. What I did as recommended by someone, is that I added "strace" to the process in /etc/inittab SV:2345:respawn:strace env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service /backup/strace.out Instead of sending the strace messages to the console, I saved them to a file. Part of the log is at the end of this note. Most of these messages seem to be from the memory module. If anyone could look at these messages and let me know how to fix it, I would appreciate it. Thank you in advance for any help! -- Subba Rao [EMAIL PROTECTED] http://members.home.net/subba9/ GPG public key ID 27FC9217 execve("/usr/bin/env", ["env", "-", "PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin", "svscan", "/service"], [/* 16 vars */]) = 0 brk(0) = 0x804a3c0 open("/etc/ld.so.preload", O_RDONLY)= -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=22195, ...}) = 0 old_mmap(NULL, 22195, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000 close(3)= 0 open("/lib/libc.so.6", O_RDONLY)= 3 fstat(3, {st_mode=S_IFREG|0755, st_size=1013224, ...}) = 0 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\250\206"..., 4096) = 4096 old_mmap(NULL, 954492, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000 mprotect(0x400fc000, 28796, PROT_NONE) = 0 old_mmap(0x400fc000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe1000) = 0x400fc000 old_mmap(0x4010, 12412, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4010 close(3)= 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40104000 mprotect(0x4001a000, 925696, PROT_READ|PROT_WRITE) = 0 mprotect(0x4001a000, 925696, PROT_READ|PROT_EXEC) = 0 munmap(0x40014000, 22195) = 0 personality(PER_LINUX) = 0 getpid()= 880 brk(0) = 0x804a3c0 brk(0x804a3f8) = 0x804a3f8 brk(0x804b000) = 0x804b000 execve("/usr/local/bin/svscan", ["svscan", "/service"], [/* 1 var */]) = 0 brk(0) = 0x8053d20 open("/etc/ld.so.preload", O_RDONLY)= -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=22195, ...}) = 0 old_mmap(NULL, 22195, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000 close(3)= 0 open("/lib/libc.so.6", O_RDONLY)= 3 fstat(3, {st_mode=S_IFREG|0755, st_size=1013224, ...}) = 0 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\250\206"..., 4096) = 4096 old_mmap(NULL, 954492, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000 mprotect(0x400fc000, 28796, PROT_NONE) = 0 old_mmap(0x400fc000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe1000) = 0x400fc000 old_mmap(0x4010, 12412, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4010 close(3)= 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40104000 mprotect(0x4001a000, 925696, PROT_READ|PROT_WRITE) = 0
Re: init process in 2.2.19
On Thu, Apr 26, 2001 at 05:30:16PM +, Subba Rao wrote: > I am trying to add a process which is to be managed by init. I have added the > following entry to /etc/inittab > > SV:2345:respawn:env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service > dev/console > > After saving, I execute the following command: > > # kill -HUP 1 > > This does not start the process I have added. The process that I have added > only starts when I do: telinit q tells init to re-read the inittab, as per the telinit man page. -- Russell King ([EMAIL PROTECTED])The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: init process in 2.2.19
Subba Rao <[EMAIL PROTECTED]>: > I am trying to add a process which is to be managed by init. I have added the > following entry to /etc/inittab > > SV:2345:respawn:env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service > dev/console > > After saving, I execute the following command: > > # kill -HUP 1 > > This does not start the process I have added. The process that I have added > only starts when I do: > > # init u > or > # telinit u > > PS - The process will not start even after a reboot. I have to manually do one > of the above commands as root. > > My kernel version is : 2.2.19 > Distro : Slackware > GCC : gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) > > Any help appreciated. I'm using Slackware 7.1, so one of the following possible solutions may work: First Make sure the daemon is available at boot time - if /usr/local/bin is where the svscan daemon exists, then /usr/local must be part of the root file system. What I do is have a "/host" directory tree on the root file system for this purpose. Alternatively, I start the daemon when the system enters multi-user mode (either /etc/rc.d/rc.local, or one of the already existing scripts related to what the daemon does). A second possibility (try this first - its easer: I see that the daemon is to run in modes "2345". There is a possiblity that you have this entry near the beginning of the inittab. If so, try putting it at the end. I believe that init runs each line of the inittab for a given run level in the same order that it appears in the file. Putting the entry last should allow it to be started AFTER all file systems are mounted - the entry for multiuser mode is: # Script to run when going multi user. rc:2345:wait:/etc/rc.d/rc.M If your daemon entry follows this line then it may work as you expect. Remember, any facility that the daemon depends on must be initialized before the daemon starts - If it uses the network then the network needs to be loaded (mine needs sockets loaded...) before the daemon is started. Note: since the assumption that the daemon is in /usr/local and that /usr/local is a separate file system is true, then you will no longer be able to dismount the /usr/local file system while in multi-user mode (it's busy). This may only be relevent to how your backups are done. BTW, SIGHUP may not be the correct signal - from the init manpage: SIGHUP Init looks for /etc/initrunlvl and /var/log/initrun- lvl. If one of these files exist and contain an ASCII runlevel, init switches to the new runlevel. This is for backwards compatibility only! . In the normal case (the files don't exist) init behaves like telinit q was executed. The only documented startup is "init u" or "telinit u". To re-read the inittab file use "init q" or "telinit q". I suspect the manpage is a little "inaccurate" in stating that SIGHUP is equivalent to "telinit q" - Jesse I Pollard, II Email: [EMAIL PROTECTED] Any opinions expressed are solely my own. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: init process in 2.2.19
Subba Rao [EMAIL PROTECTED]: I am trying to add a process which is to be managed by init. I have added the following entry to /etc/inittab SV:2345:respawn:env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service /dev/null 2 dev/console After saving, I execute the following command: # kill -HUP 1 This does not start the process I have added. The process that I have added only starts when I do: # init u or # telinit u PS - The process will not start even after a reboot. I have to manually do one of the above commands as root. My kernel version is : 2.2.19 Distro : Slackware GCC : gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) Any help appreciated. I'm using Slackware 7.1, so one of the following possible solutions may work: First Make sure the daemon is available at boot time - if /usr/local/bin is where the svscan daemon exists, then /usr/local must be part of the root file system. What I do is have a /host directory tree on the root file system for this purpose. Alternatively, I start the daemon when the system enters multi-user mode (either /etc/rc.d/rc.local, or one of the already existing scripts related to what the daemon does). A second possibility (try this first - its easer: I see that the daemon is to run in modes 2345. There is a possiblity that you have this entry near the beginning of the inittab. If so, try putting it at the end. I believe that init runs each line of the inittab for a given run level in the same order that it appears in the file. Putting the entry last should allow it to be started AFTER all file systems are mounted - the entry for multiuser mode is: # Script to run when going multi user. rc:2345:wait:/etc/rc.d/rc.M If your daemon entry follows this line then it may work as you expect. Remember, any facility that the daemon depends on must be initialized before the daemon starts - If it uses the network then the network needs to be loaded (mine needs sockets loaded...) before the daemon is started. Note: since the assumption that the daemon is in /usr/local and that /usr/local is a separate file system is true, then you will no longer be able to dismount the /usr/local file system while in multi-user mode (it's busy). This may only be relevent to how your backups are done. BTW, SIGHUP may not be the correct signal - from the init manpage: SIGHUP Init looks for /etc/initrunlvl and /var/log/initrun- lvl. If one of these files exist and contain an ASCII runlevel, init switches to the new runlevel. This is for backwards compatibility only! . In the normal case (the files don't exist) init behaves like telinit q was executed. The only documented startup is init u or telinit u. To re-read the inittab file use init q or telinit q. I suspect the manpage is a little inaccurate in stating that SIGHUP is equivalent to telinit q - Jesse I Pollard, II Email: [EMAIL PROTECTED] Any opinions expressed are solely my own. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: init process in 2.2.19
On Thu, Apr 26, 2001 at 05:30:16PM +, Subba Rao wrote: I am trying to add a process which is to be managed by init. I have added the following entry to /etc/inittab SV:2345:respawn:env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service /dev/null 2 dev/console After saving, I execute the following command: # kill -HUP 1 This does not start the process I have added. The process that I have added only starts when I do: telinit q tells init to re-read the inittab, as per the telinit man page. -- Russell King ([EMAIL PROTECTED])The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: init process in 2.2.19
On 0, Jesse Pollard [EMAIL PROTECTED] wrote: Subba Rao [EMAIL PROTECTED]: I am trying to add a process which is to be managed by init. I have added the following entry to /etc/inittab SV:2345:respawn:env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service /dev/null 2 dev/console After saving, I execute the following command: # kill -HUP 1 This does not start the process I have added. The process that I have added only starts when I do: # init u or # telinit u PS - The process will not start even after a reboot. I have to manually do one of the above commands as root. My kernel version is : 2.2.19 Distro : Slackware GCC : gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) Any help appreciated. I'm using Slackware 7.1, so one of the following possible solutions may work: Forgot to mention that I am using Slackware 7.1 too A second possibility (try this first - its easer: I see that the daemon is to run in modes 2345. There is a possiblity that you have this entry near the beginning of the inittab. If so, try putting it at the end. I believe that init runs each line of the inittab for a given run level in the same order that it appears in the file. Putting the entry last should allow it to be started AFTER all file systems are mounted - the entry for multiuser mode is: # Script to run when going multi user. rc:2345:wait:/etc/rc.d/rc.M SNIP Thank you for replying! I have tried those methods and they did not work. What I did as recommended by someone, is that I added strace to the process in /etc/inittab SV:2345:respawn:strace env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service /dev/null 2/backup/strace.out Instead of sending the strace messages to the console, I saved them to a file. Part of the log is at the end of this note. Most of these messages seem to be from the memory module. If anyone could look at these messages and let me know how to fix it, I would appreciate it. Thank you in advance for any help! -- Subba Rao [EMAIL PROTECTED] http://members.home.net/subba9/ GPG public key ID 27FC9217 execve(/usr/bin/env, [env, -, PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin, svscan, /service], [/* 16 vars */]) = 0 brk(0) = 0x804a3c0 open(/etc/ld.so.preload, O_RDONLY)= -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=22195, ...}) = 0 old_mmap(NULL, 22195, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000 close(3)= 0 open(/lib/libc.so.6, O_RDONLY)= 3 fstat(3, {st_mode=S_IFREG|0755, st_size=1013224, ...}) = 0 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\250\206..., 4096) = 4096 old_mmap(NULL, 954492, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000 mprotect(0x400fc000, 28796, PROT_NONE) = 0 old_mmap(0x400fc000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe1000) = 0x400fc000 old_mmap(0x4010, 12412, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4010 close(3)= 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40104000 mprotect(0x4001a000, 925696, PROT_READ|PROT_WRITE) = 0 mprotect(0x4001a000, 925696, PROT_READ|PROT_EXEC) = 0 munmap(0x40014000, 22195) = 0 personality(PER_LINUX) = 0 getpid()= 880 brk(0) = 0x804a3c0 brk(0x804a3f8) = 0x804a3f8 brk(0x804b000) = 0x804b000 execve(/usr/local/bin/svscan, [svscan, /service], [/* 1 var */]) = 0 brk(0) = 0x8053d20 open(/etc/ld.so.preload, O_RDONLY)= -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=22195, ...}) = 0 old_mmap(NULL, 22195, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000 close(3)= 0 open(/lib/libc.so.6, O_RDONLY)= 3 fstat(3, {st_mode=S_IFREG|0755, st_size=1013224, ...}) = 0 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\250\206..., 4096) = 4096 old_mmap(NULL, 954492, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000 mprotect(0x400fc000, 28796, PROT_NONE) = 0 old_mmap(0x400fc000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe1000) = 0x400fc000 old_mmap(0x4010, 12412, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4010 close(3)= 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40104000 mprotect(0x4001a000, 925696, PROT_READ|PROT_WRITE) = 0 mprotect(0x4001a000, 925696, PROT_READ|PROT_EXEC) = 0 munmap(0x40014000, 22195)
init process in 2.2.19
Hi, I am trying to add a process which is to be managed by init. I have added the following entry to /etc/inittab SV:2345:respawn:env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service dev/console After saving, I execute the following command: # kill -HUP 1 This does not start the process I have added. The process that I have added only starts when I do: # init u or # telinit u PS - The process will not start even after a reboot. I have to manually do one of the above commands as root. My kernel version is : 2.2.19 Distro : Slackware GCC : gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) Any help appreciated. -- Subba Rao [EMAIL PROTECTED] http://members.home.net/subba9/ GPG public key ID 27FC9217 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
init process in 2.2.19
Hi, I am trying to add a process which is to be managed by init. I have added the following entry to /etc/inittab SV:2345:respawn:env - PATH=/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /service /dev/null 2 dev/console After saving, I execute the following command: # kill -HUP 1 This does not start the process I have added. The process that I have added only starts when I do: # init u or # telinit u PS - The process will not start even after a reboot. I have to manually do one of the above commands as root. My kernel version is : 2.2.19 Distro : Slackware GCC : gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) Any help appreciated. -- Subba Rao [EMAIL PROTECTED] http://members.home.net/subba9/ GPG public key ID 27FC9217 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/