10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Could someone do the following bash ubuntu script for me? I have 5 screen processes of bot:
SCREEN -dmS Xbot_instance_1 php core.php -i 1
SCREEN -dmS Xbot_instance_2 php core.php -i 2
SCREEN -dmS Xbot_instance_3 php core.php -i 3
SCREEN -dmS Xbot_instance_4 php core.php -i 4
... (2 Replies)
Discussion started by: kotch
2 Replies
2. Shell Programming and Scripting
I have a script on a Linux box which scp the files to windows server without any issues. but there are time frames where the windows server will not be available due to maintenance. hence I need to check if the remote location is available before running the scp command.
scp... (3 Replies)
Discussion started by: gpk_newbie
3 Replies
3. Shell Programming and Scripting
Hi,
Is there any specific command to use to check only say Running jobs via autorep or similar command for Autosys? (0 Replies)
Discussion started by: sidnow
0 Replies
4. Shell Programming and Scripting
Happy New Year
Is there a quick way to check to see if a script is already running.
I want to put in a check in the script to exit, if already running.
Currerntly i can only think of doing it the following way.
# ps -ef | grep -i 3_HOUSEKEEPING_FFTVTL_TO_FFTDSSU_DUPLICATION.ksh |... (5 Replies)
Discussion started by: Junes
5 Replies
5. Shell Programming and Scripting
Hi,
I had search the web for a script to download email, but failed to found one.
I need a bash or perl script that will check for email originating from an address such as john@rambo.com and download the .zip attachment into a specified folder.
Anyone could assist or give me some... (1 Reply)
Discussion started by: mynullvoid
1 Replies
6. Shell Programming and Scripting
How to check what cron is scheduled to run? I don't want to modify anything. Thanks (1 Reply)
Discussion started by: stevensw
1 Replies
7. UNIX for Dummies Questions & Answers
Hi
What is the best command to check if a particular process is running in a linux server or not
To check any java process, I use the below command.
ps -ef |grep jvm
When I execute the above command, it lists me all the processess . The above command should ideally return only the... (6 Replies)
Discussion started by: vr3w3c9
6 Replies
8. UNIX and Linux Applications
Hi
I would like to check if an instance of a script is already running.
I've seen many different examples, but I haven't the slightest idea as to how to do this.
Can you please help.
Thank you. (5 Replies)
Discussion started by: ladyAnne
5 Replies
9. Shell Programming and Scripting
Hi ,
I have a csh code below which check the process if it's running.
Can any expert advise me on the following:
1) what does this notationmean ">!" and how is it different from the append ">" notation ?
2) how does "setenv" work in this code ?
# Check whether there is a running... (3 Replies)
Discussion started by: Raynon
3 Replies
10. UNIX for Dummies Questions & Answers
Does anyone know if there is a UNIX-tool available that constantly will check if (some specific) deamons are running and will notify (via email) if one has failed/stopped?
I searched the web, but so far didn't find anything. (3 Replies)
Discussion started by: W2W
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)