System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

how to include controlM agent startup at /etc/inittab file

 
SOLVED
Go to solution
sysad_boy
Frequent Advisor

how to include controlM agent startup at /etc/inittab file

Hi HP Gurus,

Are you guys familiar with ControlM?
How can I include the controlM agent startup script in the /etc/inittab file?

Currently we are doing this manually because when you execute the agent startup command it asks for some parameters as input.

Is there such a way to inlcude the agent startup to the /etc/inittab file?




Thanks!
20 REPLIES
Roopesh Francis_1
Trusted Contributor
Solution

Re: how to include controlM agent startup at /etc/inittab file

you can include controlM agent startup scripts on rc scripts
sysad_boy
Frequent Advisor

Re: how to include controlM agent startup at /etc/inittab file

but how?

It requires some parameters being asked interactively when executed.
Hakki Aydin Ucar
Honored Contributor

Re: how to include controlM agent startup at /etc/inittab file

you cannot run with startup scripts which is interactive, simple solution ,first rename it and modify to a non-interactive one, if you can do.
Berd
Trusted Contributor

Re: how to include controlM agent startup at /etc/inittab file

I worked with Control-M for a number of years on HP-UX, and did not need to perform any manual action to start the agent. It was started automatically using rc scripts. Unfortunately, the site I now work at do not user Control-M so I cannot forward you a copy of the startup scripts. You should persevere, it is possible.

Regards,
Berd
Sharma Sanjeev
Respected Contributor

Re: how to include controlM agent startup at /etc/inittab file

Hi

You can start ControlM through rc scripts,
we are using this & starting it in rc2.d

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
bright image
Frequent Advisor

Re: how to include controlM agent startup at /etc/inittab file

You can specify all the options required as arguments to the start and stop agent scripts. These scripts should be run as root.

ctm/scripts/start-ag â u -p ALL

and in the shutdown script - you will need:

ctm/scripts/shut-ag â u -p ALL

see page 24 of http://www.control-musage.com/document/Documentation/CTMA/V6.3.01/AG63762.pdf
bright image
Frequent Advisor

Re: how to include controlM agent startup at /etc/inittab file

the strange characters above should read -u
sysad_boy
Frequent Advisor

Re: how to include controlM agent startup at /etc/inittab file

thanks for all your replies.

I was able to modify the startup-agent script and hardcoded the necessary inputs being required.

Actually my version of controlM asks for 2 parameters. First is the username and then the "ALL" input as mentioned in one of the posts here.

Thanks so much for your help.

Anyway what is the exact file to which I should add the agent-startup script? /etc/rc???
Berd
Trusted Contributor

Re: how to include controlM agent startup at /etc/inittab file

I would have one startup/shutdown script in /sbin/init.d, and then a startup process in /sbin/rc3.d e.g. S850CtrlM_agent and a shutdown in /sbin/rc3.d e.g. K850CtrlM_agent. If you look at other examples in these directories you should see how it hangs together.

Regards,
Berd
Sharma Sanjeev
Respected Contributor

Re: how to include controlM agent startup at /etc/inittab file

Hi

As Berd Suggested use same,we are also using the same in our setup.

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
sysad_boy
Frequent Advisor

Re: how to include controlM agent startup at /etc/inittab file

OK got it now.

I added my startup script at /sbin/rc3.d and my shutdown script at /sbin/rc0.d.

Problem is I cant change the permission of my shutdown script in /sbin/rc0.d

My default umask is
root:/sbin/rc0.d> umask -S
u=rwx,g=rx,o=rx

my current file permission:
l---r-xr-x 1 root sys 50 Jul 16 18:28 K891ctm-agent-shut.sh -> /home/ctmagent/Agent/ctm/scripts/ctm-agent-shut.sh

I want to change it to "755," but chmod is not working on this one.



TIA!


Sunny123_1
Esteemed Contributor

Re: how to include controlM agent startup at /etc/inittab file

Hi

Firstly unlink it then change the permission to 755 and then again link it.

Regards
Sunny
sysad_boy
Frequent Advisor

Re: how to include controlM agent startup at /etc/inittab file

the permissions of the original file is already at 755.
Bill Hassell
Honored Contributor

Re: how to include controlM agent startup at /etc/inittab file

> my current file permission:
> l---r-xr-x 1 root sys 50 ...

> I want to change it to "755," but chmod is not working on this one.

You can't change the link's permissions. The permissions for the link are set based on the current value for umask at the time you created the link but have no effect on the target (/sbin/init.d). You can remove the link, change umask to 022 and then recreate it -- but it does not change the target. A symbolic link is just a pointer.


Bill Hassell, sysadmin
Sunny123_1
Esteemed Contributor

Re: how to include controlM agent startup at /etc/inittab file

Hi

Basically you cant change the permissions of link.

Regards
Sunny
Roopesh Francis_1
Trusted Contributor

Re: how to include controlM agent startup at /etc/inittab file

use chmod -h 775 for changing the link file permission
-h If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to.

Re: how to include controlM agent startup at /etc/inittab file

>frans2008: use chmod -h 775 for changing the link file permission

chown(2) has a -h option but I don't see it for chmod(2)??
Roopesh Francis_1
Trusted Contributor

Re: how to include controlM agent startup at /etc/inittab file

NAME
chmod -- change file modes or Access Control Lists


SYNOPSIS
chmod [-fv] [-R [-H | -L | -P]] mode file ...
chmod [-fv] [-R [-H | -L | -P]] [-a | +a | =a] ACE file ...
chmod [-fhv] [-R [-H | -L | -P]] [-E] file ...
chmod [-fhv] [-R [-H | -L | -P]] [-C] file ...
chmod [-fhv] [-R [-H | -L | -P]] [-N] file ...


DESCRIPTION
The chmod utility modifies the file mode bits of the listed files as
specified by the mode operand. It may also be used to modify the Access
Control Lists (ACLs) associated with the listed files.

The generic options are as follows:

-f Do not display a diagnostic message if chmod could not modify the
mode for file.

-H If the -R option is specified, symbolic links on the command line
are followed. (Symbolic links encountered in the tree traversal
are not followed by default.)

-h If the file is a symbolic link, change the mode of the link
itself rather than the file that the link points to.

-L If the -R option is specified, all symbolic links are followed.

OldSchool
Honored Contributor

Re: how to include controlM agent startup at /etc/inittab file

"-h If the file is a symbolic link, change the mode of the link
itself rather than the file that the link points to."

ok, I can find that for AIX, some AT&T style systems, but nothing like that on hpux 10.20, or any 11.xx variant.

so, what OS'es man page is that????
Roopesh Francis_1
Trusted Contributor

Re: how to include controlM agent startup at /etc/inittab file

i have been working on different UNIX platforms.so just overlooked .it was from UNIX manpages.