in reply to Re^7: Forking Clients
in thread Forking Clients
The main program is essentially a test script, which communicates via rpc with another server which will execute system commands. There are a bunch of intermediary modules between the main test script and the actual point where the rpc call is made. This is pretty much why I am trying to dumb it down so I understand the basics.
Here is what I want to do in the main program
my $remoteServer = new Host($ip); ... #I want the following to run concurrently my @networkinfo = $remoteServer->getNetworkInfo(); my @sysLog = $remoteServer->getSystemLog(); my @scsiInfo = $remoteServer->getScsiInfo(); #So I have kicked all these off, I need to get the #networkinfo and scsiInfo information back before #continuing. The sy +sLog I don't need, its going to be #grabbed way down the line, possibly at the end of the #program ... package Host; sub getNetworkInfo { ($self) = @_; my @results = $self->rpc('RPCService::system_call', 'ipconfig /all' +); return @results; } sub getScsiInfo { ($self) = @_; my @results = $self->rpc('RPCService::system_call', 'scsinit -a'); return @results; } sub getSystemLog { ($self) = @_; my @results = $self->rpc('RPCService::system_call', 'eventlog -a'); return @results; } sub rpc { ($self, $func, $command) = @_; my $ip = $self->getIP(); #start threaded/process code here ..??.. my $port = $self->getPort(); my $connection = ClarRPC->connect($ip, $port); my @resp = $connection->rpc($func, $command); $connection->disconnect(); ..??.. #end threaded/process code here }
Let me know if I need to clear anything up. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Forking Clients
by BrowserUk (Patriarch) on Oct 16, 2008 at 13:59 UTC | |
by gepapa (Acolyte) on Oct 16, 2008 at 14:50 UTC | |
by BrowserUk (Patriarch) on Oct 16, 2008 at 15:28 UTC | |
by gepapa (Acolyte) on Oct 16, 2008 at 17:57 UTC | |
by BrowserUk (Patriarch) on Oct 16, 2008 at 18:09 UTC | |
by Anonymous Monk on Oct 21, 2008 at 14:44 UTC | |
by BrowserUk (Patriarch) on Oct 21, 2008 at 18:48 UTC |