473,950 Members | 35,971 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Python to start SNMP service on remote XP hosts...

Hi,

I am very new to Python and really just began studying and using it.
I read that it was relatively easy to interact with Windows machines
with Python and I am desperately looking for something to replace
VBScript (not a big fan).

I am currently deploying a Gentoo Linux SNMP server running Cacti in
my network and would like my XP machines to report traps to this box.
The SNMP service is not running by default on the machines in the
network and instead of going to each one at a time, I thought I could
write a script.

Does anyone have any suggestions about how I go about accomplishing
this?

Thanks so much for any suggestions.

Mar 23 '07 #1
1 1900
On Mar 23, 2:51 pm, "KDawg44" <KDaw...@gmail. comwrote:
Hi,

I am very new to Python and really just began studying and using it.
I read that it was relatively easy to interact with Windows machines
with Python and I am desperately looking for something to replace
VBScript (not a big fan).

I am currently deploying a Gentoo Linux SNMP server running Cacti in
my network and would like my XP machines to report traps to this box.
The SNMP service is not running by default on the machines in the
network and instead of going to each one at a time, I thought I could
write a script.

Does anyone have any suggestions about how I go about accomplishing
this?

Thanks so much for any suggestions.
It looks like you can use Tim Golden's WMI module to do what you need.
See this other post for info:
http://www.thescripts.com/forum/thread541366.html

You'll have to find out the exact name of the service, loop through
and use an IF to test for it and when it is found, try starting it.

Mike

Mar 23 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5339
by: Kevin Ingram | last post by:
Is it possible to connect to devices and read SNMP data with ASP? I did a search and all I could find was utilities for sale to do it, wondered if it can be done using straight ASP. We are using InterDev 6, IIS5 on W2KServer. Thanks!
1
532
by: ZacBowling | last post by:
Does anyone have an idea of how to access the SNMP API or WMI SNMP provider in C#/.NET? I need to query a Ascend MAX's SNMP service with a custom MIB in .NET. I won't be modify anything on the MAX (even though a SET isn't anymore difficult then a GET or a WALK I don't think).
19
1837
by: Kevin | last post by:
I have been using java (jsp/servlets), vb/asp and perl for a few years. Almost all my projects are web site development related, and many of my clients' web sites are hosted on those shared web hosting services. The problem is that it's difficult to find hosting services with Python installed and supported. And most hosting companies are reluctant to install it for you because they don't want to do the extra work(they would always say to...
2
1991
by: diffuser78 | last post by:
I want to write a simple clinet/server program that does the following. On Windows, the program listens to the request from linux box On Linux Box, client program send server a shutdown request and the program at server i.e windows shuts windows sown, I basically want to remotely shut down windows from linux and write such a program in python.
8
23533
by: Challenge | last post by:
Hi, I got error, SQL1768N Unable to start HADR. Reason code = "7", when I tried to start hadr primary database. Here are the hadr configuration of my primary db: HADR database role = STANDARD HADR local host name (HADR_LOCAL_HOST) = testserver HADR local service name (HADR_LOCAL_SVC) = 56000 HADR remote host name (HADR_REMOTE_HOST) = testserver
3
9481
by: Billy Bob | last post by:
Hello In C# how can i start a remote process such as someapp.exe on a remote PC? I know the remote PC's name, but how do I start the app on that PC? Thanks ..
21
34502
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready equipped for uploading files via the CGI.pm module, which has long been a core module and allows users...
1
2088
by: idoha | last post by:
Hi, I am trying to determine the SNMP status on remote machine. I need to distinguish between two possible options, where the SNMP is not active: 1)When the SNMP listener is not active on a certain port (default is 161). This is caused when the SNMP service is off or when it listens to port other than 161. 2)When the communityString is incorrect. I have been trying to use NET::SNMP and send a get request. The problem is that it...
1
4210
by: Dirk Van de moortel | last post by:
{ OOPS, posted this to moderated group perl.cpan.discuss as well, so it can take a while to get through, if it gets through at all Otherwise sorry for duplicate posting } We need to set up a server 2003 (or a win XP system) to accept and act upon traps sent out from a storage system. Responding to various error conditions, this system can be fully configured to send traps.
0
10171
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9991
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11191
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7443
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6352
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3558
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.