www.beck-ipc.com
www.beck-ipc.comwww.beck-ipc.com  | ImprintImprint
FAQFAQ  | SearchSearch  |
  |LoginLogin

Get_SNMP_Data function

Questions and discussions about the operating system RTOS-LNX and the corresponding C-LIB.

Get_SNMP_Data function

Postby lacob » 21.11.2019, 11:08

Hi,
RTOS has support TCP/IP API function for SNMP agents: Get_SNMP_Data. Does RTOS-LNX have any support for SNMP? I have not found it in the on-line documentation.

Thanks.

Ladislav Brezani
Enhexa s.r.o, Slovakia

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

Return to RTOS-LNX


Who is online

Users browsing this forum: No registered users and 0 guests


cron