9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello everyone, I am new to this forum and probably 'unix for dummies' or maybe unix hardware for dummies is a good place to post my question.
I'm the I S manager for a small county, just myself and one good tech. We recently had two SunFire T2000 boxes donated to us. We both have a little... (1 Reply)
Discussion started by: starrouter
1 Replies
2. Shell Programming and Scripting
Hello All,
I am new to scripting and I am trying to write a script which can scp a file from one box to multiple boxes.
I am thinking to do like this.
1) create a file with list of all server names
2)write a script which will pick up each server line by line from server list and copy it to... (1 Reply)
Discussion started by: sintilash
1 Replies
3. Shell Programming and Scripting
I have requirement to login into a multiple linux boxes by running the shell script in a single linux box and to find the count of files in a specific folder in each box and log them in a log file in the box where i m runnning the script. Box names will be stored in a text file host.txt.
Please... (2 Replies)
Discussion started by: Mani2512
2 Replies
4. UNIX for Dummies Questions & Answers
Hi Folks,
I am supposed to start off with a new project which is OSE operating system based. I am not having any documentation or material which can provide in-site information on this OS. But happen to hear from my team that it is based on primitive unix. Could some one help me out? Any... (1 Reply)
Discussion started by: serpens
1 Replies
5. Filesystems, Disks and Memory
Hi,
I was trying to port efs_mount(OSE system call) to a LInux.The efs_mount function is used to mount a volume on the indicated device dev.Upon successful completion of this OSE sytem call a volume manager (VM) will be available through which files on this volume are accessed. The Syntax for... (4 Replies)
Discussion started by: roshantraj30
4 Replies
6. Shell Programming and Scripting
I have a script that will ssh to several different servers, perform a command, display the output, and exit. It works well, but I have to enter my password for each server. That gets a little cumbersome when you have a couple dozen servers. Anyone out there know how to automate this so that I only... (2 Replies)
Discussion started by: fedexer
2 Replies
7. Shell Programming and Scripting
Hello I'm serving on a ship that has frequent power issues. Currently if we loose power we need to rush around to multiple UNIX machines and login to Sysadmin and power down each machine before we loose our ups. If sysadmin is asleep or not in the space we have some real problems. I would like to... (2 Replies)
Discussion started by: blackfam972
2 Replies
8. UNIX for Dummies Questions & Answers
I have a script that generates an output file after pulling data from a local DB on one of my boxes. There are other nearly-identical boxes on the network, each with their own local DB, and I'd like to run the script there too. Copying the script to each box and then running them individually... (11 Replies)
Discussion started by: bschnair
11 Replies
9. Programming
Hi !
Please tell me how to get radio buttons, text boxes , check boxes , option buttons , pull down menus in C++ on Unix.
I think it would be done using curses.h ..but that's all i know.
TIA,
Devyani. (3 Replies)
Discussion started by: devy8
3 Replies
SLEEPD(8) System Manager's Manual SLEEPD(8)
NAME
sleepd - puts a laptop to sleep during inactivity or on low battery
SYNOPSIS
sleepd [-s command] [-d command] [-u n] [-U n] [-I] [-i n] [-E] [-e filename] [-a] [-l n] [-w] [-n] [-v] [-c n] [-b n] [-A] [-H] [-N
[device] [-r n] [-t n]]
DESCRIPTION
sleepd is a daemon to force laptops to go to sleep after some period of inactivity. This is useful if your laptop does not automatically go
to sleep when you aren't using it, and, like me, you often forget to shut it off. It is also capable of suspending a laptop when its bat-
tery gets very low.
sleepd can detect activity in several ways. The default is to poll both event devices and interrupts to detect when your laptop is in use
due to keyboard or mouse activity. It defaults to polling /dev/input/event*. You may specify a list of device files to poll instead, or
use options to enable other means of checking for activity (network activity, utmp, or load average). After a configurable amount of time
with no activity, sleepd runs a program to put the laptop to sleep.
OPTIONS
-h, --help
Show summary of options.
-n, --nodaemon
Don't fork to background; run in forground.
-v, --verbose
Output status messages.
-u, --unused
Number of seconds the laptop can remain idle before being put to sleep. Defaults to 600 seconds (10 minutes). Set to 0 to disable
any sleeping due to idleness.
-U, --ac-unused
If set, controls the number of seconds the laptop can remain idle before being put to sleep when running on AC power. If not set,
the laptop will not sleep when it's on AC power.
-e, --event
Adds an event file to the list that is watched. Using this switch disables polling all files in /dev/input/event*.
-E, --no-events
This switch disables event device polling.
-l, --load
If set, a load average higher than this number will prevent the computer from sleeping If not set, the computer will ignore the load
average.
-w If set, sleepd will also check idletime based on utmp. This will prevent the system from sleeping while remote connections are
active. It uses the time limit from -u.
-i, --irq
Adds an irq to the list that is watched. Using this switch disables automatic detection of keyboard and mouse irqs unless -a is
specified as well.
-I, --no-irq
This switch disables interrupt polling.
-a, --auto
Automatically detect and watch mouse and keyboard irqs.
-s, --sleep-command
Command to run to put the laptop to sleep. Defaults to "apm -s" for systems with APM and "pm-suspend" for systems with ACPI.
-b, --battery
If this option is specified, the daemon will put the laptop to sleep if the percentage of battery charge drops below the specified
number and the system is off AC power. This is useful for some laptops which don't handle this themselves. It supports using APM,
ACPI, and HAL for querying battery status.
-d, --hibernate-command
A command to run instead of the regular sleep command when the battery is low. This can be useful if you want to make the system go
to sleep when it's not active, but suspend to disk if the battery is low. If not set, the sleep command is used.
-N, --netdev
Monitor a network interface for activity based on packet count. eth0 is the default. This option may be used more than once with
different network interfaces.
-t, --tx-min
Set a baseline transmit raffic rate in packets per second for network monitoring. Requires -N.
-r, --rx-min
Set a baseline receive traffic rate in packets per second for network monitoring. Requires -N.
-A, --and
Only go to sleep if all specified conditions are met. For example, only sleep if idle and if the battery is low.
-c, --check-period
Number of seconds between check on system status. Defaults to 10 seconds, which should be fine generally.
-H, --force-hal
Force HAL to be used instead of ACPI or other methods to query battery status.
SEE ALSO
sleepctl(1)
http://kitenet.net/~joey/code/sleepd/
BUGS
Interrupt monitoring cannot always detect keyboard and mouse. If the keyboard or mouse interrupt is shared (as is common with usb
devices), other devices on the same interrupt can keep the system awake. Use event device polling instead.
AUTHOR
Joey Hess <joey@kitenet.net>
SLEEPD(8)