02-26-2008
The process starts at bootup, how can I select the process for restart? I want to avoid restarting the whole server.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all.
I do have a script "startApp.sh" (app result is a file /opt/extract/appextract.txt)
I have no problems with stopping app
var1=`ps -ef | grep -v grep | grep MyApp | awk '{print $2}'`
kill -9 $var1
What I want to achieve is:
I start app, app is doing some extraction, after... (11 Replies)
Discussion started by: e-l-diablo
11 Replies
2. Web Development
Hi, I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die.
How can I start them in a way that they are not killed when I restart/stop apache ?
$cmdstr = "nohup ".$config."/".$config."... (6 Replies)
Discussion started by: valiadi
6 Replies
3. Shell Programming and Scripting
I have posted this on the Web subforum but it seems that nobody knows to do this, maybe someone has a solution here. Thank you
I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die.
How can I start them... (1 Reply)
Discussion started by: valiadi
1 Replies
4. Shell Programming and Scripting
I have written a script which checks for a file if that is being updated or not. If the files is not being updated then it will restart the process.
#!/bin/sh
DATE=`date +%Y%m%d%H%M%S`
LOG_FILE=/var/xmp/log/XMP_*
INCEPT=`ls -l $LOG_FILE |awk '{print $5}'`
PROC=`xms show pr |grep -i... (3 Replies)
Discussion started by: Siddheshk
3 Replies
5. Emergency UNIX and Linux Support
Hi all
I have networker running on a RHEL 5.7 and over time it hangs. So the solution backup team proposed is to check if the process is hung, to stop and start it.
Unfortunately for me, the rc script only allows three commands, start, stop and status (no restart option) so I managed to set... (15 Replies)
Discussion started by: hedkandi
15 Replies
6. Shell Programming and Scripting
HI,
I am trying to write a scrip which would restart active process. This is what i have written till now.
$ xms show pr PRESE.*
NAME STATUS ROLE PID RSTRTS STARTED MACHINE... (8 Replies)
Discussion started by: Siddheshk
8 Replies
7. Shell Programming and Scripting
Hi all,
Tearing my hair out..!
I have a requirement to monitor and restart a unix process via a simple watchdog script.
I have the following 3 scripts that dont work for me..
script 1 (only produces 1 output if process is up or not)... (4 Replies)
Discussion started by: jonnyd
4 Replies
8. Shell Programming and Scripting
Hi Guru's,
I just want to have an idea on how to restart a particular step when it fails?
SCENARIO
we have plenty of steps such as the following below:
Step 1
copy file from source to target location which is in a different server.
Step 2
create initial and incremental process
... (4 Replies)
Discussion started by: reignangel2003
4 Replies
9. Linux
#!/bin/bash
#This shell finds the pid of the hawkagent and kills and restarts to put the rulebase into effect
output=`ps aux|grep hawkagent`
#The set -- below helps to parse the above ps output into words and $2 gives the 2nd word which is pid
set -- $output
pid=$2
#Checks if pid of hawkagent... (12 Replies)
Discussion started by: samrat dutta
12 Replies
10. Red Hat
This issue could happen to any other service but in this case its commssioning Postfix - it seems i can't stop postfix as the PID relates to another service - i've delete the 'master.lock' but to no available - any ideas, memeory commands etc ?
thanks in advance
ps. the serve is in Production so... (2 Replies)
Discussion started by: stevie_velvet
2 Replies
LEARN ABOUT MINIX
restart_syscall
RESTART_SYSCALL(2) Linux Programmer's Manual RESTART_SYSCALL(2)
NAME
restart_syscall - restart a system call after interruption by a stop signal
SYNOPSIS
int restart_syscall(void);
Note: There is no glibc wrapper for this system call; see NOTES.
DESCRIPTION
The restart_syscall() system call is used to restart certain system calls after a process that was stopped by a signal (e.g., SIGSTOP or
SIGTSTP) is later resumed after receiving a SIGCONT signal. This system call is designed only for internal use by the kernel.
restart_syscall() is used for restarting only those system calls that, when restarted, should adjust their time-related parameters--namely
poll(2) (since Linux 2.6.24), nanosleep(2) (since Linux 2.6), clock_nanosleep(2) (since Linux 2.6), and futex(2), when employed with the
FUTEX_WAIT (since Linux 2.6.22) and FUTEX_WAIT_BITSET (since Linux 2.6.31) operations. restart_syscall() restarts the interrupted system
call with a time argument that is suitably adjusted to account for the time that has already elapsed (including the time where the process
was stopped by a signal). Without the restart_syscall() mechanism, restarting these system calls would not correctly deduct the already
elapsed time when the process continued execution.
RETURN VALUE
The return value of restart_syscall() is the return value of whatever system call is being restarted.
ERRORS
errno is set as per the errors for whatever system call is being restarted by restart_syscall().
VERSIONS
The restart_syscall() system call is present since Linux 2.6.
CONFORMING TO
This system call is Linux-specific.
NOTES
There is no glibc wrapper for this system call, because it is intended for use only by the kernel and should never be called by applica-
tions.
The kernel uses restart_syscall() to ensure that when a system call is restarted after a process has been stopped by a signal and then
resumed by SIGCONT, then the time that the process spent in the stopped state is counted against the timeout interval specified in the
original system call. In the case of system calls that take a timeout argument and automatically restart after a stop signal plus SIGCONT,
but which do not have the restart_syscall() mechanism built in, then, after the process resumes execution, the time that the process spent
in the stop state is not counted against the timeout value. Notable examples of system calls that suffer this problem are ppoll(2),
select(2), and pselect(2).
From user space, the operation of restart_syscall() is largely invisible: to the process that made the system call that is restarted, it
appears as though that system call executed and returned in the usual fashion.
SEE ALSO
sigaction(2), sigreturn(2), signal(7)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2017-09-15 RESTART_SYSCALL(2)