RE: Power profile script

From: John Baldwin (jhb_at_FreeBSD.org)
Date: 12/15/03

  • Next message: Nate Lawson: "Re: Power profile script"
  • Next message: Bruce M Simpson: "Re: Power profile script"
    Date: Mon, 15 Dec 2003 16:26:46 -0500 (EST)
    To: Nate Lawson <nate@root.org>
    
    

    On 13-Dec-2003 Nate Lawson wrote:
    > I've implemented a script for changing power profiles in userland when you
    > go on or off AC power. The defaults will just change the CPU idle states
    > to the lowest power ones when off AC power. Throttling will stay at 100%.
    > Of course, the user can override these in rc.conf. In the future, other
    > power profile features will be maintained by the same script. You have to
    > be running devd to use this.
    >
    > The special values LOW and HIGH refer to the lowest and highest performing
    > settings for a given sysctl. So if a system has 8 throttling values, from
    > 1 to 8, HIGH would be 8 and LOW would be 1. You can also specify a
    > particular value ("2") if you know what you want.
    >
    > I'm mostly looking for style input on the /etc/power_profile script since
    > I'm not familiar with our scripting guidelines. Note that it's called
    > from devd (or manually by the user) and is not an rc.d boot-time thing.

    This looks really cool! I do think Mike's suggestions on moving this to
    /etc/rc.d/ and using functions from /etc/rc.subr might be a good thing
    to do.

    -- 
    John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
    "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Nate Lawson: "Re: Power profile script"
  • Next message: Bruce M Simpson: "Re: Power profile script"

    Relevant Pages

    • Re: Nut and RAID on FreeBSD 7.0
      ... >> single user mode and run a script that delayed for some time longer ... Plus a similar message for going to battery power. ... Executing upssched from the command line it tells me ... I set my NOTIFYCMD in upsmon.conf to a simple shell script I created to ...
      (freebsd-questions)
    • Re: Power Management GPO?
      ... I suspect that the power management subsystem might not be started when the startup scripts runs or the SYSTEM context can't modify it, but I have some ideas about this and will do some testing later on today to work it out. ... I created a GPO and put the batch file in first as a startup script and when that didn't work I tried it as a logon script. ... A normal user can't change the power settings so a logon script like this won't work either. ... I can't remember if all power setting are per machine, but if some are per machine and some are per user then you could split it up into 2 scripts, one startup script and one logon script. ...
      (microsoft.public.windows.group_policy)
    • Re: Log repair from a script
      ... it's easy to do this via diag. ... there are some power tests. ... >> could not find a way to get this from the commandline or script. ... > Hallo ljm, ...
      (comp.unix.aix)
    • Re: EvfMgr C: -commit followed by Power Down gives lost changes
      ... > a little utility on this PC is started from a remote computer. ... > a script and connects to an external WebServer to fetch the new software. ... > This might include running a script that modifies Registry, deletes files, ... ... They turn off the power. ...
      (microsoft.public.windowsxp.embedded)
    • Re: How am I doing?
      ... for power in powers: if: break print power ... That serves as a sort of documentation on the arguments to the script, and also makes it easier for other scripts to reuse the main logic of the program, since they don't have to package parameters up as a string array. ... Incidentally, at work my main programming platform is VisualStudio .Net, and I never import the children of namespaces so hopefully this practice I have will be carried over to Python. ...
      (comp.lang.python)