Quantcast
Channel: Ivanti User Community : Document List - Power Management
Viewing all articles
Browse latest Browse all 68

How LANDesk Power Management Works

$
0
0

LANDesk clients that have the Power Policy Agent installed have several files in their LDCLIENT directory:

 

 

 

PWMCFG.EXE and PWMScript.ini

 

 

NOTE:LANDesk Power Management is an added feature that comes with LDMS 8.8 SP2.   However, simply installing the SP2 patch to clients does not add the Power Management Agent and pushing Power Policies to clients that do not have the Power Management Agent installed will result in an error message along the lines of "There was an error launching the task on the client".   In order to implement Power Management, you must push an Agent Configuration with the Power Management option checked in the Agents section.

 

 

 

When you create a power policy on the Core Server and then push that policy down to a client, several things take place.

 

 

 

A task is created in the local scheduler to run PWMCFG.EXE /SET.   Each hour the Local Scheduler runs PWMCFG /SET which evaluates the contents of PWMScript.ini and then does one of the following depending on Operating System to create and/or change power policy settings:

 

Windows 2000/XP/Server2003

 

The following registry keys are modified:

 

1.      CurrentPowerPolicy 

HKEY_USERS\[Windows User Security Identifier]\Control Panel\PowerCfg\

2.      Name, Description and Policies

HKEY_USERS\[Windows User Security Identifier]\Control Panel\PowerCfg\PowerPolicies\[Policy index]

3.      LastID

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg

4.      Policies

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\[Policy index]

5.     Policies

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\ProcessorPolicies\[Policy index]

(everything but Windows 2000)

 

Windows Vista/Server2008/7

 

Power Management functions are manipulated directly as detailed here:

http://msdn.microsoft.com/en-us/library/aa373163(VS.85).aspx

 

 

 

 

 

The contents of PWMScript.ini look something like this:

 

 

Sunday=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;

Monday=0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0,0:3:30,0;

Tuesday=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;

Wednesday=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;

Thursday=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;

Friday=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;

Saturday=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;

 

 

In the actual script it is all on one line, but I have moved each day to a seperate line for clarity.

 

 

My entry for Monday tells me that I have myComputerset toHibernateafter30minutes of inactivity every other hour.  (12am, 2 am, 4 am, etc)

 

 

Each slot between commas relates to an hour period during the day, starting with 12am and ending at 11pm.

 

 

If I had the following settings in a power scheme:

 

 

Hibernate | Computer | After 10 Mins | Plugged In | Mon | 8 am

Standby | Computer | After 5 mins | Plugged In | Mon | 8 am

Turn off | Computer | Hard | Mon | 9 am

Turn off | Computer | Soft | Mon | 10 am

Turn off | Monitor | After 1 min | Plugged In | Mon | 8 am

Turn off | Hard Disks | After 3 mins | Plugged In | Mon | 8 am

 

 

The resulting line in the PWM file for Monday (as I have set all the events for Monday) would look like this:

 

 

Monday=0,0,0,0,0,0,0,0,0:3:10@0:2:5@0:1:1@0:5: 3,4,6,0,0,0,0,0,0,0,0,0,0,0,0,0

 

 

Which says at 8amHibernate the Computerafter10minutes of activity and (@)Standby the Computerafter5Minutes of inactivity and (@)Turn off the Monitorafter1minute of inactivity, andTurn off the Hard Disksafter 3 minutes of inactivity.

 

 

So the following values specify the device and action:

 

 

1 - Monitor : Turn Off

2 - Computer : Standby

3 - Computer : Hibernate

4 - Computer : Hard Turn Off

5 - Hard Disks : Turn Off

6 - Computer : Soft Turn Off

 

 

 

These options use the POWERCFG.EXE standard Windows Utility to change the LANDesk PWM Scheme to reflect the current hours settings.  This is the real intrinsic value of the LANDesk Power Management feature to add Chronological Variability to the Power Schemes.

 

 

NOTE:This is set for the currently logged in user.   If you log off of the current user and in with another user, the power settings will not change for that user until the next allotted time hits and the local scheduler applies the LANDesk PWM Scheme.

 

 

 

At 9 am (the number 4) do a hard shutdown of the computer.

 

At 10 am do a soft (the number 6) shutdown of the computer.

 

 

 

If the PWMCFG utility sees the number 4 in the spot for the current hour it will spawn the LANDesk Shutdown Utility (poweroff.exe located in C:\Windows\System32) with a 30 second countdown with the option to cancel.  If the countdown expires, it shuts the computer off without closing any programs, etc.   This is a hard shutdown.

 

 

 

If the PWMCFG utility sees the number 6 in the spot for the current hour it will spawn the Windows utility "shutdown.exe".   This is the same as if you went to the Start Menu and chose "Shutdown".   If there are open programs it will prompt to save.   If there are other users logged into the computer it will warn that others users are logged in, etc.

 

To configure the shutdown delay see this document: How to Configure the Power Off Delay

 

For schemes that include a "Turn On" option, a separate task is created on the core server and a Wake On LAN Packet is sent to the computer at the designated time.   This is controlled purely on the Core Server side and there are no files or settings sent to the client.

 

 

 

 

Another Tip: In the Power Savings report, at times you may notice that it reports negative values.

 

 

 

The reason this may happen is that the current power settings for the computer(s) in the target query are gathered and stored in the Inventory.   We do not compare the Power Policy settings with an arbitrary number.   We compare the Power Policy settings you intend to push to the client to the current Power Policy in place on the computer.   If for example you set your Power Policy to simply turn off the Monitor and Hard Disks after X amount of minutes, but the existing policy in place on the computer (Windows policy or LANDesk policy, either way) puts the computer into Hibernate or Standby, that would save more power than the Monitor and Hard disks only.

 

 

 

The power policy settings are stored in the Inventory under "Power Management".   If you have an existing LANDesk Power policy you will see "Last Deployed Date" and "Last Deployed Policy".  Along with the current settings. If the system has never had a LANDesk Power Policy deployed, you will simply see the current policy settings.   In either instance you will see what the current settings are as follows:

 

 

 

System Hibernate AC

System Hibernate DC

System standby AC

System standby DC

Turn off hard disk AC

Turn off hard disk DC

Turn off Monitor AC

Turn off Monitor DC


Viewing all articles
Browse latest Browse all 68

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>