Re: NEWBIE : Detect and restart closed apps.
- From: Greg Hackney <hackney@xxxxxxxxxx>
- Date: Thu, 02 Nov 2006 18:04:22 GMT
Jacques Basteyns wrote:
Say that on the server we start the Xclock app (as an example) for display
on each ThinClient.
$ Xclock -update 1 -display <IP address of client_1> &
$ Xclock -update 1 -display <IP address of client_2> &
$ Xclock -update 1 -display <IP address of client_3> &
ps output shows 3 Xclock process then 2 when one user close the app.
This is fine but we cannot tell which user has close the app.
#!/bin/sh
USERS="user1 user2 user3"
SLEEPTIME=600
while true
do
for i in $USERS
do
PID="`pgrep -U $i Xclock`"
if [ $? -ne 0 ]
then
echo run program to start $i
fi
done
sleep $SLEEPTIME
done
.
- Follow-Ups:
- Re: NEWBIE : Detect and restart closed apps.
- From: Jacques Basteyns
- Re: NEWBIE : Detect and restart closed apps.
- References:
- NEWBIE : Detect and restart closed apps.
- From: Jacques Basteyns
- NEWBIE : Detect and restart closed apps.
- Prev by Date: NEWBIE : Detect and restart closed apps.
- Next by Date: External RAID, GFS
- Previous by thread: NEWBIE : Detect and restart closed apps.
- Next by thread: Re: NEWBIE : Detect and restart closed apps.
- Index(es):