LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2007, 07:50 AM   #31
laucian
Member
 
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Original Poster
Rep: Reputation: 15

Code:
mfc-falter:/etc/init.d/rc3.d # runlevel
N 5
Code:
mfc-falter:/etc/init.d/rc3.d # find /etc/init.d -iname "*adsm" -ls
1266890    0 lrwxrwxrwx   1 root     root            7 Oct 25 09:50 /etc/init.d/rc5.d/K21adsm -> ../adsm
1266887    0 lrwxrwxrwx   1 root     root           16 Oct 25 12:30 /etc/init.d/rc5.d/S90adsm -> /etc/init.d/adsm
1266883    4 -rwxr-xr-x   1 root     root         1232 Oct 16 12:16 /etc/init.d/adsm
1266857    0 lrwxrwxrwx   1 root     root            7 Oct 25 09:50 /etc/init.d/rc3.d/K21adsm -> ../adsm
1265096    0 lrwxrwxrwx   1 root     root           16 Oct 25 14:39 /etc/init.d/rc3.d/S90adsm -> /etc/init.d/adsm

i think there is a problem here...

Code:
mfc-falter:/ # ps -ef | grep dsmc
root      4248  4183  0 14:44 pts/0    00:00:00 grep dsmc
mfc-falter:/ # /etc/init.d/rc5.d/S90adsm stop
 ADSM scheduler is not running.
mfc-falter:/ # /etc/init.d/rc5.d/S90adsm start
Starting ADSM scheduler...
...started - done.
mfc-falter:/ # ps -ef | grep dsmc
root      4261  4183  0 14:44 pts/0    00:00:00 grep dsmc
mfc-falter:/ # cd /etc/init.d/
so the link does not start the process (dsmc is the name of the process that adsm script starts)

but when i start it manually and directly (not using the Snn files)
Code:
mfc-falter:/etc/init.d # ./adsm start
Starting ADSM scheduler...
...started - done.
mfc-falter:/etc/init.d # ps -ef | grep dsmc
root      4305     1  1 14:45 pts/0    00:00:00 /opt/tivoli/tsm/client/ba/bin/dsmc schedule
root      4308  4183  0 14:45 pts/0    00:00:00 grep dsmc
mfc-falter:/etc/init.d #
is this command right?
Code:
ln -s /etc/init.d/adsm /etc/init.d/rc3.d/S90adsm
-s means making symbolic links instead of hard links here..what is the difference between them?
 
Old 10-25-2007, 08:28 AM   #32
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
Well, at least the adsm links are ok now.

The strange is "/etc/init.d/adsm start" works and "/etc/init.d/rc5.d/S90adsm start" not, even it says "Starting ADSM scheduler...started - done."

I think the problem is not with the link anymore but with the script itself.

In your post #20, you put a section of "/etc/init.d/adsm start" that says it is a "script is designed for Debian Linux" but you are using a openSuSE system, right ?

Try to replace this debian script by an another one designed to SuSE. Check if there is a SuSE script in the package.

Or you may try this one: Novell Cool solutions

Make a copy of "/etc/init.d/adsm" in a safe place, just in case, and copy the new script over "/etc/init.d/adsm".

The SuSE script in the above link follows the LSB conventions to be used with chkconfig.
In this case, remove the links manually, and run "chkconfig adsm on; checkonfig --list adsm" and check if the proper links were created in the right places and position.

Try to run by the link again.
 
Old 10-30-2007, 04:44 AM   #33
laucian
Member
 
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Original Poster
Rep: Reputation: 15
well i have replaced the script, set chkconfig adsm to off (which has deleted the links) .
Then i copied adsm to /etc/init.d/. set the file to mod 755.
then i made chkconfig adsm on..
the script was on levels 3 on 5 on. but it still did not start on the boot..

here is a log of the terminal
Code:
mfc-falter:~ # chkconfig -l adsm
adsm                      0:off  1:off  2:off  3:on   4:off  5:on   6:off
mfc-falter:~ # ps -ef | grep adsm
root      4170  4162  0 10:40 pts/2    00:00:00 grep adsm
mfc-falter:~ # find /etc/ -name "*adsm"
/etc/adsm
/etc/init.d/rc5.d/S09adsm
/etc/init.d/rc5.d/K13adsm
/etc/init.d/adsm
/etc/init.d/rc3.d/S09adsm
/etc/init.d/rc3.d/K13adsm
mfc-falter:~ # cd /etc/init.d/
mfc-falter:/etc/init.d # ls -l ads*
-rwxr-xr-x 1 root root 1777 Oct 30 10:22 adsm
-rwxr-xr-x 1 root root 1232 Oct 16 12:16 adsm_backup
 
Old 10-30-2007, 05:57 AM   #34
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
What you have done so far:
1) fixed the init script by the correct one, for SuSE systems.
2) fixed the links in the runlevels to run the init script at the right time (S09)

Now we have to find the reason it not start by look for messages in log files.

If you are using the init script provided by Novell Coll Solutions try to edit the section that call dsmc binary and change the null re-direction to a log file in /tmp instead.
Change from:
Code:
    echo -n $"Starting $prog2: "
    startproc -f -p $DSMC_PIDFILE $DSMC_BIN sched >/dev/null 2>/dev/null
    rc_status -v
    echo -n $"Starting $prog1: "
    startproc -f -p $DSMCAD_PIDFILE $DSMCAD_BIN  >/dev/null 2>/dev/null
    rc_status -v
