sapcontrol -nr 69 -function GetVersionInfo
sapcontrol -nr 46 -function GetProcessList
sapcontrol -nr 66 -function J2EEGetProcessList
sapcontrol -nr 47 -function GetSystemInstanceList
sapcontrol -nr 75 -function ParameterValue SAPLOCALHOST
sapcontrol -nr 66 -function ParameterValue SAPPROFILE
sapcontrol -nr 66 -function GetEnvironment
sapcontrol -nr 46 -function GetQueueStatistic
sapcontrol -nr 00 -function GetInstanceProperties
sapcontrol -nr 00 -function GetInstanceProperties | grep URL
sapcontrol -nr 00 -function GetAccessPointList
sapcontrol -nr 00 -function ABAPReadSyslog
sapcontrol -nr 46 -function EnqGetLockTable
sapcontrol -nr 00 -function ABAPGetWPTable


-repeat
Repeat webmethod call times (-1=forever) with sec delay



root@:/home/users/USER/moni # su - sidadm -c "sapcontrol -format script -nr 12 -function GetSystemInstanceList"

28.04.2017 23:11:43
GetSystemInstanceList
OK
0 hostname: lincidgh1200
0 instanceNr: 12
0 httpPort: 51213
0 httpsPort: 51214
0 startPriority: 2
0 features: ABAP|GATEWAY|MESSAGESERVER|ENQUE|ICMAN|IGS
0 dispstatus: GREEN


sapcontrol | grep -i info/instance/version

sapcontrol -nr 12 -function GetInstanceProperties | grep URL

JAVA equivalent of CVERS/SVERS/PVERS - SAPGCUDB.BC_COMPVERS








NAME
sapcontrol (Version: 721, patch 401, changelist 1550899)

SYNOPSIS
sapcontrol [-prot ]
[-trace ]
[-debug]
[-user ]
[-queryuser]
[-repeat ]
[-format ]
[-host ]
-nr
-function [parameter list]

DESCRIPTION
Control and monitor SAP instances via WebService interface of SAP Start Service.

OPTIONS
-prot
Specify the protocol for the communication with the SAP instance.
Available protocols are:
NI_HTTP HTTP using SAP NI sockets (default, prefer Unix domain sockets)
NI_HTTPS HTTPS using SAP NI sockets (prefer Unix domain sockets)
GSOAP_HTTP HTTP using gsoap build in sockets
WINHTTP HTTP using Windows winhttp
WINHTTPS HTTPS using Windows winhttp
PIPE Windows named pipes (on Unix same as NI_HTTP)
-trace
Trace SOAP request/response
-debug
Write local trace to stderr
-user
OS user and password for Webservice authentication
-queryuser
Query interactively for user and password
-repeat
Repeat webmethod call times (-1=forever) with sec delay
-format
Specify the format for the output of the webmethod.
Available formats are:
list List output format (default)
script Script output format
-host
Host to connect to (default: localhost)

WEBMETHODS
Start [runlevel]
InstanceStart [runlevel]
Bootstrap [ ]
Stop [softtimeout sec]
InstanceStop [softtimeout sec]
Shutdown
RestartInstance [ [runlevel]]
StopService
StartService
RestartService
ParameterValue []
GetStartProfile
GetTraceFile
GetAlertTree
GetAlerts
GetEnvironment
GetVersionInfo
GetQueueStatistic
GetProcessList
GetInstanceProperties
ListDeveloperTraces
ReadDeveloperTrace
ListLogFiles
ReadLogFile [ [ [ []]]]
AnalyseLogFiles [ [
[ ]]]
ConfigureLogFileList set|add|remove [ ... ]
GetLogFileList
CreateSnapshot [ [ [
[ [
[maxentries
[ ... ]]]]]]]
ReadSnapshot []
ListSnapshots
DeleteSnapshots [... ]
GetAccessPointList
GetProcessParameter [pid]
SetProcessParameter
[ ... ]
OSExecute
SendSignal
GetCallstack
GetSystemInstanceList []
StartSystem [ALL|SCS|DIALOG|ABAP|J2EE|TREX|ENQREP|HDB|ALLNOHDB|LEVEL
[ [runlevel]]]
StopSystem [ALL|SCS|DIALOG|ABAP|J2EE|TREX|ENQREP|HDB|ALLNOHDB|LEVEL
[ []]]
RestartSystem [ALL|SCS|DIALOG|ABAP|J2EE|TREX|ENQREP|HDB|ALLNOHDB|LEVEL
[ [ [runlevel]]]]
AccessCheck
GetSecNetworkId [ []]
GetNetworkId []
RequestLogonFile
HACheckConfig
HACheckFailoverConfig
HAGetFailoverConfig
HAFailoverToNode
ABAPReadSyslog
ABAPReadRawSyslog
ABAPGetWPTable
ABAPGetSystemWPTable []
J2EEControlProcess
J2EEControlCluster [ ]
J2EEEnableDbgSession [ ]
J2EEDisableDbgSession
J2EEGetProcessList
J2EEGetProcessList2
J2EEGetThreadList
J2EEGetThreadList2
J2EEGetThreadCallStack []
J2EEGetThreadTaskStack []
J2EEGetSessionList
J2EEGetCacheStatistic
J2EEGetCacheStatistic2
J2EEGetApplicationAliasList
J2EEGetComponentList
J2EEControlComponents
,...,
J2EEGetWebSessionList
J2EEGetWebSessionList2
J2EEGetEJBSessionList
J2EEGetRemoteObjectList
J2EEGetVMGCHistory
J2EEGetVMGCHistory2
J2EEGetVMHeapInfo
J2EEGetClusterMsgList
J2EEGetSharedTableInfo
ICMGetThreadList
ICMGetConnectionList
ICMGetProxyConnectionList
ICMGetCacheEntries
WebDispGetServerList
EnqGetStatistic
EnqGetLockTable
StartWait
StopWait
WaitforStarted
WaitforStopped
RestartServiceWait
WaitforServiceStarted
CheckHostAgent

EXITCODES
0 Last webmethod call successful
1 Last webmethod call failed, invalid parameter
2 StartWait, StopWait, WaitforStarted, WaitforStopped, RestartServiceWait
timed out
3 GetProcessList succeeded, all processes running correctly
4 GetProcessList succeeded, all processes stopped

SECURITY
Trusted connects without user and password check are possible through
Unix domain socket or Windows named pipes. Protected webmethods like
Start or Stop require a trusted connection or OS user and password
authentication.

EXAMPLES
sapcontrol -nr 0 -function GetProcessList
Gets the list of processes on instance 00 on localhost

NOTES
A detailed description of the SAPControl webservice interface is available on
http://scn.sap.com/docs/DOC-14382. The actual interface definition can be queried
from the SAP Start Service via http://:5XX13/?wsdl or https://:5xx14/?wsdl.
The WSDL contains a short documentation of each webmethod (XML tags "").
SAP MMC (http://scn.sap.com/docs/DOC-8294) provides a graphical user interface as
Snap-In for the Microsoft Management Console and SAP MC provides a graphical user
interface as Java Swing UI launched from a browser (http://:5XX13
or https://:5XX14).