I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.

I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.
I don't want it to be an EEM Event, I just want to run it from the (tcl)# prompt.
So I guess I'm asking if you can use cli_exec and other commands in the "namespace import ::cisco::eem::*" in a normal non-EEM script - can I do that?
This is the error I get:
OTN.159(tcl)#source flash:TCL_SNMP_Remote_Read.tcl
invalid command name "::cisco::eem::event_register_none"             ^
% Invalid input detected at '^' marker.
What am I missing?
=================  TCL_SNMP_Remote_Read.tcl  ==============================
::cisco::eem::event_register_none
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
if [catch {cli_open} RESULT]
    { error $RESULT $errorInfo }
    else { array set cli1 $RESULT }
if [catch {cli_exec $cli1(fd) "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0" } RESULT]
       { error $RESULT $errorInfo  }
       else { set SnmpSysDesc $RESULT }
if [catch {cli_close $cli1(fd) $cli1(tty_id)} RESULT] {
            error $RESULT $errorInfo
puts $SnmpSysDesc
=========================================================================
In the sho-run config I have:
event manager directory user policy "flash:/"
event manager session cli username "cisco"
Any help to get me started would be greatly appreciated!
Tim

If you don't want an EEM policy, then don't use any of the EEM constructs.  Instead, all you need is this:
set output [exec "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0"]puts $output

Similar Messages

  • HT201210 I am trying to update my iPhone but it seems that I have to many photos and music because I received the following message: The iPhone could not be updated; this device is not elegible for the requested build. Does anyone know how to fix this?

    I am trying to update my iPhone but it seems that I have to many photos and music because I received the following message: The iPhone could not be updated; this device is not elegible for the requested build. Does anyone know how to fix this?

    You have to delete the corrupt back-up so iTunes can at least back-up the current data on the iPhone and then restore it. Search these forums, there a several good posts on how to delete the corrupt back-up.

  • Ok, so basically my charger fell apart on my MacBook pro(2010) and I didn't have the money for a new charger, I got it in the states too if that's relevant. Basically my laptop will not charge, I bought a new charger yesterday and it's still no-use

    Ok, so basically my charger fell apart on my MacBook pro(2010) and I didn't have the money for a new charger, I got it in the states too if that's relevant. Basically my laptop will not charge, I bought a new charger yesterday and it's still no-use,not charging . No green or orange light coming on on the new charger either.

    It is one of the items that Apple gets criticized at regular intervals. The MagSafe connector is proprietary and unlicensable, so the company has a lock-in on the power options. And as you have now found out, your hijinks trying to avoid buying an expensive new charger may have caused more damage and led to a total no-charge condition.
    If lucky and no physical damage has occurred (there IS a fuse in there somewhere on the circuit boards), maybe resetting the SMC can restore charge functionality, provided there is still enough juice: http://support.apple.com/kb/HT3964

  • I am trying to open CR2 files from a Cannon EOS 1DX camera in Photoshop CS6 and I have already updated the Camera Raw Plug in but Photoshop is still giving me the cannot open files dialog box? Help?

    I am trying to open CR2 files from a Cannon EOS 1DX camera in Photoshop CS6 and I have already updated the Camera Raw Plug in but Photoshop is still giving me the cannot open files dialog box? Help?

    Canon 1DX support was added to ACR in version 6.7, 7.1.  An updated CS6 should be at level ACR 8.6.  If your ACR is not at level 8.6 try using CS6 menu Help>Updates.  If that does not install ACR 8.6 try downloading the ACR and DNG 8.6 converter and see if ACR 8.6 will install into your CS6.
    Adobe - Adobe Camera Raw and DNG Converter : For Windows
    Adobe - Adobe Camera Raw and DNG Converter : For Macintosh

  • I have the iphone 4 and PC with Windows Vista Basic. When I bought my iPhone syncs with iTunes on my computer, but now when I try to sync it tells me that Mobile Device Service was closed and I can not synchronize the phone. Try restarting Mobile Device S

    I have the iphone 4 and PC with Windows Vista Basic. When I bought my iPhone syncs with iTunes on my computer, but now when I try to sync it tells me that Mobile Device Service was closed and I can not synchronize the phone. Try restarting Mobile Device Service and uninstall and reinstall Itunes but still giving me the same error.

    http://support.apple.com/kb/HT3965

  • I have submitted build by xcode 6.1 but in itunes account shows us Apps and app updates submitted to the App Store must be built with Xcode 5.1.1 or later, and iOS 7 or later SDK after clicking the submit for review.

    I have submitted build by xcode 6.1 but in itunes account shows us Apps and app updates submitted to the App Store must be built with Xcode 5.1.1 or later, and iOS 7 or later SDK after clicking the submit for review.
    Please tell me the solution as soon as possible and i am able to remove the build.

    You have used Xcode 6.1 and it is a valid version, so you should not have any problem. Anyway, if there is any problem, Apple will contact with you to fix it before your app is published.

  • I was at Apple Store yesterday and they created a pages document for me.  When I got home and tried to open it, I get a message that I need a newer version of Pages.  I see the image when I before I push "open".  The 'kind' is pages publication.

    I was at Apple Store yesterday and they created a pages document for me.  When I got home and tried to open it, I get a message that I need a newer version of Pages.  I see the image before I push "open".  The 'kind' is pages publication.  The file does not appear in the 'open recent' list.

    Just be careful with Pages 5, it is not strictly an upgrade.
    Apple has actually removed over 90 features and some work can be very difficult in the newer version.
    It was all done to make it more interchangeable with the inferior iOS version:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&mforum=iworktipsn trick
    Peter

  • The lock screen on my IPad zoomed in on itself. It is zoomed in so far that I can't unlock it, and I can't see the 'slide to power off' option. I've tried to reset it numerous times. Any suggestions?

    The lock screen on my IPad zoomed in on itself. It is zoomed in so far that I can't unlock it, and I can't see the 'slide to power off' option. I've tried to reset it numerous times. Any suggestions? Help please!

    Try double tapping the screen with three fingers to return to normal size. If it works go to settings> general> accessibility> zoom> off.

  • I am trying to purches my music, but it say that my itunes acount is closed, and that i have to answer my security questions, and that I'm new to itunes.

    I am trying to purches my music, but it say that my itunes acount is closed, and that i have to answer my security questions, and that I'm new to itunes.

    Hi samanthastorhmeieryahoo.com
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Apple ID: "This Apple ID has been disabled for security reasons" alert appears
    http://support.apple.com/kb/TS2446
    If you require additional assistance with this, click on the link below for guidance:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Cheers,
    - Judy

  • Trying to update apps but keep getting message that my Apple ID can't be used to purchase from the iTunes store but it works on my iPhone & computer?

    OS is 5.1.1 but it says no updates available. I've had the iPod for a few years but if I remember right it's 3rd Gen. Model #MC011C. I have no problems purchasing or updating apps on my iPhone, and I went to iTunes in my computer and purchased a song just to see if I could, and didn't have any problem. And I have tons of memory left on the iPod.

    Thank you for your answer
    I went to the App Store app and selected "Updates" along the bottom menu. It said 11 updates were available. I then chose "Update All." Before any updates could begin, the message popped up that "This Apple ID cannot be used to make purchases from the iTunes Store." That popped up twice, then the same message with, "Please enter another Apple ID" added. I tried 3 separate times (getting all 3 pop-up messages each time). I then tried updating apps via the App store app on my iPhone 4 and it worked fine. Then I signed into the iTunes store on my computer and bought a song (thankfully one I like ) and that worked fine. I tried on my iPod one more time before finally coming here to post a question.
    A few minutes after posting my question (and the reason I came back here, not knowing I'd received an answer) I thought I'd try one more time. This time, it worked with no problem and all the apps updated. So I don't know if somehow my purchasing something in iTunes on my computer helped, or creating this community ID did, or if it was just some temporary glitch. Whatever it was, it's working now.  Hopefully it doesn't happen again.
    Thanks again!
    Message was edited by: Boomersmum

  • How can I retrieve the value of the POD in expression builder

    I need to be able to determine whether I am on my Production or Staging instance and present the correct weblink URL. This problem arises when Staging is systematically refreshed each month.

    If this issue is for the Action Links you have used in a Report. You could used the below option that does not include the POD name in the URL.
    On Demand will accept the POD of the Application you are navigating from:
    "http://"@[html]"<a target=_top href=/OnDemand/user/OpportunityDetail?OMTHD=OpportunityDetailNav&OMTGT=OpptyDetailForm&OpptyDetailForm.Id="@">View</a>"
    If the issue is for a Report you are trying to access through a Web Link or an Embedded Report
    Accessing a Report through a Web Link: You could consider passing the POD name through a Field that will be stored on the user Object or a another Record Type?
    Accessing a Report through a Embedded Web Applet: I'm not sure about this one but, what do you think about using Variables?
    Hope this information is useful
    Let me know!
    Royston

  • HT204053 hello i have tried to make a new apple id. because my daughter knew my old password and i wanted to change the email address.

    please can you help me delete my old apple id?
    [email protected]  i have forgot my password after trying to change it, after i found out my daughter had been using it.
    i have now set up a new one.

    You cannot delete an id.
    Why would you?
    All purchases made with that account will always be tied to that account.  Your computers will need to be authorized for this account and you will have to update any apps using that account.
    Just change your password and the email address associated with the account.
    You should not leave your account info here.  Apple is not here.  We are all itunes users just like you

  • My iphone calendar stopped syncing with outlook 7 thru the cloud. I clicked on tools, trust center, add ins. icloud add in had been disabled. I tried to re enable it but was told that this could only be done by administrator. I am the admin. Help????

    My iphone calendar stopped syncing with outlook 7 thru the cloud. I clicked on outlook tools, trust center, add ins. I noted that icloud add in had been disabled. I tried to re enable it but got a message that this change could only be done by administrator. I am the administrator. Help???? Any ideas?

    I do not believe this. I have been going nuts trying everything as in prior posts, and this has been a problem for users at least since 2010. I had this problem a long time ago and didn't pay too much attention to it because it was my iPad, and I depended on my BB a a base calander to feed Outlook. I became very concerned within the past week when I switched my BB to iPhone 5s, and was carrying both because I still needed to carry the BB for new calander enteries to sync up to Outlook 2007.
    I had followed http://support.apple.com/kb/HT1925 and delete the apple s/w and re-installed. But according to the previous post, it appears that the issue was in the data - which was not deleted during all these deinstalls nor overridden with the new installs.
    I am a XP user, so my files are in documents and settings/(username) both application data and \local settings\application data, but I also have safari and quicktime installed as well and didn't want to just blow entire high level folders if I didn't have to.
    So I followed http://support.apple.com/kb/HT1925 then purged several apple folders in my windows profile and this definitely blew apple computer\preferences away. What I did was a little clumbsy, and desperate, but it worked. I am finally back in business.
    However, I would like to see someone fine tune this and determine if it was just the preferences folder that needed to be deleted so that iTunes needed to rebuild it, or if there were other filoes that were apparently corrupted away, just to get this to the minimum number of steps to fix the issue.
    BUT THANKS - This has been the most HELPFUL thread to get me syncing agai!!!!

  • I am trying to generate an array of 30 random numbers. after every 5 readings a new vi should open and tell the user that 5 readings has been completed. and again carry on with the generation of array.

    since i do not have a transducer now, i am currently generating an array of 30 random numbers. after every 5 readings a warning should be given to the user that 5 readngs are complete. this cycle should repeat. the array size is 30.
    please help me out,  waiting for reply asap.
    once i have the transducer, i will be taking 30 analog samples and then after every 5 smaples that wraning will be displaye din a new VI
    Solved!
    Go to Solution.

    Use a while loop with a time delay representing your sampling period.
    Use the count terminal to check if equals 4, so 4th iteration=5th sample.
    Use a case structure. The true case will only be executed on the 4th iteration.
    In the true case place a subVI  with your desired message in the front panel. Go to the VI properties window and set "open front panel when called".
    The closing condition of the warnign is not giving in your description.
    Consider that rather than usign a subvi for this, you could use the "One/Two/Three button dialog" or "display message" vis at the "dialog and user interface" pallete.
    Please give it a try and send your own VI. Do not expect us to provide a working solution.
    Regards,

  • Why do I keep getting error message from Digital Editions when trying to open it. Keeps telling me that it has encountered a problem and needs to close. I need this apparently to download a text book fro Proquest - need the text book for Uni work what giv

    Why do I keep getting an error message from Digital Editions saying that it has encountered a problem and needs to close. I need this programme to download a text book from Proquest for University work what gives????

    You are using ADE on Windows or Mac ? and their versions ??
    Please restart your machine and try once again.
    Thanks

Maybe you are looking for