Absent Member.. Absent Member..
Absent Member..
675 views

Windows SSH monitoring method - SiteScope

Jump to solution

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,

Labels (2)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

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

View solution in original post

2 Replies
Micro Focus Expert
Micro Focus Expert

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

View solution in original post

Absent Member.. Absent Member..
Absent Member..

Hello Bernhard,

You were right, now I see the results of the command, Many thanks for your contribution!,

Kindly Regards,
Adrian 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.