You are not logged in.

#1 2012-08-21 19:53:16

Registered: 2011-05-29
Posts: 261

kill tumblerd for good

Hi.  tumblerd keeps sucking up resources and freezing up my system because I have a file manager open containing a huge tif file.  I do

pkill tumblerd

and it kills it and I recover my ram and cpu and everything works good.  But it seems like any time I do ANYTHING, tumblerd comes back.  How do I kill it for the remainder of my session?


#2 2014-03-21 23:43:22

From: Indiana USA
Registered: 2013-08-13
Posts: 134

Re: kill tumblerd for good

here's a script for a work around...get the word out on this one. It really works. Copy. and paste it into a blank file, make it executable, and set it up to run at system start up. You'll be able to keep tumblerd without the headaches.

# Tumblerdwatcher v 1.0
# Script to check and kill tumblerd process if a loop is suspected. To be automatically scheduled at user session start.
# Homemade workaround for bug: … rd#p554241
# The author has no responsibility for the execution. Feel free to distribute and modify it.
# Advice are welcome to

period=60                  # check period (sec)
process="/usr/lib/i386-linux-gnu/tumbler-1/tumblerd"   # tumblerd binary path
Pcpu=20                     # tolerated cpu usage (%)
Pmem=25                     # tolerated memory usage (%)
mountpath="/media"               # automatic mount point for removable storage
sec=10                     # time limit (sec) for opened file at $mountpath for thumbnail generation
sg="-15"                  # process termination signal (-15 is OK)
logpath="/tmp/Tumblerdwatcher.log"         # log path                     

cat /dev/null > $logpath
exec >$logpath 2>&1
# reset log file

while true
# execute endlessly


sleep $period
# wait a set period of time

[[ `ps -ef | grep $process | grep -v 'grep' | wc -l` -eq 0 ]] && continue
# skip to next period if not executing

ps -eo pcpu,pid,pmem,args | grep $process | grep -v 'grep' | while read dpcpu pid dpmem
# catch proccess id, cpu usage and memory usage


  pcpu=`echo $dpcpu | cut -d'.' -f1`
  pmem=`echo $dpmem | cut -d'.' -f1`

  [[ $pcpu -gt $Pcpu ]] || [[ $pmem -gt $Pmem ]] && kill $sg $pid && echo "`date` PID $pid $pcpu/$Pcpu %cpu $pmem/$Pmem %mem" && continue
# if cpu usage or memory usage exceed, kill it and report values in the log file

  [[ `lsof -p $pid | grep $mountpath | wc -l` -eq 0 ]] && continue
# if no opened file by tumblerd at removable storage mountpoint, skip to next period

  lsof -p $pid | grep $mountpath | tr -s ' ' | cut -d' ' -f9 > /tmp/tumblerd.lsof.old
# list opened files

  sleep $sec
# wait for tolerated time limit

  [[ `lsof -p $pid | grep $mountpath | wc -l` -eq 0 ]] && continue
# if no more opened file skip to next period

  lsof -p $pid | grep $mountpath | tr -s ' ' | cut -d' ' -f9 > /tmp/
# list opened files again

  for opened_file in `cat /tmp/tumblerd.lsof.old`
# if some file was open before....

     grep $opened_file /tmp/ && kill $sg $pid && echo "`date` PID $pid ^^^^^^^^^^^^^^^^^^^^^^^^" && continue
# ...and it's still hung open, kill tumblerd



If you can't be helpful, don't say anything at all. Condescension creates negative energy, and that's just not helpful.


#3 2014-03-21 23:51:22

Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 19,588

Re: kill tumblerd for good

Please use code tags when pasting to the boards: … s_and_Code

And there is no need to crosspost and necrobump: … Bumping.27


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438


Board footer

Powered by FluxBB