01-28-2022 10:32 AM
Good evening,
I'm trying to connect to a device shell with a telnet or an SSH connection with a VI. The aim is to connect, send command to obtain the RAM and CPU usages of a process and save the shell output. All the data will be collected for monitoring the device and presented in a diagram. I have found the zip with ExtraPutty integration but I always receive the -604 error when i try to connect. I don't understand the cause.
So someone has any idea, advice or solution?
I add the zip with the Putty vi integration.
01-28-2022 01:02 PM
It's probably easier to create a PuTTY session then use the PuTTY scripting (through System Exec) to open the session, redirect output to stdout, run your commands, grab the results from System Exec stdout when the session closes and there you go.
02-01-2022 11:41 AM
Hi billko,
Do you mean "plink.exe"?
I've tried to use LabVIEW to run the commands as well as Putty, but it has a lot of limitations, especially for the cases about interactive mode.
And I wonder if the SFTP API featured since LabVIEW 2021 is a solution for that?
02-01-2022 12:25 PM
@William1225 wrote:
Hi billko,
Do you mean "plink.exe"?
I've tried to use LabVIEW to run the commands as well as Putty, but it has a lot of limitations, especially for the cases about interactive mode.And I wonder if the SFTP API featured since LabVIEW 2021 is a solution for that?
Yes, plink. Seemed like you just executed the same commands all the time. It's not difficult to redirect the output to stdout instead of the screen. Then when the session exits - provided it was called with system exec - you just collect the contents of stdout.