I'm writing a script that loads calculation files to a server, runs calculations and downloads the finished files again. Everything works, except the command does not. A needed command is "bbjobs" and it works fine when I'm working with WinSCP, in python with paramiko this error message arrives:
['bash: bbjobs: command not found\n']
With "which bbjobs" I found the complete path of the command. But when I try it with the complete path this error message arrives:
['/cluster/apps/lsf/10.1/linux2.6-glibc2.3-x86_64/bin/bbjobs: error while loading shared libraries: liblsf.so: cannot open shared object file: No such file or directory\n']
Here is the code I'm using:
from paramiko import SSHClient, AutoAddPolicy
ssh = SSHClient()
ssh.load_system_host_keys()
ssh.set_missing_host_key_policy(AutoAddPolicy())
ssh.connect('host',22,'login','pwd')
(InputStream, OutputStream, Error) = ssh.exec_command('bbjobs')
print(list(OutputStream))
print(list(Error))
I have no idea what to do now... Thanks for your help!