Hi!

OPC is no favorite of mine, so don't go there unless you really feel the 
urge of committing you to a Windows-only protocol (all others on this 
list probably shiver at those words...). You should be able to have 
SCADA call the command, redirecting to a file and then read the 
contects, even without opening a command window. What do you need to do 
with the text file in SCADA efter it has been created?

Perhaps Cygwin ("Linux on Windows") running expect could do the trick in 
one go for you without the need for intermediate log file. I'm sure some 
pesky "PowerShell" function could do this as well.

/Fredrik

Daniel Wilkes skrev 2014-04-03 22:33:
> Hi Fredrik,
>
> Thanks for the feedback, I must admit to getting confused about the function 
> of the -L switch. (Command-Line help doesn't really make it clear that it's 
> just for error messages, I don't think).
>
> I've been using the '>' redirector in the mean-time but because the SCADA 
> system doesn't open a visible command window when it executes the command 
> there is nothing that gets redirected. I've had to resort to the rather ugly 
> solution of writing a batch file and having windows scheduler run it every 15 
> minutes to actually get a file that I can parse into the SCADA system.
>
> I've been trying to avoid the OPC route as the OPC client driver for the 
> SCADA system is an optional extra that I will have to pay for an additional 
> licence for. Since I am just experimenting at this stage I can't really 
> justify that!
>
> Thanks Again
>
> Daniel.
>
> -----Original Message-----
> From: Fredrik Björk [mailto:f...@skulle.se]
> Sent: Friday, 4 April 2014 8:57 a.m.
> To: net-snmp-users@lists.sourceforge.net
> Subject: Re: SNMPGet and Log to file
>
> Hi!
>
> The obvious solution would be to stop using Windows and start using a real 
> OS, but I guess that's not the subject of the day... SCADA systems I've 
> bumped into have been using OPC for communications. Several vendors have SNMP 
> to OPC converters (Matrikon OPC SNMP server for instance) that may be one way 
> to go for you. A warning for the Matrikon product though.
> Email me if you want to know the issues I've encountered with their product.
>
> I think the -Lf does exactly what it's supposed to do:
>
> "LOGGING OPTIONS
>          The mechanism and destination to use for logging of warning and 
> error messages can be  controlled  by  passing  various
>          parameters to the -L flag.
>
>          -Le    Log messages to the standard error stream.
>
>          -Lf FILE
>                 Log messages to the specified file."
>
> You have no errors, and hence, no lines in the log file!
>
> Try this:
>
> snmpget -v 2c  -c <community name withheld > <IP address withheld> 
> 1.3.6.1.4.1.14817.3.3.2.20.1.5.2 >> "c:\Net SNMP\Output.txt"
>
>
> http://technet.microsoft.com/en-us/library/bb490982.aspx
>
>
> /Fredrik
>
> Daniel Wilkes skrev 2014-04-03 21:31:
>> Hi Again,
>>
>> Just re-posting as I still haven't come up with a resolution to this yet and 
>> hope someone can help.
>>
>> Thanks Heaps!
>>
>> Daniel
>>
>> -----Original Message-----
>> From: Daniel Wilkes [mailto:daniel.wil...@wmk.govt.nz]
>> Sent: Thursday, 20 March 2014 12:06 p.m.
>> To: net-snmp-users@lists.sourceforge.net
>> Subject: SNMPGet and Log to file
>>
>> Hi All,
>>
>> I'm new to the world of SNMP and am trying to get snmpget to log the result 
>> to a file so I can then parse the result into our SCADA system.
>>
>> The command I am using is:
>>
>> snmpget -v 2c -Lf "c:\Net SNMP\Output.txt" -c <community name withheld
>>> <IP address withheld> 1.3.6.1.4.1.14817.3.3.2.20.1.5.2
>> And the result is:
>>
>> SNMPv2-SMI::enterprises.14817.3.3.2.20.1.5.2 = INTEGER: -1029
>>
>> The "c:\Net SNMP\Output.txt" gets created but it is a zero byte file that 
>> has nothing in it, when I expect it to contain the same result text as is 
>> displayed on the screen. What am I doing wrong?
>>
>> Thanks
>>
>> Daniel.
>>
>> ________________________________
>> The information contained in this email message is CONFIDENTIAL INFORMATION 
>> and may also be LEGALLY PRIVILEGED. It is intended only for the individual 
>> or entity named above. If you are not the intended recipient, you are hereby 
>> notified that any use, review, dissemination, distribution or copying of 
>> this document is strictly prohibited. If you received this document in 
>> error, please immediately notify us by telephone (+64-3-3118900) and destroy 
>> the original message.
>>
>> ______________________________________________________________________
>> ________
>>
>> This email has been scrubbed for your protection by SMX.
>> For more information visit http://smxemail.com
>> ______________________________________________________________________
>> ________
>>
>>
>> ----------------------------------------------------------------------
>> -------- _______________________________________________
>> Net-snmp-users mailing list
>> Net-snmp-users@lists.sourceforge.net
>> Please see the following page to unsubscribe or change other options:
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
> ________________________________
> The information contained in this email message is CONFIDENTIAL INFORMATION 
> and may also be LEGALLY PRIVILEGED. It is intended only for the individual or 
> entity named above. If you are not the intended recipient, you are hereby 
> notified that any use, review, dissemination, distribution or copying of this 
> document is strictly prohibited. If you received this document in error, 
> please immediately notify us by telephone (+64-3-3118900) and destroy the 
> original message.
>
> ______________________________________________________________________________
>
> This email has been scrubbed for your protection by SMX.
> For more information visit http://smxemail.com
> ______________________________________________________________________________
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>


------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to