to:
Code:
    LOG="/tmp/adsm-init.log"
    rm -f $LOG
    date > $LOG
    echo "before start $prog2" >>$LOG
    echo "the start cmd is: $DSMC_PIDFILE $DSMC_BIN sched" >>$LOG
    echo -n $"Starting $prog2: "
    startproc -f -p $DSMC_PIDFILE $DSMC_BIN sched >>$LOG 2>>$LOG
    rc_status -v
    echo "before start $prog1" >>$LOG
    echo "the start cmd is: $DSMCAD_PIDFILE $DSMCAD_BIN" >>$LOG
    echo -n $"Starting $prog1: "
    startproc -f -p $DSMCAD_PIDFILE $DSMCAD_BIN  >>$LOG 2>>$LOG
    rc_status -v
After the boot, try to find the reason it is not starting by inspecting the log files "/var/log/messages" and "/tmp/adsm-init.log".
At boot time try to see if there are messages in console, it may help you too.

Last edited by marozsas; 10-30-2007 at 06:03 AM.
 
Old 10-30-2007, 06:19 AM   #35
laucian
Member
 
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Original Poster
Rep: Reputation: 15
before we try it with the script from novell a quick question..

in msdos there is this autoexec.bat..i have made a search for its linux relevant and i have landed on /etc/init.d/boot.local file (on suse)

when i run this command on console
Code:
mfc-falter:/ # /etc/init.d/adsm start
Starting ADSM scheduler...
...started - done.
but then occurs the problem..
Code:
mfc-falter:/ # ps -ef | grep dsmc
root      4007  3969  0 12:15 pts/0    00:00:00 grep dsmc
there is no process..

then i try out smt. like this..

Code:
mfc-falter:/ # cd /etc/init.d/
mfc-falter:/etc/init.d # ./adsm start
Starting ADSM scheduler...
...started - done.
mfc-falter:/etc/init.d # ps -ef | grep dsmc
root      4062     1  1 12:17 pts/0    00:00:00 /opt/tivoli/tsm/client/ba/bin/dsmc schedule
root      4065  3969  0 12:17 pts/0    00:00:00 grep dsmc
and voila..this is what i need..but how can i place it boot.local?
what is the difference between these two commands?
should i really use cd command in a script file?
 
Old 10-30-2007, 06:31 AM   #36
laucian
Member
 
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Original Poster
Rep: Reputation: 15
ok now it works..i believe i have "technically" what i wanted..please correct me if i am wrong..

Code:
mfc-falter:~ # ps -ef | grep dsmc
root      2427     1  0 12:22 ?        00:00:00 /opt/tivoli/tsm/client/ba/bin/dsmc schedule
root      3897  3878  0 12:23 pts/0    00:00:00 grep dsmc
mfc-falter:~ # chkconfig --list adsm
adsm                      0:off  1:off  2:off  3:off  4:off  5:off  6:off
mfc-falter:~ # who -r
         run-level 5  Oct 30 12:22                   last=S
mfc-falter:~ # init 3
mfc-falter:~ # ps -ef | grep dsmc
root      2427     1  0 12:22 ?        00:00:00 /opt/tivoli/tsm/client/ba/bin/dsmc schedule
root      4020  3878  0 12:26 pts/0    00:00:00 grep dsmc
but there is the funny part of this..

first of all, the boot.local file;
Code:
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#
echo myadsm
cd /etc/init.d/
./adsm start
echo myadsm2
then /var/log/boot.msg file
Code:
myadsm
Starting ADSM scheduler...
...started - done.
myadsm2
i will now remove the myadsm and myadsm2 lines..but why do i need the cd command?
 
Old 11-01-2007, 07:20 AM   #37
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
Quote:
Originally Posted by laucian View Post

and voila..this is what i need..but how can i place it boot.local?
what is the difference between these two commands?
should i really use cd command in a script file?
In my post #4 I have mentioned /etc/init.d/boot.local as the place to put simple commands to be started just before the machine ends the boot process.

You can, for sure, put any commands in boot.local. The difference is it is not under the control of chkconfig so, you need to manually edit the file to activated or not the command in the next boot. In fact, the very first versions of unix/linux didn't have any other boot script but only a simple file where all commands are in, just like boot.local. In fact, even in nodays there are very tiny/small versions of unix-like system that have only one script executed at boot time, full of commands.

In fact, nothing changed at all. After kernel is up it calls the process /sbin/init that calls the script /etc/init.d/boot. This script will call every /etc/init.d/rcN.d/Snnwhatever and after that /etc/init.d/boot.local.



Quote:
Originally Posted by laucian View Post
then i try out smt. like this..
I sorry, I can't figure out what you mean by "try out smt" ?
 
Old 11-01-2007, 08:38 AM   #38
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
Congratulations !


Quote:
Originally Posted by laucian View Post
ok now it works..i believe i have "technically" what i wanted..please correct me if i am wrong..
...
i will now remove the myadsm and myadsm2 lines..but why do i need the cd command?
Man... I think it is a bug in the adsm script. For some reason it depends on the current directory....

Just to be sure, add the cd command at the beginning of adsm script, and remove it from boot.local and restore it via chkconfig. If it works, than it is really a bug - it runs only if the current dir is /etc/init.d/ for some reason....


best regards,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A lot of processes run automatically when I run a single process. dalvirgautam Linux - Enterprise 4 12-01-2006 06:10 PM
Viewing and setting processes to run on startup? Infernal211283 Linux - General 3 04-24-2006 07:38 AM
Processes on startup EclipseAgent SUSE / openSUSE 2 11-24-2005 03:48 AM
About startup processes kejia Fedora 2 11-09-2005 07:38 PM
Too many sleeping processes on startup? slugfish Linux - General 5 10-24-2003 03:04 PM


All times are GMT -5. The time now is 07:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration