Sponsored Content
Top Forums UNIX for Beginners Questions & Answers PLINK from Windows not releasing job Post 303043905 by stefshuuj on Monday 10th of February 2020 06:32:50 PM
Old 02-10-2020
PLINK from Windows not releasing job

Hi all,

I would greatly appreciate some help with this. I may not even be on the right path but I think I am close.

I have a Synology NAS that I am running rsync jobs on to offload to USB3. These work fine.
I have backup software on our Windows Server 2008R2 that I have now realized can launch a script upon completion of the backup job.

On my windows machine, the backup job kicks off a batch file with the contents:
Code:
plink.exe myusername@SYNOLOGY -pw mypassword -no-antispoof /volume1/SYSTEM-SCRIPTS/WK0102/rsync_WK0102-OffsiteDev.sh

The command actually runs from windows and works successfully. However, it runs from a Dos box on the Windows Server and that Dos box holds onto the job until completion.

All I actually want to do is have plink launch the remote command on the Synology machine and then release the job and let it run over there. I want the Dos part to then complete.

Any advice would be great. I am happy to use other methods if plink isn't the correct way to go about this.
Thanks in advance

Moderator's Comments:
Mod Comment Please do wrap your samples/codes in CODE TAGS as per forum rules.

Last edited by RavinderSingh13; 02-11-2020 at 12:10 AM..
 

10 More Discussions You Might Find Interesting

1. Programming

Problem with releasing semaphore lock

Hi, I am trying to write stuff to a shared memory using a writer, and reading the corresponding stuff using a reader. I am facing problems while releasing the lock, as a result of which I am having segmentation faults. The code is as follows... /********** writer.c ***********/ ... (1 Reply)
Discussion started by: jacques83
1 Replies

2. Windows & DOS: Issues & Discussions

windows scripting for a batch job

I have been doing unix scripting for quite awhile and there seems to be a wealth of information on it. Now I am working on migrating an intel based application to a new server. I need to modify some existing scripts, but am having trouble finding information on windows scripting, a forum similar... (2 Replies)
Discussion started by: MizzGail
2 Replies

3. Filesystems, Disks and Memory

Veritas HSM not releasing tapes

I have a volume managed by Veritas Storage Migrator 6.0 running on Solaris 10. It has one managed volume and one tape robot it shares with netpackup (separate volume pools). When I check the process tree I am not seeing any migration processes running, but when I check the panel on the tape robot... (0 Replies)
Discussion started by: ilikecows
0 Replies

4. Windows & DOS: Issues & Discussions

Requirements for running an autosys job on Windows server

Hi, I have created an autosys job which calls an exe and updates its output files. The job is failing without updating the output and error files. I if restart the usvmapgrnd01.pc.ml.com machine, the job runs successful for first time and fails rest of the time. Please let me know what might be... (0 Replies)
Discussion started by: sonaldewle
0 Replies

5. Programming

Posix Semaphore Use - Releasing all resources?

I am attempting to write a program with multiple POSIX threads. I want to ensure all threads are released at the same time. I am (trying to) use a semaphore to accomplish this. Without too much irrelevant information, I declare my semaphore with 0 of 25 resources available. Is there a way... (7 Replies)
Discussion started by: snowbarr
7 Replies

6. Solaris

Releasing the swap space Solaris

Hi Guys ! I have found this problem many times that the swap space (/tmp space more precisely )of my Server becomes full specially when i run a complete back up of the server . once the /tmp space is full I am not able to run simple commands as i get error like : fork no space on... (6 Replies)
Discussion started by: Paarth
6 Replies

7. Solaris

Releasing the swap space Solaris

Hi Guys ! I have found this problem many times that the swap space (/tmp space more precisely )of my Server becomes full specially when i run a complete back up of the server . once the /tmp space is full I am not able to run simple commands as i get error like : fork no space on... (4 Replies)
Discussion started by: Paarth
4 Replies

8. AIX

Releasing a Port

Hey Guys, I need a help, After I upgraded my server to AIX 6.1.4 the port 80 is occupied by a Java process bash-3.00# netstat -Aan | grep "*.80" f1000700007d7bb0 tcp 0 0 *.80 *.* LISTEN bash-3.00# rmsock f1000700007d7bb0 tcp usage: rmsock Addr... (2 Replies)
Discussion started by: kkeng808
2 Replies

9. AIX

AIX 6.1: Releasing Memory and Page Space

