[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] script til at chekke om en process k øre



On 15/09/2009, at 13.41, Robert Larsen wrote:

Max Jensen wrote:
Hejsa!
Håber nogen vil hjælpe!
Jeg har en debian server der står og køre et program som skal køre 24
timer i døgnet men somme tider går ned.
Derfor har jeg søgt og søgt på google og fandt dette lille script men
jeg kan ikke få det til at virke

pid=""
pid='ps -ef | grep "<process string>" |
echo $pid
if [ "$pid"="" ]
then
echo "process not running"

# (Start Process)

else
echo service is ok
pid=""
fi

Så håber nogen vil hjælpe mig
på forhånd tak for hjælpen




PROGRAM_TO_CHECK_FOR=myserver
if ! pidof $PROGRAM_TO_CHECK_FOR > /dev/null; then
	echo "$PROGRAM_TO_CHECK_FOR is not running"
fi

hvad med at bruge restartd?


JonB



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-10-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *