Restart remote agent via command

Everything about Control-M agents installation or setup.
Post Reply
User avatar
kolsasha
Nouveau
Nouveau
Posts: 7
Joined: 21 Apr 2011 12:00

Restart remote agent via command

Post by kolsasha » 29 Nov 2011 4:26

Hi experts.
very new to Control-m since new app in our company.
I'm looking for command that can restart agent remote with command script or some other approaches?!
I need to create a weekly job with command that will restart agent for oracle database on Linux server
Environment Control-m v.7 - Linux
Database agent on Linux server
Problem is we have a memory leak issue and if we do not restart agent on weekly bases than database jobs start failing with error:
Exit Code = 1
Exit Message = java.lang.OutOfMemoryError: unable to create new native thread

After we restart agent manually, same jobs run fine. so to be proactive we like to recycle agent on weekly bases.
Thanks

User avatar
fafa1975
Nouveau
Nouveau
Posts: 31
Joined: 18 Mar 2010 12:00

Post by fafa1975 » 13 Dec 2011 4:06

HI,
you could try to create a shell script that stop and start Control/M agent:


#!/bin/bash
ctm/scripts/shut-ag –u <agent_username> -p ALL
sleep 10
ctm/scripts/start-ag –u <agent_username> -p ALL

You must launch it as root and you could schedule it from you control/M Agent because system command scripts are executed with a different process.
Or you can configure agent as a service (create scripts in /etc/rc.d/init.d , ec.) and execute a restart.

User avatar
ahtisham454
Nouveau
Nouveau
Posts: 23
Joined: 16 Feb 2012 12:00

Post by ahtisham454 » 16 Feb 2012 12:28

thank you for sharing, It is a great post.

Post Reply