03-24-2009
Of course. The sleep was in there for demonstration purpose only, since such a short script would finish before the next would be started. In order to demonstrate parallel execution properly, I had to delay them a bit.
10 More Discussions You Might Find Interesting
1. Programming
anybody knows how to view loaded shared libraries by running processes in linux enviornment? any command or tool ?
thanks a lot (3 Replies)
Discussion started by: princelinux
3 Replies
2. UNIX for Advanced & Expert Users
Can we run a script in nohup which calls another script in nohup.
eg
Script1.sh
#Script1 start
nohup script2.sh
.
.
.
#end script1.sh
Now can I do this
nohup script1.sh
Also is all scheduled processes (crontab entries) will run as nohup?
Would appreciate if any one can... (3 Replies)
Discussion started by: yakyaj
3 Replies
3. Shell Programming and Scripting
I have a script that runs continuously and will deliver a file to multiple servers via scp. On occasions one of the scp's will hang and as a result not complete in sending the remaining files and not loop around again.
If I run the scp commands with a & they'll complete, but I want to make sure... (2 Replies)
Discussion started by: nhatch
2 Replies
4. Shell Programming and Scripting
I'm doing a script with the Shell. I need that it only show the number of running processes.
Ex:
echo "There are `command` running processes"
Thnx!
Pd: Sorry the idiom. I'm spanish. (2 Replies)
Discussion started by: Ikebana
2 Replies
5. UNIX for Dummies Questions & Answers
HI All ,
Pardon me for asking some very basic questions,
I would be grateful if someone can help.
I am trying to execute a shell script which runs multiple processes in background. It includes various operations like copying , DB operations etc etc.
Now problem is that the complete script... (6 Replies)
Discussion started by: gpta_varun
6 Replies
6. Shell Programming and Scripting
Hi can anybody help me regarding this..
i want know the output of ps -ef with explanation.
how can we know the running processess.
this is the output of ps -elf
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
19 T root 0 0 0 0 SY ... (1 Reply)
Discussion started by: rajesh_pola
1 Replies
7. Solaris
Hi guys just a question is it normal to see running process on a non-global zone in the global zone... processes such as cron. (3 Replies)
Discussion started by: batas
3 Replies
8. Shell Programming and Scripting
Hi,
I am trying to write a script to run a command on multiple linux based servers and get the o/p. I am using ssh to login. It is a celerra box and EMC NAS product.
I am able login but i am not able to run nas command nas_pool -size -all the NAS server. I am getting the following error. ... (2 Replies)
Discussion started by: jpkumar10
2 Replies
9. Linux
Hi guys is it normal to have 5-10 cron/syslog processes running... in my case i got 10 cron process running. (4 Replies)
Discussion started by: batas
4 Replies
10. Shell Programming and Scripting
so i've been using this a lot in a lot of my scripts:
( columnA & columnAPID=$! & columnB & columnBPID=$! & columnC & columnCPID=$! &) &
wait ${columnAPID}
wait ${columnBPID}
wait ${columnCPID}
It seems to work as ive seen it dramatically reduce run time of my scripts.
however, i'm... (5 Replies)
Discussion started by: SkySmart
5 Replies
LEARN ABOUT MOJAVE
systemd-suspend.service
SYSTEMD-SUSPEND.SERVICE(8) systemd-suspend.service SYSTEMD-SUSPEND.SERVICE(8)
NAME
systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-suspend-then-hibernate.service, systemd-sleep -
System sleep state logic
SYNOPSIS
systemd-suspend.service
systemd-hibernate.service
systemd-hybrid-sleep.service
systemd-suspend-then-hibernate.service
/lib/systemd/system-sleep
DESCRIPTION
systemd-suspend.service is a system service that is pulled in by suspend.target and is responsible for the actual system suspend.
Similarly, systemd-hibernate.service is pulled in by hibernate.target to execute the actual hibernation. Finally,
systemd-hybrid-sleep.service is pulled in by hybrid-sleep.target to execute hybrid hibernation with system suspend and pulled in by
suspend-then-hibernate.target to execute system suspend with a timeout that will activate hibernate later.
Immediately before entering system suspend and/or hibernation systemd-suspend.service (and the other mentioned units, respectively) will
run all executables in /lib/systemd/system-sleep/ and pass two arguments to them. The first argument will be "pre", the second either
"suspend", "hibernate", "hybrid-sleep", or "suspend-then-hibernate" depending on the chosen action. Immediately after leaving system
suspend and/or hibernation the same executables are run, but the first argument is now "post". All executables in this directory are
executed in parallel, and execution of the action is not continued until all executables have finished.
Note that scripts or binaries dropped in /lib/systemd/system-sleep/ are intended for local use only and should be considered hacks. If
applications want to react to system suspend/hibernation and resume, they should rather use the Inhibitor interface[1].
Note that systemd-suspend.service, systemd-hibernate.service, and systemd-hybrid-sleep.service systemd-suspend-then-hibernate.service
should never be executed directly. Instead, trigger system sleep states with a command such as "systemctl suspend" or similar.
Internally, this service will echo a string like "mem" into /sys/power/state, to trigger the actual system suspend. What exactly is written
where can be configured in the "[Sleep]" section of /etc/systemd/sleep.conf or a sleep.conf.d file. See systemd-sleep.conf(5).
OPTIONS
systemd-sleep understands the following commands:
-h, --help
Print a short help text and exit.
--version
Print a short version string and exit.
suspend, hibernate, hybrid-sleep, suspend-then-hibernate
Suspend, hibernate, suspend then hibernate, or put the system to hybrid sleep.
SEE ALSO
systemd-sleep.conf(5), systemd(1), systemctl(1), systemd.special(7), systemd-halt.service(8)
NOTES
1. Inhibitor interface
https://www.freedesktop.org/wiki/Software/systemd/inhibit
systemd 237 SYSTEMD-SUSPEND.SERVICE(8)