Thanks Clay. I appreciate the script. I am going to try this out. But
before I do, I hope you can help me to understand what is going on a
little better? Anyone who feels like chiming in would be quite welcome.<br>
<br>
<br>
1) basically I think this script is looping through the password db by
calling the program 'getent' and piping the results to awk. <br>
<br>
2) Awk is applying a separator : and then something magical happens
(what is $3?) Somehow uids are getting assigned to this variable?<br>
<br>
3 Then somehow (related to $3) we look for uids above 999 and pass them
to $1 which will print them to standard output (i.e the tty from which
this script is executed, if executed by hand). Is there more going on
here?<br>
<br>
4) then the script echos the result of the variable $user and runs
'pgrep -u' against the expanded variable $user for any gnome-panel and
bobono processes owned by that user<br>
<br>
5) the program loops until done.<br>
<br>
Sorry, I just like to understand what I am doing before I do it. Will
killing zombie type gnome-panel and bonobo stuff, clean up leftover
processes like firefox, games etc?<br>
<br>TIA!<br>
<br>
John<br>
<br><div><span class="gmail_quote">On 1/18/07, <b class="gmail_sendername">Clay Berlo</b> <<a href="mailto:clay.berlo@dsbn.edu.on.ca">clay.berlo@dsbn.edu.on.ca</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
Funny, I just ran into the same kind of problem myself not so long ago. Talked to they guys on IRC and was given the following:<br>
<br>
<tt>for user in $(getent passwd | awk -F: '$3 > 999 {print $1}'); do
echo $user; pgrep -u ${user} gnome-panel || pkill -u ${user} bonobo;
done</tt><br>
<br>
Now, my system is running the "usual" gnome stuff, so this works for
killing off processes from anyone not logged in. If you're using KDE
or XFCE, you'll have to scan for something other thant gnome-panel.<br>
<br>
Oliver Grawert has suggested this should go into the ldm script
somehow. As I'm not familiar with how to play around with that file, I
just stuck in a cron job to run hourly.<div><span class="e" id="q_11036786a55d8c31_1"><br>
<br>
On Wed, 2007-17-01 at 14:30 -0800, john wrote:<br>
<blockquote type="CITE">
<font color="#000000">Hello all,</font><br>
<br>
<font color="#000000">I'm
running ltsp 4.2 on Ubuntu LTS 6.06 using win2k3 AD for auth. I find
that at the end of the day I have a lot of leftover student user
processes running, and I'd like to have a little script that kills them
all after school. Does anyone have something ready-made or do I need to
brew one myself? </font><br>
<br>
<font color="#000000">TIA!</font><br>
<br>
<font color="#000000">John</font><br>
</blockquote>
</span></div><table cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td>
-- <br>
Clay Berlo <<a href="mailto:clay.berlo@dsbn.edu.on.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">clay.berlo@dsbn.edu.on.ca</a>><br>
DSBN Technical Services
</td>
</tr>
</tbody></table>
</div>
</blockquote></div><br>