What commands are run by rsp for Windows or UNIX/Linux?
search cancel

What commands are run by rsp for Windows or UNIX/Linux?

book

Article ID: 227172

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

What commands are run by rsp for Windows or UNIX/Linux?

Environment

Any rsp release

Resolution

What commands are run by rsp for Windows or UNIX/Linux?
 
A:Command line details for the rsp probe are listed below but note that most calls are made via the probe interface, not via command line:
 
NOTE: For Windows, instead of using WMI_Provider.exe we are using a library. Exact WMI queries are given below.
You can also use the built in wbemtest in windows discussed in KB article:
 
https://knowledge.broadcom.com/external/article/34976/how-to-test-wmi-connectivity-using-micro.html


For Unix, Plink is not used anymore, however the commands given against pLink hold true. They are fired using yhr OpenSSH library.
 
Windows:
 
Get OS:
wmi_provider.exe -s <servername> -u Administrator -g os
select FreePhysicalMemory, TotalVisibleMemorySize, FreeSpaceInPagingFiles, SizeStoredInPagingFiles, Caption, Version, CSDVersion, OSLanguage, Locale  from Win32_OperatingSystem
 
Get CPUs:
wmi_provider.exe -s <servername> -u Administrator -g cpu
select Name, AddressWidth, Architecture, DeviceID, LoadPercentage from Win32_Processor
 
Get Disks:
wmi_provider.exe -s <servername> -u Administrator -g disk
select DriveType, Name, Capacity, FreeSpace from Win32_Volume where DriveType=3
 
Get Services:
wmi_provider.exe -s <servername> -u Administrator -g services
select Caption, State, StartMode, StartName from Win32_Service
 
Get Paging:
wmi_provider.exe -s <servername> -u Administrator -g paging'
select SystemType from Win32_ComputerSystem

Get Process Table:
wmi_provider.exe -s <servername> -u Administrator -g processes
select __PATH,Name,ProcessID,ParentProcessId,ThreadCount,Priority,ExecutablePath,KernelModeTime,UserModeTime,CommandLine from win32_process
 
Get Memory:
wmi_provider.exe -s <servername> -u Administrator -g memory
select AllocatedBaseSize, CurrentUsage, Name from Win32_PageFileUsage
 
Get Load:
wmi_provider.exe -s <servername> -u Administrator -g load
select AllocatedBaseSize, CurrentUsage, Name from Win32_PageFileUsage
 
UNIX:

Get OS Detail:
plink.exe -ssh root@<servername> /bin/uname -s -v -r -m
 
Get Disks Stats:
plink.exe -ssh root@<servername> /bin/df -P -k -l
 
Get System Uptime:
plink.exe -ssh root@<servername> /usr/bin/uptime
 
Get System Snapshot Since Reboot:
plink.exe -ssh root@<servername> /bin/cat /proc/stat
 
Get Memory Info:
plink.exe -ssh root@<servername> /bin/cat /proc/meminfo
 
Get vmstats:
plink.exe -ssh root@<servername> /bin/cat /proc/vmstat
 
Get Process Table:
plink.exe -ssh root@<servername> /bin/ps -eLo
 
pid,ppid,time,cpu,nlwp,pri,vsize,user,comm,command
 
Get Page size:
plink.exe -ssh root@<servername> /usr/bin/getconf PAGE_SIZE
 
Usage: plink [options] [user@]host [command]
("host" can also be a PuTTY saved session name)
Options:
-v show verbose messages
-load sessname Load settings from saved session
-ssh -telnet -rlogin -raw
     force use of a particular protocol (default SSH)
-P port connect to specified port
-l user connect with specified username
-m file read remote command(s) from file
-batch disable all interactive prompts
 
The following options only apply to SSH connections:
-pw passw login with specified password
-L listen-port:host:port Forward local port to remote address
-R listen-port:host:port Forward remote port to local address
-X -x enable / disable X11 forwarding
-A -a enable / disable agent forwarding
-t -T enable / disable pty allocation
-1 -2 force use of particular protocol version
-C enable compression
-i key private key file for authentication 
 
usage:
plink -ssh –l [user name] -pw [password] -v [user@]host [command]

example:
plink -ssh –l root -pw passs123 -v root@<servername> /bin/uname -s -v -r -m