

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello Experts,
I'm currently monitoring a windows server with SSH method, copssh was installed on the server as shown in the following link: https://www.youtube.com/watch?v=j-P8V1V4bMI, however when generating a script monitor (Command '' tasklist 'windows) which the .txt file contains the command' 'tasklist | sort / r / +65 '' which is required to sort the processes with greater use of memory to lower memory usage, the command is not recognized as such, it was necessary to change the '' / '' by '' - '' and the last parameter ''/+65'' was not recognized neither with the change of ''/'' by ''-''. I've noticed that this monitor windows script also accepts linux commands, I wonder if there is any way to maybe add a package to copssh software, so that accepts all Windows commands such as in a cmd window?
Thanks for any suggestions,
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
COPSSH is based on Cygwin and when logging in to your Windows system via SSH by default COPSSH will use /bin/bash as the login shell. Which is a Unix environment.
Your sort most likely fails because your default path (within bash) points to the Unix version of the sort command.
You may try something like to following to make your commands operate in the windows CMD environment:
cmd /C "tasklist | C:\Windows\System32\sort.exe /r /+65"
Best Regards
Bernhard

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
COPSSH is based on Cygwin and when logging in to your Windows system via SSH by default COPSSH will use /bin/bash as the login shell. Which is a Unix environment.
Your sort most likely fails because your default path (within bash) points to the Unix version of the sort command.
You may try something like to following to make your commands operate in the windows CMD environment:
cmd /C "tasklist | C:\Windows\System32\sort.exe /r /+65"
Best Regards
Bernhard


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello Bernhard,
You were right, now I see the results of the command, Many thanks for your contribution!,
Kindly Regards,
Adrian