Run script just before powerdown after hibernate using pm-hibernate

Hi!
I want to run the apcupsd killpower command just before the CPU powers down after successful hibernate. What it will do, is kill power from the UPS, so that it does not keep the UPS on battery power even after the PC has been shut down. Is there a way to run it during hibernate? Also, it should be the LAST thing to be run before the powerdown event, cause it will instantly kill power from the UPS. Any ideas are welcome. Let me know if i'm not clear enough.
Thanks!

kalpik wrote:But if i run the command using 99, would that be the absolute final thing before the CPU shuts down?
No I think there's further stuff going on afterwards. At a minimum, pm-tools receives the exit code from that script and logs it. I think that then it tells the kernel actually to suspend.
If your UPS is your sole source of power, and there's no battery in the machine, then I don't think you can do what you want with a script in /etc/pm/sleep.d.

Similar Messages

  • System crashing after running a few applications/games after extended use

    So, I know that everyone is going to say that temperature might be an issue, but I believe it might be due to a defect/software error because my CPU/GPU is very well cooled, and this only started very recently... I have taken all measures to get a new case,
    more fans, clean out entire GPU and dusted everything very immaculately but it still seems to crash... I have no idea on how to see how/why my system crashed though.. there is no blue screen just a black screen.
    Can anyone help me?

    https://onedrive.live.com/redir?resid=ED07DBB027FFA77F!673&authkey=!AKclPJjsvZjTELA&ithint=file%2c.rar
    Here it is
    EM
    This one DMP is called a BCC124 and is hardware related.  Since it references AuthenticAMD I would run the CPU stress test first. 
    You also really need to update to SP-1 as there are many bug fixes in it.
    Stop 0x124 is a hardware error
    If you are overclocking try resetting your processor to standard settings and see
    if that helps.
    If you continue to get BSODs here are some more things you may want to consider.
    This is usually heat related, defective hardware, memory or even processor though
    it is"possible" that it is driver related (rare).
    Stop 0x124 - what it means and what to try
    Synopsis:
    A "stop 0x124" is fundamentally different to many other types of bluescreens because it stems from a hardware complaint.
    Stop 0x124 minidumps contain very little practical information, and it is therefore necessary to approach the problem as a case of hardware in an unknown state of distress.
     Generic "Stop 0x124" Troubleshooting Strategy:
    1) Ensure that none of the hardware components are overclocked. Hardware that is driven beyond its design specifications - by overclocking - can malfunction in unpredictable
    ways.
    2) Ensure that the machine is adequately cooled.
     If there is any doubt, open up the side of the PC case (be mindful of any relevant warranty conditions!) and point a mains fan squarely at the motherboard. That will rule out most (lack of) cooling issues.
    3) Update all hardware-related drivers: video, sound, RAID (if any), NIC... anything that interacts with a piece of hardware.
    It is good practice to run the latest drivers anyway.
    4) Update the motherboard BIOS according to the manufacturer's instructions and clear the CMOS.
    Their website should provide detailed instructions as to the brand and model-specific procedure.
    5) Rarely, bugs in the OS may cause "false positive" 0x124 events where the hardware wasn't complaining but Windows thought otherwise (because of the bug).
    At the time of writing, Windows 7 is not known to suffer from any such defects, but it is nevertheless important to always keep Windows itself updated.
    6) Attempt to (stress) test those hardware components which can be put through their paces artificially.
    The most obvious examples are the RAM and HDD(s).
    For the RAM, use the 3rd-party memtest86 utility to run many hours worth of testing. (6-8 passes to stress the ram out)
    For hard drives, check whether CHKDSK /R finds any problems on the drive(s), notably "bad sectors".
    Unreliable RAM, in particular, is deadly as far as software is concerned, and anything other than a 100% clear memory test result is cause for concern. Unfortunately, even a 100% clear result from the diagnostics utilities does not guarantee that the RAM is
    free from defects - only that none were encountered during the test passes.
    7) As the last of the non-invasive troubleshooting steps, perform a "vanilla" reinstallation of Windows: just the OS itself without any additional applications,
    games, utilities, updates, or new drivers - NOTHING AT ALL that is not sourced from the Windows 7 disc.
    Should that fail to mitigate the 0x124 problem, jump to the next steps.
    If you run the "vanilla" installation long enough to convince yourself that not a single 0x124 crash has occurred, start installing updates and applications slowly, always pausing between successive additions long enough to get a feel for whether
    the machine is still free from 0x124 crashes.
    Should the crashing resume, obviously the very last software addition(s) may be somehow linked to the root cause.
    If stop 0x124 errors persist despite the steps above, and the hardware is under warranty, consider returning it and requesting a replacement which does not suffer periodic MCE events.
    Be aware that attempting the subsequent hardware troubleshooting steps may, in some cases, void your warranty:
    8) Clean and carefully remove any dust from the inside of the machine.
    Reseat all connectors and memory modules.
    Use a can of compressed air to clean out the RAM DIMM sockets as much as possible.
    9) If all else fails, start removing items of hardware one-by-one in the hope that the culprit is something non-essential which can be removed.
    Obviously, this type of testing is a lot easier if you've got access to equivalent components in order to perform swaps.
    Should you find yourself in the situation of having performed all of the steps
    above without a resolution of the symptom, unfortunately the most likely reason is because the error message is literally correct - something is fundamentally wrong with the machine's hardware.
    More advanced reading can be found here from a MS MVP IT PRO
    http://captaindbg.com/bug-check-0x124-whea_uncorrectable_error-how-to-troubleshoot/
    Wanikiya and Dyami--Team Zigzag

  • Can one get a split image (Before and After) whilst using Color Board?

    The basic way of comparing the effect of a color correction appears to be to step out of the Color Board and switch the correction off and on.
    However, is there any way of displaying 2 screens (or a split screen) showing the original shot and the corrected one? (I seem to vaguely recollect having something like that in FCP 7, though it may not have been in conjunction with color correction  .  .  .  my memory!)

    You could also toggle the correction off and on with a keyboard shortcut Control-1 I think. Indeed how quickly we forget.

  • How to automatically run scripts before/after scheduled backup?

    Hi, I want to run some scripts (automatically) before and after a scheduled filesystem backup using oracle secure backup. is it posible?
    thanks in advance

    I've see it: using "after backup" and "before backup" in the dataset definition.
    forget this thread...

  • I lost the ability to use wifi after the 8.02 update.  Is there a way to fix this?  I've already tried resetting network.  Turned the phone off and on. Nothing is working and now I have to run on just data.

    I lost the ability to use wifi after the 8.02 update.  Is there a way to fix this?  I've already tried resetting network.  Turned the phone off and on. Nothing is working and now I have to run on just data.

        csdwarf,
    So sorry to hear about the trouble with Wi-Fi! Let's get that working the way it should. Could you provide us some more details regarding where this breakdown occurs? Are you having trouble with turning Wi-Fi on or connecting to your Wi-Fi? Are other devices connecting to your Wi-Fi without issue?
    BrianP_VZW
    Follow Us on Twitter @VZWSupport

  • Hi, Just switched from CS6 to PS CC. I am used to using ACR in CS6 with it's preview checkbox in the upper  right-hand corner. I do not see that checkbox in PS CC. I see that they have added side-by-side, right and left and top and bottom before and after

    Hi,
    Just switched from CS6 to PS CC. I am very comfortable using ACR in previous versions. I liked to use the preview checkbox located in the upper right-hand corner to see before and afters. That checkbox is no longer in my version of PS CC. I see that they have side-by-side, top and bottom and right and left before and after options in the lower right-hand corner in this version. Is there anyway to get that legacy preview checkbox back so that I can use it?

    Hi Warunicorn,
    Thank you very much. I just could not find it on my own. I will have more questions as I get into it.
    Jim

  • How to launch and run script against safari using selenium webdriver

    I am trying to launch and run my selenium webdriver script using safari but its launching safari but not running script. Its throwing belwo error message..
    org.openqa.selenium.remote.UnreachableBrowserException: Failed to connect to SafariDriver after 50052 ms
    Build info: version: '2.33.0', revision: '4e90c97', time: '2013-05-22 15:33:32'
    System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_25'
    Driver info: driver.version: SafariDriver
        at org.openqa.selenium.safari.SafariDriverCommandExecutor.start(SafariDriverComman dExecutor.java:113)
        at org.openqa.selenium.safari.SafariDriver.startClient(SafariDriver.java:112)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
        at org.openqa.selenium.safari.SafariDriver.<init>(SafariDriver.java:83)
        at org.openqa.selenium.safari.SafariDriver.<init>(SafariDriver.java:73)
        at LinkText.setUp(LinkText.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.jav a:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java :12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java: 44)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:7 0)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:5 0)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRefere nce.java:50)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunne r.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunne r.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.jav a:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.ja va:197)

    Hey Reese
    You bailed me out, dude! Apparently, my difficulties stemmed from me trying to directly edit /var/cron/tabs/root with pico. Never seemed to bother the other stuff, but it did this time. I am totally inept with vi, the default editor for crontab -e, which is why I had cheated before, and directly edited the /var/cron/tabs/root, el.al., so I had to find out how to
    export EDITOR='pico'
    in my .bashrc
    After having done that, no problem, except for a latent programming logic bug that has reared its ugly head (my script is doing some date manipulation with today's and yesterday's date, and my script crashed and burned on the month change and with stuff related to single-digit date sequence numbers <10).
    But, hey, I learned how to reset my default editor, so as to make life easier for me when it comes time to dorking with crontab files, and I learned that when the crontab file says "DO NOT EDIT THIS FILE - edit the master and reinstall," it means it!
    Thanx for the troubleshooting hint.

  • TS1441 when i pluged my ipod classic 5g to PC then it shows "iTunes has detected an iPod in recovery mode. you must restore this iPod before it can be used with iTunes"?then after restoring the PIOD when IPod restarted then Itunes again detect the same ER

    when i pluged my ipod classic 5g to PC then it shows “iTunes has detected an iPod in recovery mode. you must restore this iPod before it can be used with iTunes”?then after restoring the PIOD when IPod restarted then Itunes again detect the same ERROR.

    If you are using XP, and you went through the procedure at the bottom of the previously linked document to change the iPod's assigned drive letter, and you also tried putting it into Disk Mode... 
    If you have not already, try shutting down your computer and disconnecting all USB devices, including hub.  Start up with only standard keyboard and mouse connected.  Just to be safe, put the iPod into Disk Mode again
    http://support.apple.com/kb/HT1363
    Run iTunes.  Connect iPod to a direct USB port on computer.  iTunes may prompt you about "recovery" and ask you to do a Restore.  Try to do a Restore again.

  • TS1368 HELP!!! After upgrading to IOS 6.13 my IPAD Stucks in a plug-in screen and the Itunes. When i Try to connect to iTUNES pop-up message apear "iTunes has detected an iPad in recovery mode.. You must restore this iPad before it can be used with iTunes

    I have windows 8 enterprise OS and iTunes ver. 10.5.0.142. I was upgrading my iPad to IOS 6.1.3. After finishing the upgrade my iPad Reboot and currently stucked-up in a plug-in screen and iTunes Logo. When I try to connect it to the iTunes pop-up message appear saying " iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes." In short, I push the restore button then another pop-up message appear saying " The iPad software update server could not be contacted. Make sure your network settings are correct and your network connection is active, or try again later." I tried many ways but still no luck. I repeatedly reboot the iPad and open the iTunes still the same problem. I try also to uninstall the iTunes and installed the lower version but still the same problem, I even check the firewall if the ITunes was block or My privileges is administrator to run the iTunes or even reset my winsock but the problem still remain. PLEASE HELP! Thank you in advance!!!

    Turn off your firewall and antivirus software.

  • How to use Time Machine before and after installing a new hard drive

    So basically I'm buying a new hard drive for my Macbook pro and I have a lot of files on my computer that I would like to save. I have never used Time Machine before so I need help on how to set it up before AND after installing the harddrive so my files get transferred onto the new hard drive. Thanks in advance

    wjosten wrote:
    Me, I would never use Time Machine to do this. What I'd suggest you do is get an exterior enclosure for your new drive. Then use either Carbon Copy Cloner or SuperDuper to clone your existing drive to your new drive. Once done, verify your clone is bootable & all of your data present. Then swap drives & use your old drive for Time Machine backups(after erasing it). Then get another drive & exterior enclosure to regularly clone your new drive to.
    Unless he was swapping for a lower capacity HDD or to a lower capacity SSD, then the old drive would make a lousy Time Machine disk.  However, whenever I swap out a disk I do exactly what you do.  CCC to get the ol drive onto a new one.  Test by starting up to the new (but still external drive).  Then replace the internal drive.
    I usually just sell the old drive on eBay.  My Time Machine backup is always 2X the size of the internal drive, which I believe is a bit above recommendations, but works for me.  The price of large external drives is almost the same as smaller internal ones.

  • How to create a loop to run total of records for before and after unconstant date

    Post Author: Ann2
    CA Forum: Formula
    Here is the data sample:
    ID period code date
    1  00  I    01/01/1999
    1 00   Z   01/02/1999
    1 00  G   12/05/1999
    1 00  M   01/01/2000
    There are many students with many periods and many codes. I need to save a date when code = 'G' and count separateley records per student/period 2 times - before and equal that date and after that date, so in the end for period 00 I will have 2 values: 3 (before) and 1(after).
    There are periods from 00 to 08. I am counting students abscencies before and after warning letter was sent (code G).
    The result data should look : 00 01 02 03 04 05 06  07  08              00 01 02 03 04 05 06  07  08     Total
                                                3  0   0   0   0   0   0   0   0                 1 0    0   0   0   0   0   0   0        4
    Please help me.
    Thank you.
    Ann2

    Post Author: Ann2
    CA Forum: Formula
    Thank you for your answer, but I do care about the date the 'G' happened, because I need to reset count.
    The logic behind is this:if a student absent for more than 8 times per period - the letter will be sent out to the parents , that will be code 'G' with period '-1' (it may happen that there will never be code 'G' , but I need to track all absencies). Once the letter is sent, the count starts over (the count starts over the next day after code 'G'). The absencies which happened before or the date the letter sent should count toward 'previous'  abscenices, all other - absenices after the letter.
    So basically I need total per period and total per period before or the day with code 'G'.  Running total with reset with formula code = 'G' does not work.
    I created a formula field which has global date (when code 'G' happenned) and it says if globaldate >= periodDate then date (1900,01,01) else (2100,01,01) and that formula is ok, but I can not use it in running total or can not create group on it and insert total.
    Please help me with this. Thank you.
    Ann2

  • I have created PDF from hardcopy by using my scanner. After I run OCR option for my PDF by using Acrobat Pro 9. But "Text-to-speech" functionality of the PDF says that an error message comes up that says the page is empty when I turns on the read out loud

    I have created PDF from hardcopy by using my scanner. After I run OCR option for my PDF by using Acrobat Pro 9. But "Text-to-speech" functionality of the PDF says that an error message comes up that says the page is empty when I turns on the read out loud option in Acrobat. Kindly help me to sortout this problems?

    So I tried generating the same PDFs on two other computers that have Acrobat 9 Pro.  Results were reproduced.  The verdict is:
    - complex PDF files (that is, containing cross-references, tables of contents, and bookmarks) generated by Acrobat 9.x Pro are roughly 2-5x larger than the identical file generated with Acrobat 8.x Pro.
    - different PDF conversion settings make a negligable difference (less than 10% rather than 70-80%).
    - using the "Reduce File Size" or "Optimize PDF" option cuts the file size roughly in half, almost always resulting in a "image downsampling mask" warning message, which requires acknowledgement (that is a problem for batch processing or automation).
    - adding an Acrobat watermark to the file cuts the file size roughly in half.
    - just using Save As to another filename has no effect on file size.
    - generating the PDF in Acrobat 9 with links but no PDF bookmarks still results in the inflated file size.
    - generating the PDF in Acrobat 9 without any links or bookmarks results in approximately the same file size as the Acrobat 8 PDF with full links and bookmarks.
    It appears that Acrobat 9's manner of adding links is what's bloating  the files, and in my case it's probably not related to images or image resolution/print quality.  It's a shame, because Acrobat 9 seems to have made some  improvements to the Review Tracker interface, and a few other bells and  whistles which I haven't really gotten around to exporing yet.  But  unless I find a way to keep my links and the PDF file sizes comparable to what I was  getting with Acrobat 8 Pro, it looks like I'm going to stay with Acrobat 8.

  • Flex iPad Application : Run code before application enters background  Application Type: Flex Mobile Application Target Platform: iPad AIR Version: 4.0 Development Environment: Flash builder 4.6  I want to run some code just before iphone application goes

    Application Type: Flex Mobile Application
    Target Platform: iPad
    AIR Version: 4.0
    Development Environment: Flash builder 4.6
    I want to run some code just before iphone application goes into background. I need function similar to didEnterBackground
    of native xcode app
    (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegat e_Protocol/Reference/Reference.h
    tml#//apple_ref/occ/intfm/UIApplicationDelegate/applicationDidEnterBackground:)
    I tried using devactivated function of flash.display.STAGE.
    I used following addEventListener:
    STAGE = this.parent.stage;
    STAGE.addEventListener(Event.DEACTIVATE, onAppDeactivated);
    It worked for me but only when device is connected to development environment in debug mode. When I create my release build
    it is not working.
    So how can I make sure that my code runs before application goes into background.

    Even I am facing almost same issue
    Problem installing Adhoc version to iPhone and iPad - Development Environment Is - Adobe Flash CS6

  • Cannot prevent ExtendScript debugging while running scripts from After Effects

    Hi,
    I am facing this issue while running scripts from within After Effects. Whenever I am trying to run a script in After Effects, the script opens up in ESTK in the debug mode. The execution waits at the starting point of the script as if there is breakpoint even though there is none. I am not sure whether what I am missing, whether some debug flag needs to be reset etc. I am using After Effects CC on Windows 7 OS. Any help would be highly appreciated.
    Thanks.

    I tried running the script after removing all $.writeln() statements, but unfortunately that does not resolve the problem. For testing the issue, I am trying with the simple script given below :
    var window = new Window ("palette", "My Window", undefined);
    var panel = window.add("panel", undefined, "Panel");
    var text = panel.add("statictext", undefined, "Testing AE");
    window.show();
    But executing even this one from AE opens up ESTK. I am absolutely stuck with this odd behaviour .

  • Using domain templates (where's the run scripts step?)

    Hello,
    I'm using 9.2.1 for ALSB.
    I have manually created an ALSBdomain. I want to create a similar domain on a different server, every setting is the same except the username for the datasource.
    I used config_builder.sh to create a jar template from the first ALSB domain. I then copied the jar to the other server and used it with the domain creation wizard. (config.sh) Everything behaved exactly the way I expected. All the settings were the same, and I only had to change the username for the datasource.
    However, there is one problem, the runscripts phase is missing. I even went and found the scripts "reporting_runtime_drop.sql" and "reporting_runtime.sql" and added them during template creation. Interestingly enough they did not show up in any run scripts phase.
    Also, I took a look at the jar contents and the sql files I added in the add sql phase were not contained in the jar.
    Am I looking at this the wrong way? Is there any way to associate the sql I want to run in a template after the datasources are configured? or is this a limitation of templates, and I must manually log into the database and set things up?
    M@

    Q005, I am not certain that I fully understand your question.  However, here is the "Motherboard Specifications" page for the computer.  At the bottom of the page is a Motherboard layout.  It shows the connectors at the rear of the case.  You will use # 4-LAN to connect your computer by wire to the router.  I have had several computers connected in this way.
    Please click "Accept as Solution" if your problem is solved.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

Maybe you are looking for

  • Vendor email address in IDOC

    We are trying to create a vendor payment file to be sent to our bank in IDOC format.   The IDOC type we are using is PEXR2002.   We are not able to populate the vendor email address (from vendor master data - SMTP_ADDR) into IDOC segment E1EDKA1 even

  • Library Corrupted -- Restore form Backup Loop

    Greetings: I recently upgraded to iPhoto 9.1.1 and now am in the following problem loop: - When I first started iPhoto 9.1.1 I got the message that my iphoto library was corrupted and that I shoudl restore from backup. - Restored from time machine ba

  • Adding a Rev B to an AirPort network

    Ok, I have an AirPort network set up at my house that uses an AirPort Extreme (g) Base Station (AEBS) to connect to the internet. I can use that connection by using wifi connections from my iMac G4 (10.3.9), iMac G5 (10.4.10), PowerBook (10.4.10), an

  • Build and Capture

    I am deploying Windows 7( 64 bit) Via SCCM 2012. It was working fine but last weekend as i wanted to update our image, tried todo a build and capture its failing at "Prepare ConfigMgr Client. The client cache is currently in use by a running program

  • Some footage exports jittery from Premiere CS5

    This is an issue I'm getting rather inconsistently. I will export series of videos and there are times that just one of them the footage just goes nuts on. I can't really find a rhyme or reason, as I export them all with the same settings in a series