Dear Mr. Brezani,
The Get_SNMP_Data() API is unfortunately not implemented in RTOS-LNX.
Since the RTOS-LNX has a Linux system under the hood, the /proc/net/snmp file in the root filesystem can be manually parsed as a workaround. Please consult
https://www.beck-ipc.com/api_files/sc145/_access_root_fs.html about how to access files in the root filesystem.
Consult
https://www.beck-ipc.com/api_files/sc145/_flavours.html to learn more about the underlying Linux system and how to access it via the shell as well (please read the disclaimer text carefully).
The /proc/net/snmp file will contain something like the following:
- Code: Select all
cat /proc/net/snmp
Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
Ip: 2 64 19155 0 4 0 0 0 9442 4861 0 0 5 9931 552 5 0 0 0
Icmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
Icmp: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 4 0 0 0 0 0 0 0 0 0
IcmpMsg: OutType11
IcmpMsg: 4
Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors
Tcp: 1 200 120000 -1 0 0 0 0 0 0 0 0 0 0 0
Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
Udp: 4852 0 0 4857 0 0 0 4590
UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
UdpLite: 0 0 0 0 0 0 0 0
...which you can parse to get the required values.
Regards
Michail G. Etairidis
Michael G. Etairidis
Software Development
Beck IPC GmbH