Operating System - HP-UX
1827295 Members
2932 Online
109717 Solutions
New Discussion

Re: remsh and at question

 
SOLVED
Go to solution
Franky Leeuwerck_1
Regular Advisor

remsh and at question


Hi everyone,

I have a question about submitting an at-job via remsh.

As for this test setup, I tried to use remsh on the same host. The intention is to use remsh from another host in another WAN.


This is the setup.

host that runs the at-job : HostA
host that starts remsh : HostA (for this test)
user that starts remsh : UserA

HostA:/etc/hosts.equiv
permissions :
-rwxr--r-- 1 root sys contents :
HostA.domainname.com UserA
HostA UserA

HostA:/home/UserA/.rhosts
permissions :
-rwxr--r-- 1 scope users contents :
HostA UserA

JobA
date >> /home/UserA/JobA.log
echo test >> /home/UserA/JobA.log
echo >> /home/UserA/JobA.log

JobA.job
/usr/bin/at -f /home/UserA/JobA now +1 minute > /dev/null 2>&1


Running on HostA as UserA
remsh hostA -l UserA JobA
works fine .

Running on HostA as UserA
JobA.job
works fine too. The job is correctly scheduled an executed.

However,
Running on HostA as UserA
remsh hostA -l UserA JobA.job
doesn't work. There is no job scheduled.


Can anyone tell me why the remsh doens't work in case of the job with the at command ?

Thanks in advance,

Franky Leeuwerck
9 REPLIES 9
Elmar P. Kolkman
Honored Contributor

Re: remsh and at question

Franky,

You could try to redirect the stderr and stdout in jobA.job to a file, to see if any error is displayed. And when calling jobA.job in remsh, make sure you specify the full path.

I tried it and it seems to work for me..
Every problem has at least one solution. Only some solutions are harder to find.
Jean-Louis Phelix
Honored Contributor

Re: remsh and at question

Hi,

I fully agree with Elmar. It also worked for me ... after I added my login to /usr/lib/cron/at.allow :^)

Regards.
It works for me (© Bill McNAMARA ...)
Hoefnix
Honored Contributor

Re: remsh and at question


Why not try this:
remsh HostA -l UserA /usr/bin/at -f /home/UserA/JobA now +1 minute

This should also work.

Regards,

Peter
Franky Leeuwerck_1
Regular Advisor

Re: remsh and at question

Hello everyone

Thanks for the quick replies.
So far, it doesn't work for this host in China.

I tried the same setup before on a western host and yes, it succeeds like you all experienced on your tests.

But on this, as said, Chinese host I get an unreadable message when running :
remsh hostA -l userA /usr/bin/at -f /home/userA/jobA.job now +1
minute

Message : òà ¥ðùçû¼
Jean-Louis Phelix
Honored Contributor
Solution

Re: remsh and at question

hi,

Try to add "export LANG=C" at the beginning of the chinese at job script.

Regards.
It works for me (© Bill McNAMARA ...)
Elmar P. Kolkman
Honored Contributor

Re: remsh and at question

You could try to run your .profile from jobA.job before doing the at.

Probably you miss a setting like LANG or something else.

jobA.job will become:
. $HOME/.profile
/usr/bin/at -f /home/UserA/JobA now +1 minute > /dev/null 2>&1


Every problem has at least one solution. Only some solutions are harder to find.
Franky Leeuwerck_1
Regular Advisor

Re: remsh and at question

Elmar, Jean-Louis

Thanks fo the aid.
Adding . $HOME/.profile did not solve the problem.

But adding 'export LANG=C' was the solution. Well found ! Thanks Jean-Louis.

Can you tell me also what this setting means ?

Franky

Jean-Louis Phelix
Honored Contributor

Re: remsh and at question

Hi,

It only means that you want to get default langage for system messages (english in fact). But did it solve the problem or did it only make the message easier to understand ?

Regards.
It works for me (© Bill McNAMARA ...)
Franky Leeuwerck_1
Regular Advisor

Re: remsh and at question

Jean-Louis,

The problem was completely solved.
It works also now for running the remsh command from one of our western hosts upon the Chinese server.

Thanks,
Franky