Hi everyone, i have a question about the Memory Management in AIX 6.1. I have - 128 GB RAM and - 70 GB Page Space. The application i am running on this machine is doing some operations in perl. These are done only once a day and uses both memory and paging space. My problem... (1 Reply)
Discussion started by: Haichao
1 Replies

10. Windows & DOS: Issues & Discussions

Plink issue in windows

I had a simple automation process to take config backup from san switches to windows via SSH. This can be accomplished using plink. My script was working fine earlier but from last few days it is not collecting data and the error which i am getting is below. "":confused: I have done the... (6 Replies)
Discussion started by: nirjhar17
6 Replies
Net::CLI::Interact::Manual::Cookbook(3pm)		User Contributed Perl Documentation		 Net::CLI::Interact::Manual::Cookbook(3pm)

NAME
Net::CLI::Interact::Manual::Cookbook - Miscellaneous recipes Windows Support The library works just fine under native windows (i.e use something like Strawberry Perl - no need for cygwin), for Telnet, Serial and SSH connections. However one additional step is required for you to have success: You must download the "plink.exe" application, and pass its filesystem location in the "app" parameter to "new()". Do not try to use any other Telnet or SSH programs (for instance the Windows bundled "telnet") - they will not work. Here's an example: my $s = Net::CLI::Interact->new( personality => "cisco", transport => "Telnet", (Net::CLI::Interact::Transport::is_win32() ? (app => "$ENV{HOMEPATH}\Desktop\plink.exe") : () ), ); Unix Support The library works fine on most Unix platforms. It will try to use the native "telnet", "ssh" (openssh) and "cu" programs for Telnet, SSH and Serial connections, respectively. If you want to use another application, pass it in the "app" parameter to "new". In some Unix environments there can be zombie child processes left around after running your script. If this happens, set the "reap" option, like so: my $s = Net::CLI::Interact->new( personality => "cisco", transport => "Telnet", connect_options => { reap => 1, }, ); Phrasebook Entries Prompts These are nothing more than named regular expressions: prompt configure match /(config[^)]*)# ?$/ Macros This example waits for the device to ask "[startup-config]?" and then responds with the text "startup-config". macro copy_run_start send copy running-config startup-config match /Destination filename [startup-config]?$/ send startup-config To send instead a press of the Return key (output record separator), use: macro write_mem send copy running-config startup-config match /Destination filename [startup-config]?$/ send '' To instead allow the user to pass in the file name, use a "sprintf" format. macro save_to_file send copy running-config startup-config match /Destination filename [startup-config]?$/ send %s The user must then pass a parameter to the "macro" call, even if it's an empty string: $s->macro('save_to_file', { params => ['file_name'] }); # or $s->macro('save_to_file', { params => [''] }); Continuations These are Macros which start with a match instead of a send: macro more_pages match / --More-- / send ' ' Note that the parameter of the "send" is not sent with a Return character (output record separator) appended. When included in a macro, the continuation can be in-line, like this: macro show_ip_route send show ip route follow / --More-- / with ' ' Running Commands Standalone Commands Simply send the command you wish to execute to the library. If not already done, a connection to the device will be established automatically: $s->cmd('show ip int br'); Normally this matches against a default prompt, which has been discovered automatically, or set by you: $s->set_prompt('user_prompt'); It's also possible to pass in a custom prompt for this command only: $s->cmd('show ip int br', { match => qr/special prompt>$/ }); Composite Macro Commands Call a predefined Macro from the phrasebook using this method: $s->macro('write_mem'); Sometimes the Macro needs parameters: $s->macro('to_priv_exec', { params => ['my_password'] }); You can't really create a Macro on the fly very easily, but with suitable use of "cmd()", "set_prompt()", and the "match" option to "cmd()" it's possible to achieve some simple flexibility. Reconfiguring On-the-Fly Phrasebook It's possible to load a new phrasebook by the following method, which must be passed at least the name of the personality: $s->set_phrasebook({ personality => 'ios' }); You can pass any options which the Phrasebook module itself would take. Prompt The current prompt can be changed by passing the name of the new Prompt as it is known by the phrasebook: $s->set_prompt('name'); If you want to test whether the current prompt matches a diffrent named Prompt from the phrasebook, this method can be used: $s->prompt_looks_like('name'); perl v5.14.2 2012-06-12 Net::CLI::Interact::Manual::Cookbook(3pm)
All times are GMT -4. The time now is 06:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy