Re: Inactivity Shut-down on FC8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 22, 2009 at 9:06 AM, Bradley <pursley001@xxxxxxxxxxx> wrote:
> I would like to hear some ideas on how to set the computer to shut-down due
> to inactivity.  The feature to sleep the computer for inactivity doesn't
> work properly as my computer doesn't support a "sleep" feature.  It can only
> hibernate or shut down.  Any thoughts?
>
> Bradley

If you think this is a limitation of your software, then try with
Fedora10 or something newer.

However the following is just an idea: I wrote a bash script to do
exactly this.  Basically the script works like this:
I have a set of applications.  Once every minute I check if those
applications are running by awking or grepping something out of ps or
top or whatever.  If none are running I increment a counter, and sleep
for a minute.  Once this counter reaches 15 (ie. 15min) I execute a
shutdown.  If any are running, then I reset the counter to 0, sleep
for a min, and repeat.  (If the cpu load is higher than a threshold or
if certain lockfiles exist, I also reset the counter)

I did this on a 5 yr old Redhat8 computer, so the basics apply to any
linux.  I launch the script as root out of rc.local.  I'm pretty sure
the hibernate can be called via a command using pm-utils in newer
versions of Fedora.

-Mauriat

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux