I need to execute a shell script on a remote linux box. But the shell script resides on the local linux box where I am currently logged in. Is there a way to do this? I know rsh <host> <command> can execute a command on the remote host. (6 Replies)
Hi guys,
I need to run and test some shell script. At work, i work on ksh. I don't have any such software/client installed at home and i cannot always connect to work from home. At home i have Windows Vista.
Is there a free and reliable software where i can run my ksh script?
Please let me... (4 Replies)
I have to use shell script to run series of commands on another unix box by connecting through SSH and giving user credentials. For running commands on remote machine I have to use options reading from a local file.
Process:
Connecting to remote unix server <host1.ibm.com> through ssh
Login: ... (2 Replies)
Trying to figure out why this works:
printpwd.pl
#!/usr/bin/perl
use CGI::Carp qw( fatalsToBrowser );
print "Content-type: text/html\n\n";
$A = system("pwd");
$A = `pwd`;
print "$A\n";
^^actually that works/breaks if that makes any sense.. i get the working directory twice but when... (5 Replies)
Hi All..
Am new to Unix!!
Am creating a shell script in which a scenario is like i have transfer the output file from unix machine (Server) to local directory (Windows xp).
And also i have to transfer the input file from the local directory to Unix machine (Server)
Any help from you... (1 Reply)
how to use ssh to run shell script on a remote machine?
ssh user@remote sh ./script.unx
i ran the above command
./script.unx HAS NOHUP COMMAND IN ITS BODY, I AM GETTING ERROR AS NOHUP NOT FOUND...
i tried to run that script from remote server, its working fine
do ineed to set... (6 Replies)
Hi All,
In a Shell scriipt with a SQL block I want to issue a query against a local DB and a remote DB on a remote server. The shell script is running locally.
This is how I connect to the local server. But I want the query to reference remote table in the join. Question can I specify a... (1 Reply)
Hello,
I need to create a shell script which will copy files - which are created on particular date and starting with particular name - to local windows XP machine.
Is this possible.?
Currently it is being done manually using winscp (1 Reply)
I have a script in local server
cd /home/dell/work/BOP/testdir
./processchk po (here processchk is a script & po is passed as an argument)
Now I want to execute this script from remote server
ssh $username@$hostname "cd /home/dell/work/BOP/testdir; ./processchk po"
But Its getting error... (9 Replies)
local script:
cat > first.sh
cd /tmp
echo $PWD
echo `whoami`
cd /tmp/123
tar -cvf 789.tar 456
sleep 10
except script:
cat > first
#!/usr/bin/expect
set ip 10.5.15.20
set user "xyz123"
set password "123456"
set script first.sh
spawn sh -c "ssh $user@$ip bash < $script" (1 Reply)
Discussion started by: Aditya Avanth
1 Replies
LEARN ABOUT NETBSD
xc_wait
XCALL(9) BSD Kernel Developer's Manual XCALL(9)NAME
xcall, xc_broadcast, xc_unicast, xc_wait -- cross-call interface
SYNOPSIS
#include <sys/xcall.h>
typedef void (*xcfunc_t)(void *, void *);
uint64_t
xc_broadcast(u_int flags, xcfunc_t func, void *arg1, void *arg2);
uint64_t
xc_unicast(u_int flags, xcfunc_t func, void *arg1, void *arg2, struct cpu_info *ci);
void
xc_wait(uint64_t where);
DESCRIPTION
The machine-independent xcall interface allows any CPU in the system to request that an arbitrary function be executed on any other CPU.
Sometimes it is necessary to modify hardware state that is tied directly to individual CPUs (such as a CPU's local timer), and these updates
can not be done remotely by another CPU. The LWP requesting the update may be unable to guarantee that it will be running on the CPU where
the update must occur, when the update occurs.
Additionally, it is sometimes necessary to modify per-CPU software state from a remote CPU. Where these update operations are so rare or the
access to the per-CPU data so frequent that the cost of using locking or atomic operations to provide coherency is prohibitive, another way
must be found.
Cross calls help to solve these types of problem. However, since this facility is heavyweight, it is expected that it will not be used
often.
xcall provides a mechanism for making ``low priority'' cross calls. The function to be executed runs on the remote CPU within a thread con-
text, and not from a software interrupt, so it can ensure that it is not interrupting other code running on the CPU, and so has exclusive
access to the CPU. Keep in mind that unless disabled, it may cause a kernel preemption.
xcall also provides a mechanism for making ``high priority'' cross calls. The function to be executed runs on the remote CPU within a
IPL_SOFTCLOCK software interrupt context, possibly interrupting other lower-priority code running on the CPU.
NOTES
Functions being called should be relatively lightweight. They may block on locks, but carefully and minimally, to not interfere with other
cross calls in the system.
FUNCTIONS
xc_broadcast(flags, func, arg1, arg2)
Call (*func)(arg1, arg2) on all CPUs in the system. Return a uint64_t ``ticket'' to xc_wait() on for the cross-call to complete.
flags should be XC_HIGHPRI for a "high priority" call, and 0 for a "low priority" call. xc_broadcast() should not be called from
interrupt context.
xc_unicast(flags, func, arg1, arg2, ci)
Like xc_broadcast(), but call (*func)() on only the CPU indicated by ci. xc_unicast() also returns a ``ticket''.
xc_wait(where)
Wait on the ``ticket'' returned by a prior xc_broadcast() or xc_unicast() for the corresponding cross-call to complete. xc_wait()
should be called from a thread context.
CODE REFERENCES
The xcall interface is implemented within the file sys/kern/subr_xcall.c.
SEE ALSO kpreempt(9), percpu(9)HISTORY
The xcall interface first appeared in NetBSD 5.0.
AUTHORS
Andrew Doran <ad@NetBSD.org>
BSD October 24, 2011 BSD