Solved

Advanced SNMP question

Posted on 2014-02-28
4
264 Views
Last Modified: 2014-03-03
Experts,

I know that you can reboot a router via snmp, is it possible to send a command via snmp to reboot a workstation?
0
Comment
Question by:ionmanage
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
bbao earned 167 total points
ID: 39896639
NO.

SNMP is used to monitor network-attached devices for conditions that warrant administrative attention, there is no device control command for SNMP.
0
 
LVL 26

Assisted Solution

by:skullnobrains
skullnobrains earned 167 total points
ID: 39897050
you need each machine to be configured to allow this.

basically
- create a mib in your snmpd software
- make it read-write
- have a script that checks its value periodically and issues a reboot command

some snmpd servers will let you directly trigger a script directly from within the server. it can even be triggered by reading a MIB instead of writing to it

it is actually trivial in perl's snmpd
this is a redhat doc but is applicable to anything that runs the same soft
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sect-System_Monitoring_Tools-Net-SNMP-Extending.html
0
 
LVL 38

Assisted Solution

by:Rich Rumble
Rich Rumble earned 166 total points
ID: 39897222
For windows it is possible, but not easy. It is better to use a remote command shell via power-shell, WMI or a program like PsShutDown, or even PsExec. You could set a trap for it to execute a command on a remote machine or using a script.

Here are some possible ways to access the WRITE portions of SNMP in windows
http://msdn.microsoft.com/en-us/library/aa393008%28v=vs.85%29.aspx
-rich
0
 
LVL 26

Expert Comment

by:skullnobrains
ID: 39897254
you can also do it in windows either with an snmp extension using the builtin snmpd
http://support.microsoft.com/kb/128729/en

or by installing perl's snmpd under windows (which actually used some of the dll's of windows's snmpd last time i checked)

... but if you have a domain, psshutdown is simpler

likewise most unices workstations can be shut down over ssh for example
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question