How to run my tcl script from any directory on the Big IP server

I want to copy a script from my server to the BIG-IP server. I dont want to use bigip.conf file to store my script. Where can I store it and how do I run it through a SSH session ?

My version is BIG-IP 10.2.1 Build 297.0 Final . So I would need to download bigip.conf file to my server , append it with my script and then transfer it back to BigIP server ? No way I can copy my script to another location and run it for this version (10.2.1) ?

Hi Hasan,

What are you trying to accomplish with a TCL script? You don’t necessarily need to import it into the bigip.conf to run it.

Aaron

I want to automate operations on the load balancer from my management server. I am writing a script which can read all the configuration (pools,virtual servers) on the load balancer and output a key/value file. So I would need to run a remote script from my server. How do I do that without having to edit bigip.conf file ? Pls tell me how I can run it from a remote location ? Thanks

Are you reading the configuration from the config files or using tmsh?

If you want to automate this from a remote host, you could use iControl. Or if you want to use tmsh, I guess you could run tmsh remotely via SSH.

Aaron

Thanks for ur reply.I want to use tmsh. I am using the commands like get_config which will allow me to parse the output into various key/value objects. If I were to directly run the tmsh command like “list ltm pool” , I would need to parse it at my end and would need to maintain it (when different properties get added). Hence I prefer getting key/value objects from the script. Pls help

As for iControl , the assumption is that we would have only LTM and I am not sure if iControl is always available. Besides , I dont know much about it

If you want to run the script within tmsh I think you’d need to import it into the BIG-IP config. You could execute the script remotely by connecting via SSH and then running the tmsh script.

Aaron

Okay , what would be the best way to import my remote script into Big-IP config?

Hi Hasan,

Maybe you already checked the wiki: DevCentral

An other way to do is to create a bash script including tmsh command. You can easily execute it where you want, without editing bigip.conf.

As hoolio mention, the best way to do your job from a management server is the powerfull iControl. You can use this API with common script language as perl or ruby, check the DevCentral entry: DevCentral. It’s a bit longer to write than a simple tmsh script but so much cleaner & powerfull.

Best Regards,

Als.